API address and interface overview

Confirm the request URL, method, authentication header and various interface boundaries.

Unified address

API root address: https://dunduntoken.com. OpenAI compatible SDK Base URL: https://dunduntoken.com/v1. Unless otherwise noted, use Authorization: Bearer <API_KEY>; JSON requests also require Content-Type: application/json.

Method Path Purpose
GET /v1/models Available models
POST /v1/chat/completions Dialogue
POST /v1/responses Responses
POST /v1/messages Anthropic Messages
POST /v1beta/models/{model}:generateContent Gemini native generation
POST /v1beta/models/{model}:streamGenerateContent Gemini native streaming generation
POST /v1/images/generations Image generation
POST /v1/images/edits Picture editing
POST /v1/videos Create video task
GET /v1/videos/{id} Query video tasks
GET /v1/videos/{id}/content Get video content
POST /v1/audio/transcriptions Voice to text
POST /v1/audio/translations Audio translation
POST /v1/audio/speech Text to Speech
POST /v1/embeddings Vector
POST /v1/rerank Reorder

Supported interfaces should not be assumed

The Files, Fine-tunes, and Image variations routes in the current implementation do not provide full functionality; do not call corresponding methods simply because they exist in the OpenAI SDK. Model parameter query, supplier material library, and other gateway-specific management interfaces cannot be used by default.

Native and unified media endpoints

Videos and some pictures are provided by task plug-ins. Administrators need to enable plug-ins, channels, models and price configurations. Native vendor paths and unified paths may coexist, but the schemas are different and the request must be constructed according to the selected protocol.

All content downloads and polling should comply with the authentication requirements for return addresses and not attach API keys to untrusted third-party domains.

Actual access steps

  1. Select a text path based on the client protocol.
  2. Use the same Key to query the model and complete minimal generation.
  3. Check the response structure, end reason and call record.
  4. Then connect the stream, tool, media or vector.

HTTP Conventions

Set the Content-Type of the handwritten JSON request, use multipart to upload the file and hand it over to the HTTP library to generate the boundary. The model or task ID in the path must come from the return or allowed list of this site and should not be spliced ​​into any user URL. Authentication information is placed in the request header, not the URL.

Model details can be queried for basic objects via GET /v1/models/{model}; this is different from the non-existent generic parameter query interface. The native plug-in query returns a different package than the unified task query, and must follow the protocol selected when creating it.

Full SDK · Picture · Video · Audio