SDK overview
Select the OpenAI, Anthropic, or Gemini client SDK according to the protocol and complete pre-integration checks.
AGTCloud provides compatible endpoints for OpenAI, Anthropic, and Gemini. Server applications that already use one of these provider SDKs can usually keep their primary calling method and replace the API address, API Key, and model ID with AGTCloud values.
SDKs can only be organized according to their corresponding protocol requirements. Before choosing, please confirm which protocol your target model supports; do not judge compatibility solely by model name.
Select the client SDK
| SDK | Supported protocols | Authentication | Best suited for |
|---|---|---|---|
| OpenAI SDK | Chat Completions, Responses | Bearer API Key | Existing OpenAI SDK applications, message-based conversations, Typed Items, streaming output, and tool calls |
| Anthropic SDK | Anthropic Messages | x-api-key with a version header | Existing Anthropic Messages applications, Content Blocks, and Anthropic tool structures |
| Gemini SDK | Gemini Generate Content | Bearer API Key | Existing Gemini SDK applications and native contents and parts structures |
SDKs do not automatically convert protocols
OpenAI messages or input, Anthropic Content Blocks, and Gemini contents and parts are different data structures. Follow the guide for the protocol already used by your application. If you need to refactor across protocols, first read Provider SDK migration.
The main differences among the three protocols
| Comparison | OpenAI SDK | Anthropic SDK | Gemini SDK |
|---|---|---|---|
| Primary endpoint | Chat Completions, Responses | Messages | Generate Content |
| Conversation input | messages or input | messages with Content Blocks | contents and parts |
| Standard text output | Chat message or Responses output items | content blocks | candidates[].content.parts |
| Streaming format | Chat deltas or response.* events | Messages SSE events | Stream Generate Content |
| Tool structure | Function tools and Responses built-in tools | tool_use, tool_result | functionCall, functionResponse |
For complete fields, enums, and response schemas, see the corresponding API Reference. These SDK guides focus on client installation, initialization, and reading results rather than repeating the complete schema.
Preparation before access
Create an API Key
Go to the API Keys page, create an AGTCloud API Key, and store it in a server-side environment variable or secret management service.
Do not write the real API Key into browser code, mobile installation packages, public repositories, screenshots, or logs.
Confirm the model and protocol
Copy the complete model ID in the Model Marketplace and confirm that the model supports protocols and capabilities for use.
These guides use MODEL_ID as a placeholder. Before making a real request, replace it with a model ID available to the current API Key.
Select the server operating environment
Both the Python and TypeScript SDKs should run in trusted server environments. Install the current stable SDK and fix the actual version through the project's dependency lock file.
Recommended verification sequence
- Install the SDK and confirm that the application can read the API Key.
- Configure the Base URL shown in the guide rather than a complete operation endpoint.
- Send a non-streaming request using plain text and minimal fields.
- Check the text results, end status, and token usage.
- Then verify streaming, tools, multimodal, or structured outputs according to business needs.
- Add logging and controlled retries for timeouts, rate limits, and server-side errors.
The existence of protocols does not mean the model supports all capabilities
Different models under the same protocol may have different input modalities, tools, structured outputs, and streaming capabilities. If the requested field is unsupported or the model is unavailable, please first verify the model information and the corresponding API reference.
Next
- Use OpenAI SDK to call Chat Completions or Responses.
- Call Messages using Anthropic SDK.
- Call Generate Content using Gemini SDK.
- For existing provider SDK projects, review the checklist in Provider SDK migration.
- If the request fails, refer to Error and Troubleshooting.