Requests (API)

/v1/chat/completions

OpenAI-compatible endpoint — the main one for Cursor, Continue, OpenWebUI and any OpenAI SDK.

POST /v1/chat/completions OpenAI compatible

Request format

Body is the standard OpenAI shape: model, messages, stream, tools, temperature, top_p, response_format, etc.

Response format

response.json
{
  "id": "gen-•••",
  "model": "openai/gpt-4o",
  "choices": [{ "message": { "role": "assistant", "content": "..." } }],
  "usage": { "prompt_tokens": 12, "completion_tokens": 8, "total_tokens": 20 }
}

The usage object reports the request token counts. Billing is based on the token count and the chosen model's rate.

Telegram