The same catalog, keys and billing for every kind of model.
Kinds of model
Each model has a type and modalities (what it takes and what it produces). The type decides the endpoint and what you are charged for:
Type
Endpoint
Charged per
language
POST /chat/completions
token, input and output
image
POST /images/generations
image (some models: tokens)
video
POST /videos/generations
second of video, at the resolution asked for
speech
POST /audio/speech
character spoken
transcription
POST /audio/transcriptions
minute of audio
embedding
POST /embeddings
token in
decision
POST /decisions
token, input and output
rerank
POST /rerank
search, or token in
All of them take model and models (fallbacks), report usage.cost in dollars, and show up in Usage and Logs. A model sent to the wrong endpoint is refused with a 400 that names the right one.
Images
POST
/v1/images/generations
Generate one or more images from a prompt.
Key permission: Model requests: Write
BODY PARAMETERS
model
string
required
An image model, for example bfl/flux-2-pro .
prompt
string
required
What to draw.
n
integer
How many images. Defaults to 1; each is charged.
size
string
Such as 1024x1024 . Some models take only an aspect ratio: leave it out for those.
aspect_ratio
string
Such as 16:9 or 4:3 .
seed
integer
For a repeatable result, where the model supports it.
provider_options
object
Options of the model's maker, passed on as they are.
EXAMPLE
curl
JavaScript
Python
curl-X POST https://api.decillionai.com/v1/images/generations \-H"Authorization: Bearer $DECILLION_API_KEY"\-H"Content-Type: application/json"\-d '{"model":"bfl/flux-2-pro","prompt":"A lighthouse at dawn, watercolor","n":1}'
Images come back as base64 ( b64_json ). Decode them and keep what you need: nothing is stored for you.
Video
A video takes minutes, so it is a job: you start it, then ask how it is going until it is done. It is charged when it starts, for the seconds you ask for at the model's rate for the resolution; if the model fails it, the charge is refunded.
POST
/v1/videos/generations
Start a video. Returns at once (202) with the job's id.
Key permission: Model requests: Write
BODY PARAMETERS
model
string
required
A video model, for example alibaba/wan-v2.6-t2v .
prompt
string
required
What to film.
duration
integer
required
Length in seconds, 1 to 60. Each model takes its own lengths; the price is per second.
resolution
string
480p , 720p or 1080p , or a size such as 1280x720 . Without it the model picks, and its dearest rate is charged.
aspect_ratio
string
Such as 16:9 or 9:16 .
generate_audio
boolean
Sound with the video, where the model can make it.
image
string
A first frame, for image-to-video models: a URL, or a data URL ( data:image/png;base64,… ).
seed
integer
For a repeatable result, where the model supports it.
provider_options
object
Options of the model's maker, passed on as they are.
EXAMPLE
curl
JavaScript
Python
curl-X POST https://api.decillionai.com/v1/videos/generations \-H"Authorization: Bearer $DECILLION_API_KEY"\-H"Content-Type: application/json"\-d '{"model":"alibaba/wan-v2.6-t2v","prompt":"A paper boat drifting down a rain-soaked street","duration":5,"resolution":"720p"}'
How the job is going: pending , completed or failed . When it is completed, videos holds the result: a url to download (it expires, so keep your own copy) or the video itself as b64_json . Ask every few seconds.
{"text":"Welcome to the meeting.","language":"en","duration":12.4,"model":"openai/whisper-1","usage":{"seconds":12.4,"cost":0.0015}}
Reranking
A reranker orders documents by how well they answer a query: run it on what a search found, and keep the best few for a model to read.
POST
/v1/rerank
Score documents against a query, best first. The same shape as Cohere's Rerank API.
Key permission: Model requests: Write
BODY PARAMETERS
model
string
required
A rerank model, for example cohere/rerank-v3.5 .
query
string
required
What you are looking for.
documents
array
required
The texts to rank, 1 to 1000.
top_n
integer
Return only the best this many.
EXAMPLE
curl
JavaScript
Python
curl-X POST https://api.decillionai.com/v1/rerank \-H"Authorization: Bearer $DECILLION_API_KEY"\-H"Content-Type: application/json"\-d '{"model":"cohere/rerank-v3.5","query":"How do I reset my password?","documents":["Open Settings, then Security, then Reset password.","Our office is open 9 to 5.","Invoices are sent on the 1st."],"top_n":2}'
Turn text into vectors for search, clustering and recommendations.
Key permission: Model requests: Write
BODY PARAMETERS
model
string
required
An embedding model.
input
string or array
required
One text, or a list of texts.
EXAMPLE
curl
JavaScript
Python
curl-X POST https://api.decillionai.com/v1/embeddings \-H"Authorization: Bearer $DECILLION_API_KEY"\-H"Content-Type: application/json"\-d '{"model":"google/text-embedding-005","input":"How do I reset my password?"}'
A decision model answers typed questions about a situation and tells you how sure it is. It is for the choice a program has to make (escalate or not, approve or not), where free text would only get in the way.
POST
/v1/decisions
Ask one or more typed questions about a state, and get an answer and a probability for each.
Key permission: Model requests: Write
BODY PARAMETERS
model
string
required
A decision model, for example typesafe-ai/jev .
state
string | object
required
Whatever describes the situation: text or JSON.
questions
object
required
A map of question names. Each has a type ( boolean , choice or score ) and instructions ; the model's own options (such as the choices of a choice ) go in the same object. Up to 300 questions.
EXAMPLE
curl
JavaScript
Python
curl-X POST https://api.decillionai.com/v1/decisions \-H"Authorization: Bearer $DECILLION_API_KEY"\-H"Content-Type: application/json"\-d '{"model":"typesafe-ai/jev","state":"Customer reports a double charge","questions":{"should_escalate":{"type":"boolean","instructions":"Should a person look at this?"}}}'