API reference
Moton API
An OpenAI-compatible API for uncensored inference and dedicated GPU compute. Point any OpenAI client at Moton and start generating.
Quickstart
Moton is an OpenAI-compatible inference API. If you can call the OpenAI API, you can call Moton — most clients only need a change to the base URL and the API key.
1. Create an API key
In the dashboard, open API keys and click Create key. You will be shown the full key once. Store it — only a mt_ prefix is visible afterwards.
2. Make your first request
Every request sends your key in the Authorization header. The endpoint is /v1/chat/completions.
curl https://console.moton.io/api/v1/chat/completions \
-H "Authorization: Bearer mt_..." \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.8-flash-next-uncensored",
"messages": [
{ "role": "user", "content": "Why is the sky blue?" }
]
}'The response is a standard chat completion:
{
"id": "chatcmpl-9f2a1c",
"object": "chat.completion",
"model": "qwen3.8-flash-next-uncensored",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "It's Rayleigh scattering…" },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 48,
"total_tokens": 60,
"cost": 0.0004
}
}3. Try the models list
GET /v1/models returns every model on the platform. It does not require authentication.
Click “Run it” to call GET /api/v1/models against this instance.Authentication
Authenticate by sending your API key in the Authorization header using the Bearer scheme.
curl https://console.moton.io/api/v1/chat/completions \
-H "Authorization: Bearer mt_..." \
-d '{ "model": "qwen3.8-flash-next-uncensored", "messages": [] }'Keys & permissions
| Property | Value |
|---|---|
| Format | mt_ prefix, 32 random characters |
| Visibility | The full secret is shown once at creation. Only the prefix is stored for display. |
| Scope | Per-account. Each key is billed to the account balance and honors its optional spend cap. |
| Rotation | Create a new key, update your clients, then revoke the old one. |
Errors
If the key is missing or invalid, requests return 401:
{
"error": {
"message": "Invalid API key. Create one in the dashboard.",
"type": "auth_error"
}
}Models
Moton hosts uncensored open-weights models. You select one by its id in the request body. Use GET /v1/models to list what is currently available.
| Model ID | Organization | Context | Capabilities |
|---|---|---|---|
qwen3.8-flash-next-uncensored | Moton | 1M | tools, reasoning, json, vision |
qwen3.8-27b-uncensored | Moton | 256K | tools, reasoning, json, vision |
gpt-oss-20b | OpenAI | 128K | tools, reasoning, json |
qwen3.6-35b-a3b | Alibaba | 256K | tools, reasoning, json |
Chat Completions
POST/v1/chat/completions
The core endpoint. It accepts a chat message history and returns either a single completion or a server-sent event stream.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | required | A catalogue id (see GET /v1/models) or the name of one of your deployments. |
messages | array | required | Chat history. Each item has a role of system, user, or assistant and a content string. |
stream | boolean | optional | If true, stream the response as SSE chunks. |
temperature | number | optional | Sampling temperature, 0.0 (deterministic) to 1.0 (creative). |
max_tokens | integer | optional | Cap on generated tokens for this completion. |
Non-streaming response
{
"id": "chatcmpl-9f2a1c",
"object": "chat.completion",
"created": 1753250000,
"model": "qwen3.8-flash-next-uncensored",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "It's Rayleigh scattering…" },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 48,
"total_tokens": 60,
"cost": 0.0004
}
}Streaming (SSE)
Set "stream": true. The response is a sequence of data: events ending with a terminal [DONE]. The final chunk carries token usage and cost.
data: {"id":"chatcmpl-9f2a1c","object":"chat.completion.chunk","model":"qwen3.8-flash-next-uncensored","choices":[{"index":0,"delta":{"content":"It"},"finish_reason":null}]}
data: {"id":"chatcmpl-9f2a1c","object":"chat.completion.chunk","model":"qwen3.8-flash-next-uncensored","choices":[{"index":0,"delta":{"content":"'s"},"finish_reason":null}]}
data: {"id":"chatcmpl-9f2a1c","object":"chat.completion.chunk","model":"qwen3.8-flash-next-uncensored","choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":{"prompt_tokens":12,"completion_tokens":48,"total_tokens":60,"cost":0.0004}}
data: [DONE]Errors
| Status | Meaning |
|---|---|
400 | Bad request — missing model, empty or missing messages, or a prompt past the model's context window. |
401 | Missing or invalid API key. |
402 | insufficient_credits — balance too low for serverless inference, or the key's spend cap has been reached. |
403 | not_in_plan — the model isn't on your subscription and you have no balance to fall back to per-token. |
404 | Unknown model id or deployment name. |
503 | model_not_online — the model is in the catalogue but no shared capacity is serving it yet. |
Models List
GET/v1/models
Returns the list of models currently served. No authentication required.
{
"object": "list",
"data": [
{ "id": "qwen3.8-flash-next-uncensored", "object": "model", "created": 1755820800, "owned_by": "Moton" },
{ "id": "qwen3.8-27b-uncensored", "object": "model", "created": 1755820800, "owned_by": "Moton" },
{ "id": "gpt-oss-20b", "object": "model", "created": 1755820800, "owned_by": "OpenAI" },
{ "id": "qwen3.6-35b-a3b", "object": "model", "created": 1755820800, "owned_by": "Alibaba" }
]
}Errors
Errors use the OpenAI error envelope. The type field is machine-readable; the message field is human-readable.
{
"error": {
"message": "Unknown model 'gpt-4'.",
"type": "invalid_request_error"
}
}| Type | Status | When it happens |
|---|---|---|
invalid_request_error | 400 | Malformed body, empty messages, or unknown model id (404). |
auth_error | 401 | Missing, expired, or invalid API key. |
billing_error | 402 | Insufficient balance for serverless inference, or the key's spend cap reached. |
server_error | 5xx | Upstream model server error, or no shared capacity online (503). |
Billing
Billing is usage-based. Inference is billed per token and privacy servers are billed per hour of runtime. Your account holds a balance, and every request accrues cost against it.
Where cost appears
Every completion response includes a usage object with a cost field (in USD). Streaming requests report total usage in the final chunk.
"usage": {
"prompt_tokens": 12,
"completion_tokens": 48,
"total_tokens": 60,
"cost": 0.0004
}Balance & caps
| Item | Behavior |
|---|---|
| Balance | Top up from the Billing page. Requests are billed against it in real time. |
| Spend cap | Optional per-key limit. When reached, the key stops accepting requests with 402. |
| Invoices | Itemized monthly invoices are available on the Billing page. |
Changelog
Notes on recent changes to the API and platform.
| Date | Change |
|---|---|
| 2026-08 | Initial public API. OpenAI-compatible chat completions + model list. |
| 2026-08 | Per-key spend caps and live cost meter in the playground. |