Protocol and SDK support
Check each model's protocols, capabilities, streaming support, and rates in the model catalog, then call GET /v1/models with your credential to confirm accessible models. The catalogs serve different purposes: GET /api/v1/public/models supplies public capability details; /v1/models returns OpenAI-compatible object and data, with id, object, created, and owned_by on model entries. It does not return protocols. Never infer protocol support from a model name.
Use an AICredits API key or a short-lived Embedded token for the data API. Keys issued by other model services cannot authenticate to the platform. The official SDKs use Bearer; compatible SDKs can carry the same platform credential as shown below.
protocols value | Public operation | Compatible SDK / authentication |
|---|---|---|
openai_chat_completions | POST /v1/chat/completions | OpenAI SDK; Bearer |
openai_responses | POST /v1/responses | OpenAI SDK; Bearer |
openai_embeddings | POST /v1/embeddings | OpenAI SDK; Bearer |
openai_images | POST /v1/images/generations | OpenAI SDK; Bearer |
anthropic_messages | POST /v1/messages | Anthropic SDK; x-api-key or Bearer |
gemini | POST /v1beta/models/{model}:generateContent | Gemini SDK; x-goog-api-key or Bearer |
videos | POST /v1/videos/generations | HTTP / official gateway SDK; Bearer |
Gemini ?key= authentication is accepted only under /v1beta; prefer headers to keep credentials out of URL logs. SDK badges indicate protocol compatibility, not endorsement or identical parameters, tool behavior, or outputs across models.
Protocol compatibility across models
- OpenAI and Claude: alongside their familiar request formats, the platform provides Messages compatibility for OpenAI models and Chat Completions / Responses compatibility for Claude. Use only protocols declared in the public catalog.
- Gemini: native generation, streaming, token counting, and model lookup, plus Messages / Chat compatibility paths. See Gemini integration.
- Grok: Chat, Responses, and Messages compatibility, plus image and video generation for configured models.
- DeepSeek, Kimi and MiniMax: Chat / Messages / Responses compatibility paths are implemented; choose published models from the catalog.
- Zhipu GLM: Chat / Messages paths are implemented. Responses is not implemented.
The Chinese model guide covers discovery, reasoning options, multi-turn tools and streaming for all four families. SDK listPublicModels returns public protocols and rates; intersect exact IDs with authenticated listModels before choosing a model.
Implemented interfaces still require current plan entitlements, enabled models, and applicable rates. Request-time authorization is authoritative; a catalog result is not an availability guarantee.
Token counting and model lookup
| Capability | Public operation | Usage |
|---|---|---|
| Messages token counting | POST /v1/messages/count_tokens | Supports enabled OpenAI, Grok, and Claude paths; Grok uses a local estimate, which cannot replace final billing details |
| Gemini model catalog | GET /v1beta/models, GET /v1beta/models/{model} | Returns currently entitled and callable Gemini models |
| Gemini token counting | POST /v1beta/models/{model}:countTokens | Uses the native Gemini request shape; permissions and model configuration still apply |
Token counting does not run generation. Platform records determine actual usage and cost after generation. See the quickstart for examples.
SDK coverage and limits
Official SDK 0.3.0 provides TypeScript, Swift, and Kotlin gateway wrappers, plus Embedded balance, transaction, purchase, and support APIs. TypeScript supports Chat, Responses, Messages, and Gemini SSE; Swift/Kotlin currently provide non-streaming JSON calls.
- Responses HTTP requests do not support
previous_response_id; pass conversation context explicitly. WebSocket / Realtime are outside the current SDK scope. - Image generation accepts JSON; multipart edits and streaming image events are not supported.
- Video edits, status lookup, content download, asynchronous polling, and delayed settlement are not available. A pending response is not a completed asset or a final charge.
- Ollama Cloud is still in development. Subscription OAuth is not publicly available.
Stream endings differ by protocol; see streaming and cancellation.