Skip to content

POST /v1/chat/completions

Updated
Reading time
2 min

A thin translation layer so an existing OpenAI SDK can talk to Revoye by changing one base URL. It contains no logic of its own: it translates the request in, calls the same code path as /v1/completions, and translates the response out.

{
  "model": "revoye/chatgpt",
  "messages": [
    { "role": "system", "content": "You are terse." },
    { "role": "user", "content": "Summarise the CAP theorem." }
  ],
  "stream": false
}

Model names

modelRoutes to
revoye/autoAny enabled provider, chosen by your rotation strategy
revoye/chatgptChatGPT
revoye/claudeClaude
revoye/geminiGemini
revoye/deepseekDeepSeek
revoye/qwenQwen
revoye/perplexityPerplexity

The provider vocabulary is the same one provider uses on the native endpoint. GET /v1/models lists what is enabled on your account right now.

Three things behave differently

Documented rather than hidden, because each of them will otherwise look like a bug.

1 · messages are flattened into one prompt. A system message is prepended and prior assistant turns become context. This is not a real conversation API — the provider's own UI holds the real thread. To continue an actual thread, use the native endpoint with conversation_ref and mode: "continue".

2 · stream: true returns 400. The agent reads a finished answer from a page; there is nothing partial to forward. Silently ignoring the flag would look like a hang, which is worse than an error.

3 · usage is null. Revoye has no token counts — there is no metered API call to count. Nulls are honest; fabricated numbers would be worse. If your code does arithmetic on usage, guard it.

When to use the native endpoint instead

The compatibility layer exists to save you a rewrite. Everything Revoye-specific is on /v1/completions: wait: false, callback_url, timeout_ms, deadline_ms, priority, metadata, agent_id, and conversation continuation. For new code, start there.

Errors

Same envelope and same codes as /v1/completions, plus INVALID_REQUEST for stream: true and for an unrecognised model.