Skip to main content
curl https://api.usetokenless.com/openai/v1/chat/completions \
  -H "Authorization: Bearer $TOKENLESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tokenless-pro",
    "messages": [
      {"role": "user", "content": "Explain model routing in one paragraph."}
    ],
    "stream": true
  }'
data: {"id":"chatcmpl_req_1e6255bf_5d10049d4ab0_1","object":"chat.completion.chunk","created":0,"model":"tokenless-pro","choices":[{"index":0,"delta":{"role":"assistant"},"finish_reason":null}]}

data: {"id":"chatcmpl_req_1e6255bf_5d10049d4ab0_1","object":"chat.completion.chunk","created":0,"model":"tokenless-pro","choices":[{"index":0,"delta":{"content":"Model routing is the process of directing a request to the most suitable model…"},"finish_reason":null}]}

data: {"id":"chatcmpl_req_1e6255bf_5d10049d4ab0_1","object":"chat.completion.chunk","created":0,"model":"tokenless-pro","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: {"id":"chatcmpl_req_1e6255bf_5d10049d4ab0_1","object":"chat.completion.chunk","created":0,"model":"tokenless-pro","choices":[],"usage":{"prompt_tokens":11,"completion_tokens":227,"total_tokens":238}}

data: [DONE]
POST/openai/v1/chat/completions
For the full upstream contract, see the OpenAI API reference.
curl https://api.usetokenless.com/openai/v1/chat/completions \
  -H "Authorization: Bearer $TOKENLESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tokenless-pro",
    "messages": [
      {"role": "user", "content": "Explain model routing in one paragraph."}
    ],
    "stream": true
  }'
data: {"id":"chatcmpl_req_1e6255bf_5d10049d4ab0_1","object":"chat.completion.chunk","created":0,"model":"tokenless-pro","choices":[{"index":0,"delta":{"role":"assistant"},"finish_reason":null}]}

data: {"id":"chatcmpl_req_1e6255bf_5d10049d4ab0_1","object":"chat.completion.chunk","created":0,"model":"tokenless-pro","choices":[{"index":0,"delta":{"content":"Model routing is the process of directing a request to the most suitable model…"},"finish_reason":null}]}

data: {"id":"chatcmpl_req_1e6255bf_5d10049d4ab0_1","object":"chat.completion.chunk","created":0,"model":"tokenless-pro","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: {"id":"chatcmpl_req_1e6255bf_5d10049d4ab0_1","object":"chat.completion.chunk","created":0,"model":"tokenless-pro","choices":[],"usage":{"prompt_tokens":11,"completion_tokens":227,"total_tokens":238}}

data: [DONE]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required
Available options:
tokenless-pro,
tokenless-max,
tokenless-ultra-saver
messages
object[]
required
Minimum array length: 1
stream
boolean
default:false

Response

An OpenAI-compatible completion response or SSE stream.