NetMind Power Documentation
  • NetMind Account
  • Inference
    • Model APIs
    • Dedicated Endpoints
  • Fine-tuning
  • Rent GPUs
    • Cloud Sync
    • Use Ngrok as Ingress Service
  • Rent Cluster (Comming soon)
  • API
    • API token
    • Files
    • Fine-tuning
      • List Models
      • Preparing your dataset
      • Create Job
      • Retrieve job
      • Download model
      • Cancel job
      • Deploy Checkpoint (coming soon)
    • Inference
      • Chat
      • Images
      • Haiper Inference
      • Asynchronous Inference
      • Dedicated Endpoints
      • Batch Processing
      • Embedding API
      • Deprecated Models
    • Rent GPU
      • SSH Authentication
      • List Available images
      • List Available GPU Instances
      • Create Your First Environment
      • Stop GPU instace
    • API Reference
      • Files
      • Fine-tuning
      • Rent GPU
Powered by GitBook
On this page
  • Create Job
  • Get Job
  • List Job
  • Delete Inference Job

Was this helpful?

  1. API
  2. Inference

Haiper Inference

Create Job

Replace {{API_TOKEN}} with your actual token.

Example Request:

curl --location 'https://api.netmind.ai/v1/netmind-video-job' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{API_TOKEN}}' \
--data '{ 
      "job_type":"text2video",
      "config": {
        "prompt": "A sci-fi and historical drama that tells the story of a time traveler’s experiences across different historical periods and how they influence major events."
      }  
}'
import requests
import json

url = "https://api.netmind.ai/v1/netmind-video-job"

payload = json.dumps({
  "job_type": "text2video",
  "config": {
    "prompt": "A sci-fi and historical drama that tells the story of a time traveler’s experiences across different historical periods and how they influence major events."
  }
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {{API_TOKEN}}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
    "job_id": "...",
    "user_id": "...",
    "name": "",
    "description": "",
    "payment_type": "usd",
    "status": "initializing",
    "meta_info": {
        "original_request": {
            "job_type": "text2video",
            "config": {
                "prompt": "A sci-fi and historical drama that tells the story of a time traveler’s experiences across different historical periods and how they influence major events.",
                "negative_prompt": null,
                "settings": {
                    "seed": -1,
                    "aspect_ratio": "16:9",
                    "resolution": 720,
                    "duration": 4
                },
                "gen_mode": "standard",
                "is_public": true,
                "use_ff_cond": null,
                "is_enable_prompt_enhancer": null
            }
        },
        "netmind_api_token": {
            "api_token": "...",
            "api_token_id": 0,
            "user": {
                "user_id": "...",
                "nickname": ".@..",
                "currency": "USD"
            }
        },
        "model_id": 81
    },
    "created_at": "2024-12-10T15:14:12.445307",
    "updated_at": "2024-12-10T15:14:12.445312",
    "deleted_at": null,
    "is_deleted": false,
    "outputs": {}
}

Get Job

Replace {{API_TOKEN}} with your actual token.

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

Example Request:

curl --location 'https://api.netmind.ai/v1/netmind-video-job/{{JOB_ID}}' \
--header 'Authorization: Bearer {{API_TOKEN}}'
import requests

url = "https://api.netmind.ai/v1/netmind-video-job/{{JOB_ID}}"

payload = {}
headers = {
  'Authorization': 'Bearer {{API_TOKEN}}'
}

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

print(response.text)

Example Response:

{
    "job_id": "...",
    "user_id": "...",
    "name": "",
    "description": "",
    "payment_type": "usd",
    "status": "succeed",
    "meta_info": {
        "model_id": 0,
        "order_id": "...",
        "update_at": "2024-12-10 15:18:27",
        "original_request": {
            "config": {
                "prompt": "A sci-fi and historical drama that tells the story of a time traveler’s experiences across different historical periods and how they influence major events.",
                "gen_mode": "standard",
                "settings": {
                    "seed": -1,
                    "duration": 4,
                    "resolution": 720,
                    "aspect_ratio": "16:9"
                },
                "is_public": true,
                "use_ff_cond": null,
                "negative_prompt": null,
                "is_enable_prompt_enhancer": null
            },
            "job_type": "text2video"
        },
        "netmind_api_token": {
            "user": {
                "user_id": "...",
                "currency": "USD",
                "nickname": ".@.."
            },
            "api_token": "...",
            "api_token_id": 0
        }
    },
    "created_at": "2024-12-10T15:14:12",
    "updated_at": "2024-12-10T15:14:12",
    "deleted_at": null,
    "is_deleted": false,
    "outputs": [
        {
            "id": "...",
            "media_url": "https://....mp4",
            "thumbnail_url": "https://....mp4.thumbnail"
        }
    ]
}

Now you can view or download you generated video through "outputs[].media_url".

List Job

Replace {{API_TOKEN}} with your actual token.

Example Request:

curl --location 'https://api.netmind.ai/v1/netmind-video-job?page=1&page_size=10' \
--header 'Authorization: Bearer {{API_TOKEN}}'
import requests

url = "https://api.netmind.ai/v1/netmind-video-job?page=1&page_size=10"

payload = {}
headers = {
  'Authorization': 'Bearer {{API_TOKEN}}'
}

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

print(response.text)

Example Response:

{
    "total_count": 1,
    "job_list": [
        {
            "job_id": "...",
            "user_id": "...",
            "name": "",
            "description": "",
            "payment_type": "usd",
            "status": "succeed",
            "meta_info": {
                "model_id": 0,
                "order_id": "...",
                "update_at": "2024-12-10 15:18:27",
                "original_request": {
                    "config": {
                        "prompt": "A sci-fi and historical drama that tells the story of a time traveler’s experiences across different historical periods and how they influence major events.",
                        "gen_mode": "standard",
                        "settings": {
                            "seed": -1,
                            "duration": 4,
                            "resolution": 720,
                            "aspect_ratio": "16:9"
                        },
                        "is_public": true,
                        "use_ff_cond": null,
                        "negative_prompt": null,
                        "is_enable_prompt_enhancer": null
                    },
                    "job_type": "text2video"
                },
                "netmind_api_token": {
                    "user": {
                        "user_id": "...",
                        "currency": "USD",
                        "nickname": ".@.."
                    },
                    "api_token": "...",
                    "api_token_id": 0
                }
            },
            "created_at": "2024-12-10T15:14:12",
            "updated_at": "2024-12-10T15:14:12",
            "deleted_at": null,
            "is_deleted": false,
            "outputs": [
                {
                    "id": "...",
                    "media_url": "https://....mp4",
                    "thumbnail_url": "https://....mp4.thumbnail"
                }
            ]
        }
    ]
}

Delete Inference Job

Replace {{API_TOKEN}} with your actual token.

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

Example Request:

curl --location --request DELETE 'https://api.netmind.ai/v1/netmind-video-job/{{JOB_ID}}' \
--header 'Authorization: Bearer {{API_TOKEN}}'
import requests

url = "https://api.netmind.ai/v1/netmind-video-job/{{JOB_ID}}"

payload = {}
headers = {
  'Authorization': 'Bearer {{API_TOKEN}}'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

Example Response:

{}
PreviousImagesNextAsynchronous Inference

Last updated 16 days ago

Was this helpful?