Gateway
Every public route of ai.codai.ro, grouped the way the code groups them.
Base URL https://ai.codai.ro, bearer auth with a codai_ key, JSON in and out (SSE where noted). The groups below map one-to-one onto the route files of the gateway; each page mounts the operations of its group with a live try-it panel.
| Group | What it covers |
|---|---|
| Chat & Completions | POST /v1/chat/completions, /v1/messages, /v1/responses — the three wire formats |
| Embeddings & Audio | Embeddings, speech-to-text, text-to-speech, ephemeral realtime tokens |
| Models | GET /v1/models |
| Agents | Synchronous and async agent runs, steps, SSE stream, cancel |
| Tools | Verified web search and safe page fetch |
| Tasks | Outcome-billed tasks and confirmation |
| Sessions | Shared-sessions protocol v2: events, controls, lease, dispatch, stream |
| Devices | Devices bound to the account and the dispatch inbox |
| Hosts | Phone → desktop exec relay |
| Orgs & Sharing | Session shares, orgs and members |
| Account | Account card, consents, receipts, feedback, on-device model catalog |
| Health | Unauthenticated probes at the root |
Not in this reference, on purpose: /internal/** (service-to-service, secret-gated), /metrics (Prometheus scrape, VPC-only), /vscode/** and /copilot/** (editor config discovery documented in the clients guide), /mcp and /.well-known/oauth-protected-resource (MCP-as-server plumbing) and the legacy read-only GET /v1/sessions[/{sessionKey}] shape that clients without an x-codai-device header still receive. The realtime WebSocket wss://ai.codai.ro/v1/realtime cannot be expressed in OpenAPI; its contract is in the streaming guide.