Skip to Content
CosmicAC Logo
API referenceInference API

Inference routes

OpenAI-compatible chat completions and audio transcriptions.

POST
/v1/endpoints/{endpoint_name}/v1/chat/completions

Requires an API key that belongs to the team owning the endpoint.

Authorization

apiKeyAuth
headerAuthorizationBearer <token>

API key (csm_live_...) sent as Authorization: Bearer <key>.

Path Parameters

endpoint_name*string
Length1 <= length

Request Body

application/json
  1. body
messages*array<>
Items1 <= items
stream?boolean
Defaultfalse
temperature?number
max_tokens?number
top_p?number
frequency_penalty?number
presence_penalty?number
stop?string|array<string>
mm_processor_kwargs?
chat_template_kwargs?
reasoning_effort?string

Response Body

Default Response

Example Request
curl -X POST 'https://your-inference-url/v1/endpoints/string/v1/chat/completions' \  -H 'Authorization: Bearer csm_live_xxxxxxxxxxxxxxxxxxxxxxxx' \  -H 'Content-Type: application/json' \  -d '{  "messages": [    {      "role": "string",      "content": null    }  ]}'
Example Response200
Empty
POST
/v1/endpoints/{endpoint_name}/v1/audio/transcriptions

Requires an API key that belongs to the team owning the endpoint.

Authorization

apiKeyAuth
headerAuthorizationBearer <token>

API key (csm_live_...) sent as Authorization: Bearer <key>.

Path Parameters

endpoint_name*string
Length1 <= length

Response Body

Default Response

Example Request
curl -X POST 'https://your-inference-url/v1/endpoints/string/v1/audio/transcriptions' \  -H 'Authorization: Bearer csm_live_xxxxxxxxxxxxxxxxxxxxxxxx'
Example Response200
Empty