Choose a protocol
Choose a language-model protocol based on your existing application and the capabilities you need to preserve.
AGTCloud supports multiple language-model protocols. You can keep the SDK and request structure already used by your application, or choose another protocol for the capabilities your application needs.
Start with OpenAI Chat for your first integration
If you do not have a specific SDK or protocol requirement, use OpenAI Chat Completions for your first request.
What is an API protocol?
An API protocol defines the request URL, authentication method, request fields, response structure, and streaming event format. Each protocol uses a different data structure, so the client must send requests and parse responses according to the selected protocol.
This page covers language-model protocols only. It does not cover image, video, or audio APIs.
How to choose
The protocol determines how request fields, responses, and streaming events are organized. The model determines the AI capabilities available to the request. Use the following order when choosing a protocol:
Keep your current integration style
Existing applications can keep the protocol used by their current SDK to minimize request and response parsing changes.
Identify the capabilities you need
If your application depends on a particular content structure, tool-calling format, reasoning data, or state-management model, choose a protocol that can represent those fields.
Confirm model availability
Check the target model and account access in the model marketplace, then follow the corresponding API Reference.
Supported protocols
| Protocol | Best for | Main structure | API Reference |
|---|---|---|---|
| OpenAI Chat Completions | General chat or existing OpenAI Chat applications | messages, choices | Chat Completions |
| OpenAI Responses | Applications built around the Responses request model | input, Response Items | OpenAI Responses |
| Anthropic Messages | Applications using the Anthropic SDK or Messages structure | messages, Content Blocks | Anthropic Messages |
| Gemini Generate Content | Applications using the Gemini SDK or Contents/Parts structure | contents, Parts | Gemini Generate Content |
Field names and response structures differ across protocols. Build requests and parse responses according to the API Reference for the selected endpoint; do not mix fields from different protocols.
Endpoints
The following URLs update automatically for the current site:
Endpoint:
POST https://api.agtcloud.cn/v1/chat/completionsEndpoint:
POST https://api.agtcloud.cn/v1/responsesEndpoint:
POST https://api.agtcloud.cn/v1/messagesEndpoint:
POST https://api.agtcloud.cn/v1beta/models/{model}:generateContent
Common scenarios
- Existing OpenAI Chat application: choose Chat Completions.
- Existing OpenAI Responses application: choose OpenAI Responses.
- Existing Anthropic SDK application: choose Anthropic Messages.
- Existing Gemini SDK application: choose Gemini Generate Content.
- No existing integration: start with a minimal Chat Completions request.
AGTCloud supports protocol conversion, but protocol conversion does not guarantee 100% parameter compatibility.
Before you integrate
- Confirm the model ID and account access in the model marketplace.
- Confirm the endpoint, authentication method, and request fields in the corresponding API Reference.
- Test the standard request, streaming output, or tool calls used by your application in a test environment.