Skip to contentSkip to content

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 valuePublic operationCompatible SDK / authentication
openai_chat_completionsPOST /v1/chat/completionsOpenAI SDK; Bearer
openai_responsesPOST /v1/responsesOpenAI SDK; Bearer
openai_embeddingsPOST /v1/embeddingsOpenAI SDK; Bearer
openai_imagesPOST /v1/images/generationsOpenAI SDK; Bearer
anthropic_messagesPOST /v1/messagesAnthropic SDK; x-api-key or Bearer
geminiPOST /v1beta/models/{model}:generateContentGemini SDK; x-goog-api-key or Bearer
videosPOST /v1/videos/generationsHTTP / 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 ​

CapabilityPublic operationUsage
Messages token countingPOST /v1/messages/count_tokensSupports enabled OpenAI, Grok, and Claude paths; Grok uses a local estimate, which cannot replace final billing details
Gemini model catalogGET /v1beta/models, GET /v1beta/models/{model}Returns currently entitled and callable Gemini models
Gemini token countingPOST /v1beta/models/{model}:countTokensUses 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.