Quick Start
Get a first HiAPI request working in about 3 minutes.
Base URL:
https://api.hiapi.ai-
Get your API key
Sign up at hiapi.ai, then go to Dashboard → API Keys to create a new key for your test environment.
-
Add funds
Go to Dashboard → Billing to add funds. New accounts usually receive enough trial balance to verify the flow.
-
Create a task
All models — image, video, audio — go through the unified
POST /v1/tasksendpoint. It returns ataskIdimmediately.Terminal window curl -X POST https://api.hiapi.ai/v1/tasks \-H "Authorization: Bearer YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "happyhorse-1-0","input": {"prompt": "a cyan glass data center entrance","duration": 5,"resolution": "720p"}}'# => { "code": 200, "data": { "taskId": "tk-hiapi-..." } }import requestsresp = requests.post("https://api.hiapi.ai/v1/tasks",headers={"Authorization": "Bearer YOUR_API_KEY"},json={"model": "happyhorse-1-0","input": {"prompt": "a cyan glass data center entrance","duration": 5,"resolution": "720p",},},)task_id = resp.json()["data"]["taskId"]print(task_id)const resp = await fetch("https://api.hiapi.ai/v1/tasks", {method: "POST",headers: {"Authorization": "Bearer YOUR_API_KEY","Content-Type": "application/json",},body: JSON.stringify({model: "happyhorse-1-0",input: {prompt: "a cyan glass data center entrance",duration: 5,resolution: "720p",},}),});const { data } = await resp.json();console.log(data.taskId);The
inputfields shown here are illustrative — each model accepts different fields. See the model page for the model you call. -
Poll for the result
Request
GET /v1/tasks/:iduntilstatusbecomessuccess, then download fromdata.output[0].url.Terminal window curl https://api.hiapi.ai/v1/tasks/tk-hiapi-... \-H "Authorization: Bearer YOUR_API_KEY"# status: queued / handling / archiving / success / failPrefer a callback over polling for production. Once this works, move model and prompt settings into your app config.
Next Steps
Section titled “Next Steps”- Review Authentication before shipping this to production
- Browse all available models
- Check the Unified Async API for all endpoints