Skip to content
Console

API Reference

The 爱玩Ai API is compatible with the official OpenAI / Anthropic / Gemini protocols and uses Bearer tokens — one sk- key works across every endpoint.

  • POST /v1/chat/completions — generates a model reply from a conversation history; OpenAI Chat Completions compatible, with streaming when the model supports it. This is the primary endpoint for OpenAI-compatible clients; streamed responses use SSE, so the client must handle incremental chunks and the final usage; when forwarding, the backend preserves explicit zero and false values the client sends.
  • POST /v1/responses — the OpenAI Responses protocol route; /v1/responses/compact is its slimmed-down variant.
  • POST /v1/messages — the Anthropic-compatible message route.
  • POST /v1 beta/models/{model}: generateContent — the Gemini-compatible route.
  • POST /v1/images/generations — image generation; always returns an image URL rather than base64, see Image generation.
  • POST /v1/embeddings / POST /v1/rerank — embeddings and reranking.
  • GET /v1/models — the list of currently available models.

Full endpoint list:

TypeMethodPath
modelsGET/v1/models
anthropicPOST/v1/messages
embeddingsPOST/v1/embeddings
geminiPOST/v1 beta/models/{model}: generateContent
image-generationPOST/v1/images/generations
jina-rerankPOST/v1/rerank
openaiPOST/v1/chat/completions
openai-responsePOST/v1/responses
openai-response-compactPOST/v1/responses/compact

Compatibility notes:

  • /v1/chat/completions follows OpenAI-compatible chat-completion semantics.
  • /v1/responses follows OpenAI-compatible responses semantics where configured.
  • /v1/messages provides the Anthropic-compatible message route.
  • /v1 beta/models/{model}: generate Content provides the Gemini-compatible route.
  • The models actually available to you depend on the enabled channels, your group, token restrictions and billing configuration.