List_models
/v1/modelsAuthorization
bearerAuth In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/models"{ "data": [ { "can_reason": true, "context_window": 1000000, "created": 0, "default_max_tokens": 126000, "default_reasoning_effort": "string", "id": "claude-opus-4-7", "object": "model", "owned_by": "anthropic", "pricing": { "cache_read_per_mtok": 0.5, "cache_write_per_mtok": 6.25, "currency": "USD", "input_per_mtok": 5, "output_per_mtok": 25 }, "reasoning_levels": [ "string" ], "supports_attachments": true } ], "object": "list"}{ "error": { "message": "model not supported: foo", "type": "invalid_request_error" }}{ "error": { "message": "model not supported: foo", "type": "invalid_request_error" }}AI SDK UI Message Stream chat (streaming-only) POST
Vercel AI SDK–native chat endpoint, parallel to `/v1/chat/completions`. Accepts a `UIMessage[]` body and streams the AI SDK **UI Message Stream** protocol (typed `data: {"type":…}` chunks under `x-vercel-ai-ui-message-stream: v1`, terminated by `data: [DONE]`). Point `useChat` / `DefaultChatTransport` at it. Streaming-only: `stream: false` returns 400. Top-level fields (`model`, `reasoning_effort`, `tools`, `tool_choice`, `stop`, `temperature`, `top_p`, `max_tokens`, `stream_options`) are identical to `/v1/chat/completions`; only `messages` takes the AI SDK shape. **Client-side tools only** in v1 — the gateway emits `tool-input-*` (the model's call); clients execute tools and replay results as `tool-<name>` parts with `state: "output-available"`. Reasoning replays via `reasoning` parts; `providerMetadata` round-trips the replay payload. See `docs/llm-gateway/AISDK.md` for the chunk union and multi-turn replay contract.
Overview
Next Page