Asynchronous Inference
Asynchronous inference is suitable for jobs that involve longer inference times. First, you need to create an generation job. Then, you can check the job status through another interface. Finally, you can download the inference results using the provided download link.
Create generation
Example Request:
curl -X POST 'https://api.netmind.ai/v1/generation' \
--header 'Authorization: {{API_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "Qwen/Qwen-Image",
"config": {
"prompt": "Generate a cup of coffee",
"image_size": "landscape_4_3",
"num_inference_steps": 30,
"guidance_scale": 2.5,
"num_images": 1,
"enable_safety_checker": true,
"output_format": "png",
"acceleration": "none"
}
}'import requests
import json
url = "https://api.netmind.ai/v1/generation"
payload = json.dumps({
"model": "hkchengrex/MMAudio",
"config": {
"prompt": "The summer wind blows over the willow branches.",
"duration": 100
}
})
headers = {
'Authorization': 'Bearer {{API_TOKEN}}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Example Response:
{
"id": "6347623b2fce4998b0e842f7e935ccb0",
"user_id": "....",
"status": "pending",
"created_at": "2025-09-18 09:14:20",
"updated_at": "2025-09-18 09:14:20",
"deleted_at": null,
"is_deleted": false,
"result": {}
}Get generation
Example Request:
curl -X GET 'https://api.netmind.ai/v1/generation/{{GENERATION_ID}}' \
--header 'Authorization: {{API_TOKEN}}'import requests
url = "https://api.netmind.ai/v1/generation/{{GENERATION_ID}}"
headers = {
'Authorization': 'Bearer {{API_TOKEN}}'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
Example Response:
{
"id": "6347623b2fce4998b0e842f7e935ccb0",
"user_id": "....",
"status": "completed",
"created_at": "2025-09-18 09:14:21",
"updated_at": "2025-09-18 09:27:32",
"deleted_at": null,
"is_deleted": false,
"result": {
"data": [
{
"url": "https://netmind-files-prod.s3.amazonaws.com/....",
"file_id": "file-srcf4srhx...",
"file_name": "",
"file_type": "image"
}
]
}
}Now you can view or download you generated video through "result.data".
List generations
Example Request:
curl -X GET 'https://api.netmind.ai/v1/generation' \
--header 'Authorization: {{API_TOKEN}}'import requests
url = "https://api.netmind.ai/v1/generation"
headers = {
'Authorization': 'Bearer {{API_TOKEN}}'
}
response = requests.request("GET", url, headers=headers)
print(response.text)
Example Response:
{
"generation_list": [
{
"id": "6347623b2fce4998b0e842f7e935ccb0",
"user_id": "....",
"status": "completed",
"created_at": "2025-09-18 09:14:21",
"updated_at": "2025-09-18 09:27:32",
"deleted_at": null,
"is_deleted": false,
"result": {
"data": [
{
"url": "https://netmind-files-prod.s3.amazonaws.com/....",
"file_id": "file-srcf4srhx...",
"file_name": "",
"file_type": "image"
}
]
}
}
]
}Delete generation
Example Request:
curl -X DELETE 'https://api.netmind.ai/v1/generation/{{GENERATION_ID}}' \
--header 'Authorization: {{API_TOKEN}}'import requests
url = "https://api.netmind.ai/v1/generation/{{GENERATION_ID}}"
headers = {
'Authorization': 'Bearer {{API_TOKEN}}'
}
response = requests.request("DELETE", url, headers=headers)
print(response.text)
Example Response:
{
"message": "Generation deleted"
}Last updated
Was this helpful?