For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Replace {{API_TOKEN}} with your actual token.

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:

Get generation

Replace {{API_TOKEN}} with your actual token.

Replace {{GENERATION_ID}} with "id" you got from previous step.

Example Request:

Example Response:

Now you can view or download you generated video through "result.data".

List generations

Replace {{API_TOKEN}} with your actual token.

Example Request:

Example Response:

Delete generation

Replace {{API_TOKEN}} with your actual token.

Replace {{GENERATION_ID}} with "job_id" you got from previous step.

Example Request:

Example Response:

Last updated