sansxel
sansxel
The AI workshop for makers
ProductLearnPricingContact
sansxelsansxel

The adaptive AI platform. One AI, infinite shapes, a contextual interface that reshapes itself around how you actually work.

Product
ProductLearnPricingDownload
Account
DashboardDownloadUpdatesIntegrationsUsage
Company
PrivacyTermsContact
Community
Discord
© 2026 sansxel. All rights reserved.
All articles
Topics
AI11
Coding5
Databases1
APIs3
RESTAuthRequests
MCP1
Systems4
Build1
Skills2
Monetization3
Learn/APIs/REST
beginner6 min read

Sansxel REST API, quickstart

Authenticate, send a chat request, stream a reply. Three steps. Copy-paste examples in JavaScript and Python.

BySansxel (OWNER)·Apr 25, 2026

The sansxel API is a thin REST surface. One endpoint for chat, one for image generation, one for voice. Everything streams, everything uses bearer auth.

1. Get a key

Head to /account/keys, click New key, copy it. Keys are shown once, store them somewhere safe.

2. Authenticate

Send your key in the Authorization header on every request:

bash
Authorization: Bearer sk_your_api_key_here

3. Send a chat request

JavaScript:

javascript
const res = await fetch("https://sansxel.ai/api/v1/chat", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.SANSXEL_KEY}`,
  },
  body: JSON.stringify({
    messages: [{ role: "user", content: "Hello!" }],
    stream: true,
  }),
});

// Stream the reply
const reader = res.body.getReader();
const decoder = new TextDecoder();
while (true) {
  const { done, value } = await reader.read();
  if (done) break;
  process.stdout.write(decoder.decode(value));
}

Python:

python
import os, requests

with requests.post(
    "https://sansxel.ai/api/v1/chat",
    headers={
        "Content-Type": "application/json",
        "Authorization": f"Bearer {os.environ['SANSXEL_KEY']}",
    },
    json={
        "messages": [{"role": "user", "content": "Hello!"}],
        "stream": True,
    },
    stream=True,
) as res:
    for chunk in res.iter_content(chunk_size=None):
        print(chunk.decode(), end="", flush=True)

What you get back

With stream: true the response body is plain UTF-8 text streamed chunk by chunk. With stream: false you get a single JSON object with { text, usage } after the model finishes.

Rate limits

  • Free: 50 chats / week.
  • Core: 500 chats / week.
  • Plus: 1,500 chats / week (unlimited with Copilot Pro Pack, included).
  • Pro / Teams / Enterprise: unlimited.
Hit a 429?
Buy a Weekly Boost (+500 chats, $5) or top up credits at /account/billing. Both work as overflow when you blow past your weekly cap.
Get an API key→
Write for sansxel

Want your work in the Learn library? Apply for a hardlocked byline.

Apply to write

Keep learning

beginner4 min
What is AI, really?

AI like ChatGPT works by predicting the next word, kind of like autocomplete, but way smarter. Here's the plain-English version of what's happening under the hood.

AI
beginner5 min
How voice AI works (talk → text → AI → speech)

When you talk to an AI, three different models are running in sequence. Here's what each one does and why latency matters more than you think.

AI
beginner10 min
Build your first AI app in 10 minutes

A real working chat app, end to end. JavaScript, no framework, ~50 lines. You'll get a feel for how requests, streaming, and prompts fit together.

Build