Quick start
The complete interface, field constraints, and online debugging can be directly opened at /docs of the API service; the machine-readable specification is located at /openapi.json.
1. Get API Key
Log in to the console and create a Key on the "API Keys" page.
The complete Key is only displayed once when it is created. Please keep it properly and only use it on the server side.
2. Create tasks
When creating a task, pass in webhook_url to receive the results, and bring your business ID (such as order number) in the request header Idempotency-Key:
curl -X POST https://api.modelgo.moneygo.ai/v1/images/pose \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order_10086" \
-d '{
"template_id": "pose_office",
"image": "https://example.com/face.jpg",
"webhook_url": "https://your-server.com/webhook"
}'The interface returns to the task immediately, and the status is queued:
{
"id": "task_3kP9xQ2mZ7aB1cD4eF6gH8jK",
"status": "queued",
"output": null
}Idempotency-Key cannot be repeated within the same function. When the request times out, it can be resent as it is and will not be generated repeatedly.
3. Receive Webhook
After the task is completed, we will send the POST request to webhook_url:
{
"timestamp": 1789632021,
"task": {
"id": "task_3kP9xQ2mZ7aB1cD4eF6gH8jK",
"idempotency_key": "order_10086",
"status": "succeeded",
"output": { "images": ["https://cdn.example.com/outputs/abc.png"] }
}
}- Find the corresponding business record through
task.idempotency_key, and return the2xxstatus code after processing. - Please use the key verification request header
X-Webhook-Signatureon the "Webhook" page of the console. For the verification method, see "Webhook Callback".
