AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help

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

SDKSupported protocolsAuthenticationBest suited for
OpenAI SDKChat Completions, ResponsesBearer API KeyExisting OpenAI SDK applications, message-based conversations, Typed Items, streaming output, and tool calls
Anthropic SDKAnthropic Messagesx-api-key with a version headerExisting Anthropic Messages applications, Content Blocks, and Anthropic tool structures
Gemini SDKGemini Generate ContentBearer API KeyExisting 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

ComparisonOpenAI SDKAnthropic SDKGemini SDK
Primary endpointChat Completions, ResponsesMessagesGenerate Content
Conversation inputmessages or inputmessages with Content Blockscontents and parts
Standard text outputChat message or Responses output itemscontent blockscandidates[].content.parts
Streaming formatChat deltas or response.* eventsMessages SSE eventsStream Generate Content
Tool structureFunction tools and Responses built-in toolstool_use, tool_resultfunctionCall, 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.

  1. Install the SDK and confirm that the application can read the API Key.
  2. Configure the Base URL shown in the guide rather than a complete operation endpoint.
  3. Send a non-streaming request using plain text and minimal fields.
  4. Check the text results, end status, and token usage.
  5. Then verify streaming, tools, multimodal, or structured outputs according to business needs.
  6. 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

On this page