Docs
Chat completions
POST /t/<slug>/<codex|claude|gemini|grok>/chat/completions
Each agent lives at its own path, but the request and response bodies share the same shape. Fields an agent doesn't support are simply ignored rather than erroring, with one exception — see Providers for which fields apply where.
Request body
{
"messages": [
{"role": "user", "content": "Summarize this repo"}
],
"effort": "medium",
"conversation_id": null,
"stream": false
}
messages— standard role/content array; content can be a string or a list of content parts (see Vision input — Codex only).effort— reasoning effort hint. Codex and Claude Code only — Gemini CLI and Grok don't accept it.conversation_id— resume a prior session. Claude Code, Gemini CLI, and Grok — not Codex.stream— settruefor server-sent events on any of the four agents, see Streaming.tools/tool_choice— supported on all four with very different reliability, see Tool & MCP calling.
Response body
{
"id": "chatcmpl-...",
"object": "chat.completion",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0 },
"codex_thread_id": "..."
}
Each agent adds its own extension field for session bookkeeping: codex_thread_id, claude_session_id, gemini_session_id, or grok_session_id — harmless to ignore if you don't use conversation_id.
Rules that apply to all four agents
- Standard OpenAI-style sampling fields (
temperature,top_p,max_tokens,presence_penalty,frequency_penalty,seed) are accepted for client compatibility but have no effect. nis the one sampling field that's enforced — values other than1are rejected, since we always return a single completion.stream: truetogether with activetoolsis rejected with400— pick one per request.