Haiper Inference
Create Job
Replace {{API_TOKEN}}
with your actual token.
Example Request:
curl --location 'https://api.netmind.ai/v1/haiper-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/haiper-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/haiper-job/{{JOB_ID}}' \
--header 'Authorization: Bearer {{API_TOKEN}}'
import requests
url = "https://api.netmind.ai/v1/haiper-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/haiper-job?page=1&page_size=10' \
--header 'Authorization: Bearer {{API_TOKEN}}'
import requests
url = "https://api.netmind.ai/v1/haiper-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/haiper-job/{{JOB_ID}}' \
--header 'Authorization: Bearer {{API_TOKEN}}'
import requests
url = "https://api.netmind.ai/v1/haiper-job/{{JOB_ID}}"
payload = {}
headers = {
'Authorization': 'Bearer {{API_TOKEN}}'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
Example Response:
{}
Last updated
Was this helpful?