Quickstart
Overview
Section titled “Overview”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. Create an Account
Section titled “1. Create an Account”- Visit hipix.app
- Click Get Started to sign up
- Check your email for a verification link (if enabled)
2. Get Your API Key
Section titled “2. Get Your API Key”- Log in to your dashboard
- Go to Keys (API Tokens)
- Click Add Token
- Give it a name (e.g., “my-app”)
- Set a quota limit or choose unlimited
- Copy the
sk-...key and store it securely
3. Make Your First Request
Section titled “3. Make Your First Request”Using cURL
Section titled “Using cURL”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}Poll for the Result
Section titled “Poll for the Result”Video generation is asynchronous; completion time varies. Poll the task status using the returned ID:
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.
Using Python
Section titled “Using Python”import osimport timeimport 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")
# Usagevideo = generate_video("A cat playing piano in a jazz bar")print(f"Video URL: {video['url']}")4. Use Postman (Optional)
Section titled “4. Use Postman (Optional)”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.
5. Check Your Balance
Section titled “5. Check Your Balance”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.
Base URL
Section titled “Base URL”All API requests use the following base URL:
https://api.apimart.ccNext Steps
Section titled “Next Steps”- Postman Collections — Import requests without writing cURL
- Video Generation API — Full API reference
- Pricing — How billing works
- Available Models — Model catalog and capabilities