Models API
OpenAI-compatible model discovery and inference endpoints.Endpoints
Section titled “Endpoints”| Method | Path | Request | Response |
|---|---|---|---|
GET | /v1/models | — | ModelList |
POST | /v1/chat/completions | ChatCompletionRequest | ChatCompletion or an SSE stream |
List models
Section titled “List models” GET
/v1/models curl https://app.dexto.ai/v1/models \ -H "Authorization: Bearer $DEXTO_API_KEY"| Response field | JSON type | Required | Description |
|---|---|---|---|
object | "list" | Yes | List discriminator |
data | array<Model> | Yes | Models available to the API key |
data[].id | string | Yes | Model identifier used in requests |
data[].object | "model" | Yes | Object discriminator |
data[].created | integer | No | Unix timestamp in seconds |
data[].owned_by | string | No | Model provider |
Create chat completion
Section titled “Create chat completion” POST
/v1/chat/completions The endpoint supports text, model-dependent image, PDF, and audio inputs, tool calls, reasoning, and streaming. Available modalities depend on the selected model.
| Request field | JSON type | Required | Description |
|---|---|---|---|
model | string | Yes | ID returned by GET /v1/models |
messages | array<Message> | Yes | Ordered conversation messages |
messages[].role | string | Yes | system, user, assistant, or tool |
messages[].content | string | array | Yes | Text or structured multimodal parts |
stream | boolean | No | Return server-sent events |
temperature | number | No | Sampling temperature |
max_tokens | integer | No | Maximum generated tokens |
tools | array<Tool> | No | OpenAI-compatible function tools |
curl https://app.dexto.ai/v1/chat/completions \ -H "Authorization: Bearer $DEXTO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-5-mini", "messages": [{"role":"user","content":"Summarize this release note."}] }'{ "id": "chatcmpl_01K4M6V7P8", "object": "chat.completion", "created": 1789142400, "model": "openai/gpt-5-mini", "choices": [{ "index": 0, "message": {"role":"assistant","content":"The release expands the developer API."}, "finish_reason": "stop" }], "usage": {"prompt_tokens":14,"completion_tokens":9,"total_tokens":23}}With stream: true, the response uses text/event-stream and returns OpenAI-compatible completion chunks.