+ + + +
Cubix
API Documentation Rev 2026.08 Status Operational
Cubix OpenAI-compatible Free

An OpenAI–compatible edge for chat, reasoning, search & tools.

Point any OpenAI SDK, CLI or frontend at Cubix and go. Free models with tool calling, live web search, thinking mode and SSE streaming — no configuration, no surprises.

Base URL
https://your-deployment/v1
Auth
Bearer token
or x-api-key
Rate limit1
15 messages
per minute / key
Protocol
HTTP · JSON
SSE streaming
previewrequest / response200 OK
# request
POST https://your-deployment/v1/chat/completions
authorization: Bearer YOUR_KEY

{ "model": "deepseek-v4-flash:free",
  "messages": [{ "role": "user", "content": "hi" }] }

# response · application/json
{
  "id": "cmpl-01",
  "choices": [{ "message": { "role": "assistant",
    "content": "Hey. What do you want to know?" } }]
}

1 Keys are issued by the admin.

01Endpoints4 routes

Works out of the box with opencode, SillyTavern, LibreChat, OpenWebUI, Cherry Studio and any OpenAI SDK — just change the base URL.

POST/v1/chat/completionsChat completions · streaming supported
GET/v1/modelsList available models
POST/v1/conversationsCreate a named conversation → id
POST/v1/conversations/<id>/messagesContinue a conversation · stateful
02AuthenticationHeader based

Every request requires a key, passed with either header:

  • Authorization: Bearer <key>
  • x-api-key: <key>
  • Limit of 15 messages/min per key1
03Models4 available

Select by name — no extra flags. Unknown names fall back to the default model.

deepseek-v4-flash:freeDefault · fast general chat
deepseek-v4-flash-thinking:freeReasoning · returns reasoning_content
deepseek-v4-flash-searchLive web search with citations
deepseek-v4-flash-all:freeThinking + web search combined
04Quick Startcurl
chat.shbash
# basic completion
curl -X POST https://your-deployment/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_KEY"   -d '{
  "model": "deepseek-v4-flash:free",
  "messages": [{"role": "user", "content": "Explain quantum computing"}]
}'
response.json200 OK
{
  "id": "cmpl-01",
  "object": "chat.completion",
  "model": "deepseek-v4-flash:free",
  "choices": [{
    "index": 0,
    "message": { "role": "assistant", "content": "Quantum computing is..." },
    "finish_reason": "stop"
  }],
  "usage": { "prompt_tokens": 12, "completion_tokens": 87, "total_tokens": 99 }
}
Streaming. Add "stream": true to receive server-sent events — a series of data: {...} chunks terminated by data: [DONE].
stream.txtsse
data: {"id":"cmpl-01","choices":[{"delta":{"content":"Hel"}}]}

data: {"id":"cmpl-01","choices":[{"delta":{"content":"lo!"}}]}

data: [DONE]
05Tool CallingOpenAI format

Standard function format. The model replies with message.tool_calls; return results as a tool message.

tools.shbash
curl -X POST https://your-deployment/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_KEY"   -d '{
  "model": "deepseek-v4-flash:free",
  "messages": [{"role": "user", "content": "Whats the weather in Paris?"}],
  "tools": [{
    "type": "function",
    "function": {
      "name": "get_weather",
      "description": "Get current weather for a city",
      "parameters": {
        "type": "object",
        "properties": {"city": {"type": "string"}},
        "required": ["city"]
      }
    }
  }]
}'
response.jsonfinish_reason: tool_calls
{
  "choices": [{
    "message": {
      "role": "assistant",
      "tool_calls": [{
        "id": "call_01",
        "type": "function",
        "function": {
          "name": "get_weather",
          "arguments": "{ "city": "Paris" }"
        }
      }]
    },
    "finish_reason": "tool_calls"
  }]
}
  • Feed results back as {"role":"tool","tool_call_id":...,"content":...}
  • tool_choice: auto / none / required / forced function
  • Multi-step loops and streaming tool calls are supported
06Conversation MemoryStateful

Create a conversation once, keep talking inside it. Memory persists per id.

memory.shbash
# 1. create a conversation
curl -X POST https://your-deployment/v1/conversations   -H "Authorization: Bearer YOUR_KEY"   -d '{"name": "yo"}'
# -> {"conversation_id": "<id>", "name": "yo"}

# 2. talk inside it
curl -X POST https://your-deployment/v1/conversations/<id>/messages   -H "Authorization: Bearer YOUR_KEY"   -d '{"content": "Remember my favorite number is 42"}'
Same conversation_id, same memory. Without an explicit id one is derived automatically, so multi-turn CLIs just work.
07Request OptionsBody fields

Accepted body fields for /v1/chat/completions and the conversation endpoints.

FieldTypeDefaultPurpose
modelstringdeepseek-v4-flash:freeSee Models above
messagesarrayOpenAI messages (system / user / assistant / tool)
streamboolfalseSSE streaming
toolsarray[]OpenAI function tools
tool_choicestring | objectautoauto / none / required / forced function
conversation_idstringautoReuse a conversation for memory
web_searchboolfalseForce live web search + citations
thinkingboolfalseForce reasoning mode
systemstringSystem prompt (conversations endpoint)
Unknown fields (temperature, max_tokens, ...) are accepted and ignored — nothing errors.
08Errors5 codes

Errors follow the OpenAI shape: {"error":{"message","type","code"}}

StatusCodeMeaning
401invalid_api_keyInvalid or missing API key
400bad_requestMalformed request
404not_foundResource not found
429rate_limit_exceededOver 15 messages/min — slow down
502server_errorService temporarily unavailable, retry
09How to get an API key?

Keys are issued by the admin — join our Discord server to get yours.

Join Discord
Made by Vez