use-case
API endpoint and capability matrix
Direct answerConfirm the exact model and enabled endpoint in the marketplace first, then select a protocol here. A registered route only means the gateway recognizes it, not that every model or channel supports it.
Updated · Reviewed
Beginner: path, model, and channel are separate
A path selects a request contract, a model ID selects a capability, and a channel selects the upstream destination. All three must match. Start in the model marketplace, find the exact ID and its enabled endpoints, then choose a route below. A provider offering image models does not mean every image model works through a chat endpoint.
| Capability | Main gateway entry | Transport and result |
|---|---|---|
| Model discovery | GET /v1/models | JSON list for the current token |
| Text | POST /v1/chat/completions, POST /v1/responses | JSON or SSE |
| Claude | POST /v1/messages | JSON or Claude SSE |
| Gemini | POST /v1beta/models/{model}:generateContent | JSON; streaming differs |
| Retrieval | POST /v1/embeddings, POST /v1/rerank | Synchronous JSON |
| Images | POST /v1/images/generations, POST /v1/images/edits | URL or Base64 |
| Audio | POST /v1/audio/speech, transcriptions, translations | JSON, multipart, or binary |
| Video | POST /v1/videos, POST /v1/video/generations | Create and poll a task |
| Realtime | GET /v1/realtime | WebSocket, not SSE |
| Generic async | POST /async/*, GET /get-async?id=... | Queue, poll, result envelope |
Minimal discovery request
Use the same site token planned for production. Presence in this response still does not prove support on every endpoint, so follow it with one inexpensive contract request.
curl "$BASE_URL/v1/models" -H "Authorization: Bearer $API_KEY"
Registered but unsupported
/v1/files, /v1/images/variations, and legacy fine-tunes routes currently return not implemented. Registration provides a deterministic error; it is not a capability promise. Documentation must distinguish an HTTP route, an upstream feature, and a gateway channel adaptation.
Intermediate verification
Record path, exact model, Request-ID, HTTP status, response object type, and usage. For 404, check spelling, token visibility, and endpoint adaptation. For 400, validate the schema. For 401 or 403, inspect the site token. For 429, distinguish request rate, token throughput, quota, and balance.
Expert contract
Maintain an allowlist rather than concatenating arbitrary paths. For every capability, record method, content type, sync or async behavior, streaming, terminal states, body limits, result retention, retryable errors, and billing unit. Run a contract test against the real model whenever a channel or protocol changes; replacing only the base URL is never sufficient.
Use cases
- Choose text, media, and retrieval routes
- Separate implemented, unsupported, and channel-specific behavior
API protocols
/v1/models/v1/chat/completions/v1/responses/v1/messages/v1/embeddings/v1/rerank/v1/images/generations/v1/audio/speech/v1/videos
FAQ
Can I call a path just because it exists?
No. The model must be visible to the token, a channel must be enabled, and that channel must adapt the endpoint. The marketplace owns live availability and pricing.
Why do capability pages not repeat provider-wide endpoints?
Text, image, video, audio, and retrieval capabilities can use different protocols. Broadcasting a provider route would mislabel media models as chat-compatible.
Is /v1/files supported?
No. It currently returns not implemented. Supply files through the target endpoint using a supported URL, Base64, data URL, or multipart form.
Related guides
Official sources
- OpenAI API Reference Official
- Claude Messages API Official
- Gemini API Reference Official
兔子API