Quickstart
Create an API key and send your first text, image, and video requests.
Create an API key and use these minimal examples to send text, image, and video requests.
Step 1: Create an account
Register an account with AGTCloud; if you already have one, sign in directly.
Step 2: Get an API key
- Open API Keys.
- Select Create API Key.
- Copy the API key and store it securely.
Keep your API key secure
Never expose a complete API key in browser code, public repositories, screenshots, or logs. Revoke a key immediately if it may have been exposed.

Step 3: Check your balance
API calls consume account balance. Before sending a request, open Billing and top-up and confirm that your account has available credit. Available top-up methods and crediting results are shown in the console.
Step 4: Send your first API requests
The examples use the current site's API address and configured example models. Confirm model access in the Model marketplace before calling an endpoint.
Chat with an LLM
The Chat Completions-compatible API can be called with the OpenAI SDK or an HTTP request.
from openai import OpenAI
client = OpenAI(
api_key="your-api-key",
base_url="https://api.agtcloud.cn/v1",
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[
{"role": "user", "content": "What can you help me build?"}
],
)
print(response.choices[0].message.content)The generated text is returned in choices[0].message.content. See Chat Completions for request and response details.
Generate an image
curl 'https://api.agtcloud.cn/v1/images/generations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer your-api-key' \
--data '{
"model": "qwen-image",
"prompt": "A futuristic city floating above a sea of clouds"
}'Generate a video
curl 'https://api.agtcloud.cn/v1/video/generations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer your-api-key' \
--data '{
"model": "doubao-seedance-2-5-260628",
"prompt": "A spacecraft flying through a blue nebula"
}'After the request succeeds, save the returned task_id, then query the task status and result:
curl 'https://api.agtcloud.cn/v1/video/generations/your-task-id' \
-H 'Authorization: Bearer your-api-key'See Create video and Retrieve video for complete fields and task states.
Protect production credentials
your-api-key marks the value you must replace. Read production keys from a server-side environment variable or secret manager; never ship them to a browser.
To test a request in your browser, open the Playground.
Step 5: Explore models
Browse the Model marketplace and confirm each model's supported protocol, parameters, and account access before using it.
Next steps
- Image generation — Learn how to generate and edit images.
- Video generation — Learn how to create and retrieve video tasks.
- Audio — Learn how to synthesize speech, transcribe audio, and translate audio.
- Third-party integrations — Integrate AGTCloud with common development tools.
- Errors and troubleshooting — Resolve common request errors.