Decillion
Models

Models and chat

The model catalog, and the chat endpoint.

The catalog

Every model you can call is listed once, with its type , what it takes and produces, and its pricing in US dollars.
Model ids are creator/model , such as google/gemini-3.8-flash . A bare name ( gemini-3.8-flash ) also works when it is unambiguous.

List models

GET
/v1/models
The models this key may call, each with its prices (US dollars).
Key permission: Model catalog: Read
QUERY PARAMETERS
type
string
Only this kind: language , image , video , speech , transcription , embedding , decision or rerank .
EXAMPLE
curl https://api.decillionai.com/v1/models?type=language \ -H "Authorization: Bearer $DECILLION_API_KEY"
Response
{ "object": "list", "data": [ { "id": "google/gemini-3.8-flash", "object": "model", "name": "Gemini 3.8 Flash", "creator": "google", "type": "language", "modalities": { "input": ["text", "image", "file"], "output": ["text"] }, "capabilities": ["streaming", "tools", "json", "vision"], "context_window": 1000000, "pricing": [ { "label": "input", "usd": 0.3, "per": "1M tokens" }, { "label": "output", "usd": 1.2, "per": "1M tokens" } ] } ] }
GET
/v1/models/{id}
One model, as the list shows it.
Key permission: Model catalog: Read

Create a chat completion

POST
/v1/chat/completions
Send a conversation to a model and get its reply.
Key permission: Model requests: Write
BODY PARAMETERS
model
string
required
The model to call, for example google/gemini-3.8-flash .
messages
array
required
The conversation so far: objects with a role ( system , user or assistant ) and content . Content can be text, or a list of parts that include images, audio or files.
temperature
number
0 to 2. Lower is more focused, higher more varied. Defaults to 1.
max_tokens
integer
The most tokens the reply may use. The call stops there.
stream
boolean
Send the reply as it is written, as server-sent events.
stop
string or array
Up to four sequences where the model should stop.
models
array
Other models to try, in order, if this one can't answer. See Fallback models.
EXAMPLE
curl https://api.decillionai.com/v1/chat/completions \ -H "Authorization: Bearer $DECILLION_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/gemini-3.8-flash", "messages": [ { "role": "user", "content": "Say hello in one sentence." } ] }'
Response
{ "id": "chatcmpl_9f3a1c", "object": "chat.completion", "created": 1760000000, "model": "google/gemini-3.8-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello there, it's lovely to meet you!" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 14, "completion_tokens": 11, "total_tokens": 25, "cost": 0.0000186 } }
The response says which model answered (after any fallback), and usage.cost is what the request cost, in US dollars.

Images, audio and files in a message

A model whose modalities.input includes more than text takes them as parts of a message, in the OpenAI format:
A message with an image
{ "role": "user", "content": [ { "type": "text", "text": "What is in this picture?" }, { "type": "image_url", "image_url": { "url": "https://example.com/cat.png" } } ] }
Use input_audio for audio and file for a document you have uploaded to Storage. A model that can't take a kind of input refuses the request with a 400 .

Streaming

With stream: true the response is a stream of server-sent events. Each event carries a small piece of the reply; the last is [DONE] . Just before it, an event carries the usage for the whole call.
Event stream
data: {"choices":[{"delta":{"content":"Hello"}}]} data: {"choices":[{"delta":{"content":" there"}}]} data: {"choices":[],"usage":{"prompt_tokens":14,"completion_tokens":11,"cost":0.0000186}} data: [DONE]

Fallback models

models is a list of other models to try, in order, if the one you asked for can't answer (it is down, or overloaded). Every endpoint takes it.
With a fallback
curl https://api.decillionai.com/v1/chat/completions \ -H "Authorization: Bearer $DECILLION_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/gemini-3.8-flash", "messages": [ { "role": "user", "content": "Say hello in one sentence." } ], "models": [ "openai/gpt-5-mini" ] }'
The response's model says which one answered, as do the X-Decillion-Model header and Logs. A request refused for what it asks (a bad parameter, say) is not retried on the others: they would refuse it too.

What a request costs

A language model charges for the tokens you send and the tokens you get back, each at the model's rate per million tokens:
text
cost = prompt_tokens × input_rate / 1,000,000 + completion_tokens × output_rate / 1,000,000
Other kinds of model are charged for what they produce: see Images, audio, video and more. Current rates are under Models in the console.
Previous
Organizations
Next
Images, audio, video and more