> For the complete documentation index, see [llms.txt](https://netmind-power.gitbook.io/netmind-power-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://netmind-power.gitbook.io/netmind-power-documentation/api/inference/asynchronous-inference.md).

# 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

{% hint style="info" %}
Replace `{{API_TOKEN}}` with your actual token.
{% endhint %}

**Example Request:**

{% tabs %}
{% tab title="Curl" %}

```bash
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"
    }
}'
```

{% endtab %}

{% tab title="Python" %}

```python
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)

```

{% endtab %}
{% endtabs %}

**Example Response:**

```json
{
    "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

{% hint style="info" %}
Replace `{{API_TOKEN}}` with your actual token.

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

**Example Request:**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X GET 'https://api.netmind.ai/v1/generation/{{GENERATION_ID}}' \
--header 'Authorization: {{API_TOKEN}}'
```

{% endtab %}

{% tab title="Python" %}

```python
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)

```

{% endtab %}
{% endtabs %}

**Example Response:**

```json
{
    "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

{% hint style="info" %}
Replace `{{API_TOKEN}}` with your actual token.
{% endhint %}

**Example Request:**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X GET 'https://api.netmind.ai/v1/generation' \
--header 'Authorization: {{API_TOKEN}}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.netmind.ai/v1/generation"
headers = {
   'Authorization': 'Bearer {{API_TOKEN}}'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

```

{% endtab %}
{% endtabs %}

**Example Response:**

```json
{
    "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

{% hint style="info" %}
Replace `{{API_TOKEN}}` with your actual token.

Replace `{{GENERATION_ID}}` with "job\_id" you got from previous step.
{% endhint %}

**Example Request:**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X DELETE 'https://api.netmind.ai/v1/generation/{{GENERATION_ID}}' \
--header 'Authorization: {{API_TOKEN}}'
```

{% endtab %}

{% tab title="Python" %}

```python
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)

```

{% endtab %}
{% endtabs %}

**Example Response:**

```json
{
    "message": "Generation deleted"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://netmind-power.gitbook.io/netmind-power-documentation/api/inference/asynchronous-inference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
