Select access protocol

Differentiate between Chat, Responses, Anthropic Messages and Gemini native formats.

Select by applying existing protocols

Scenario Interface Request core fields
Normal OpenAI compatible chat POST /v1/chat/completions model, messages
Responses Client POST /v1/responses model, input
Anthropic Client POST /v1/messages model, messages, max_tokens
Gemini native client POST /v1beta/models/{model}:generateContent contents
OpenAI format image POST /v1/images/generations Fill in the image parameters according to the model
Asynchronous video POST /v1/videos Fill in video parameters according to model

Compatible range

The existence of a path does not mean that the model supports the path. Tool calling, inference parameters, images, search, and status management all require support from models and channels at the same time. First complete a simple call using the target protocol, and then verify the scalability.

Chat’s messages cannot be directly used as a complete request in Responses; Gemini’s contents and Anthropic’s content blocks cannot be mixed together as they are after changing the URL. When the application supports multiple service provider types, choose the one consistent with the verified interface of this site.

Base URL and full endpoint

OpenAI SDK usually configures the root address plus /v1; for handwritten HTTP, fill in the complete path. The base address of the Anthropic SDK is usually the site root address, spelled out by SDK /v1/messages. If /v1/v1/ appears, give priority to correcting the base address instead of adding proxy rules.

First determine the fields and paths that the application actually sends, and then select the model. Save a minimum successful request and add only one capability at a time: streaming, tools, graphics, or inference. Each step checks the end status and call record.

Client fields Common values Final request
OpenAI Base URL https://dunduntoken.com/v1 /v1/chat/completions or /v1/responses
Anthropic Base URL https://dunduntoken.com /v1/messages
Gemini includes version base address https://dunduntoken.com/v1beta /v1beta/models/{id}:generateContent
Complete Endpoint Complete URL including actual method path No need to append the second path

The above are common client conventions, which are ultimately confirmed by requesting preview or desensitization logs. Some Gemini SDKs have their own additional versions and cannot be filled in mechanically.

Determine protocol mismatch

If missing messages, missing input or contents field errors occur, check the request body; if 404 occurs, check the final address; if the text succeeds but the tool fails, check the model capabilities and tool structure. Do not convert complex multi-round protocols by replacing field names in the proxy.

Chat Example · Responses Example · Messages Example · Gemini Example