Quick Start
Complete your first text, image, and video request with Magick API
Magick API Official Developer Documentation
Welcome to Magick API. This page, based on the organized source documentation, provides the shortest integration path to help you complete your first call.
Tip: You only need to replace the domain and API KEY with Magick API's to migrate seamlessly with zero code changes!
- Domain: "https://api.magickapi.com", fully compatible with OpenAI-style interfaces
- API KEY: Generate in the dashboard
Step 1: Obtain an API Key
- Open the API Key Management page.
- Log in to your account and create a new API Key.
- Keep the key secure. Pass it in subsequent calls via
Authorization: Bearer YOUR_API_KEY.
Step 2: Choose an Interface Type
Text and most image interfaces typically return results synchronously; video interfaces use an asynchronous task model, returning id / task_id upon successful submission.
General Models
Suitable for text generation, multi-turn conversations, multimodal input, and tool calls.
Image Generation Models
Suitable for text-to-image, image-to-image, inpainting, and multi-reference image generation.
Video Models
Suitable for text-to-video, first-frame / first-and-last-frame video generation, and video continuation.
Step 3: Send a Request
Text Generation Example
curl -X POST https://api.magickapi.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "user",
"content": "帮我调查并推荐一个最适合编码的大模型"
}
]
}'Image Generation Example
curl -X POST https://api.magickapi.com/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "可爱的猫咪坐在劳斯莱斯后座上哭",
"size": "1:1",
"n": 1
}'Video Generation Example
curl -X POST https://api.magickapi.com/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "一个小女孩坐在窗台欣赏春风吹动的柳树",
"duration": 8,
"size": "1280x720"
}'Step 4: Query Task Status
After the video interface returns id / task_id, poll it through the OpenAI-compatible video task endpoint:
curl -X GET https://api.magickapi.com/v1/videos/YOUR_TASK_ID \
-H "Authorization: Bearer YOUR_API_KEY"After the task is completed, download the video content:
curl -L https://api.magickapi.com/v1/videos/YOUR_TASK_ID/content \
-H "Authorization: Bearer YOUR_API_KEY" \
--output output.mp4It is recommended to wait 5 to 10 seconds after submission before starting to poll, then query every 3 to 5 seconds.
Next Steps
- Text conversation interface: Start with General Chat Interface (Default Streaming).
- OpenAI Responses: Read OpenAI Responses Multimodal Interface.
- Image generation: Read GPT-Image-2 Image Generation.
- Video generation: Read VEO3 Video Generation.
Last updated on