Skip to content

Quickstart

HiPix is an AI API gateway that lets you generate videos and images through a simple REST API. This guide walks you through your first successful video generation.

  1. Visit hipix.app
  2. Click Get Started to sign up
  3. Check your email for a verification link (if enabled)
  1. Log in to your dashboard
  2. Go to Keys (API Tokens)
  3. Click Add Token
  4. Give it a name (e.g., “my-app”)
  5. Set a quota limit or choose unlimited
  6. Copy the sk-... key and store it securely
Terminal window
curl -X POST https://api.apimart.cc/v1/videos \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "aliyun/wan3-0/text-to-video",
"prompt": "A golden retriever running on a sunny beach, waves crashing, cinematic lighting",
"seconds": 5,
"metadata": {
"resolution": "480P",
"ratio": "16:9"
}
}'

You’ll receive a response like:

{
"id": "vt-abc123",
"status": "queued",
"created_at": 1760000000
}

Video generation is asynchronous; completion time varies. Poll the task status using the returned ID:

Terminal window
curl https://api.apimart.cc/v1/videos/vt-abc123 \
-H "Authorization: Bearer sk-your-api-key"

When the video is ready, status changes to "completed" and the response includes the video URL.

import os
import time
import requests
BASE_URL = "https://api.apimart.cc"
HEADERS = {
"Authorization": f"Bearer {os.environ['HIPIX_API_KEY']}",
"Content-Type": "application/json",
}
def generate_video(prompt, model="aliyun/wan3-0/text-to-video",
seconds=5, resolution="480P", ratio="16:9"):
"""Submit a video task and wait for completion."""
task = requests.post(
f"{BASE_URL}/v1/videos",
headers=HEADERS,
json={
"model": model,
"prompt": prompt,
"seconds": seconds,
"metadata": {"resolution": resolution, "ratio": ratio},
},
timeout=60,
)
task.raise_for_status()
task = task.json()
print(f"Task ID: {task['id']}") # Persist this ID before starting to poll.
deadline = time.monotonic() + 600
while time.monotonic() < deadline:
result = requests.get(
f"{BASE_URL}/v1/videos/{task['id']}",
headers=HEADERS,
timeout=30,
)
result.raise_for_status()
result = result.json()
if result["status"] == "completed":
return result
if result["status"] == "failed":
raise RuntimeError(f"Video generation failed: {result}")
if result["status"] not in ("queued", "in_progress"):
raise RuntimeError(f"Task {task['id']} needs review: {result['status']}")
time.sleep(5)
raise TimeoutError(f"Continue checking existing task {task['id']}; do not resubmit")
# Usage
video = generate_video("A cat playing piano in a jazz bar")
print(f"Video URL: {video['url']}")

Prefer a GUI? The eight current Seedance models have Postman collections covering submit, poll/result retrieval, download, and real-person asset registration. Import the matching collection, set api_key, replace the example media URLs, and fill the task/asset path IDs from responses. The collections ship without credentials. For the Wan example above, use its documented cURL or Python request.

Accepted tasks reserve balance and settle according to the selected model’s billing rule. Use Wallet for balance and recharge history, and usage logs for generation charges. A timeout while submitting is uncertain: do not automatically repeat the POST. See Errors & Recovery.

All API requests use the following base URL:

https://api.apimart.cc