This walkthrough shows how to turn one text prompt into a short video with sound through an API, using MiniMax's H3 video model on AppleToken.
Until 23:59 on November 6, 2026 (Taipei time) / 15:59 UTC / 0:59 on November 7 (Japan time), the "H3 HappyDay" campaign makes generation with gputw/minimax-h3 free, with no limit on total uses (limits apply to concurrent jobs and submissions per minute).
What we will do
- Sign up on AppleToken and create an API key
- Request a video with
POST /v2/videos/generations - Poll
GET /v2/videos/{id}until it is done - Download the mp4 from
GET /v2/videos/{id}/content
1. Sign up and get a key
Sign up at appletoken.app and create an API key (it starts with at_live_) in the dashboard. During the campaign you can generate without a top-up; we confirmed a new account with a $0 balance can generate.
2. Try it with curl
export APPLETOKEN_API_KEY=at_live_xxxxxxxx # your key
# 1) Request a video
curl -s https://appletoken.app/v2/videos/generations \
-H "Authorization: Bearer $APPLETOKEN_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: h3-demo/1.0" \
-d '{"model":"gputw/minimax-h3","prompt":"A Shiba Inu flying a small plane over Mount Fuji","seconds":5,"resolution":"720p","aspect_ratio":"9:16"}'
# => {"id":"job_xxx","status":"processing", ...}
# 2) Poll every 10 s until status is completed
curl -s https://appletoken.app/v2/videos/job_xxx \
-H "Authorization: Bearer $APPLETOKEN_API_KEY" -H "User-Agent: h3-demo/1.0"
# 3) Download the mp4
curl -s -o h3.mp4 https://appletoken.app/v2/videos/job_xxx/content \
-H "Authorization: Bearer $APPLETOKEN_API_KEY" -H "User-Agent: h3-demo/1.0"
3. Python (standard library only)
On 429 (busy) or 503 (paused), wait the retry_after seconds in the response, then retry. We set a User-Agent explicitly because urllib with its default User-Agent sometimes got a 403.
import json, os, time, urllib.request, urllib.error
API = "https://appletoken.app/v2"
KEY = os.environ["APPLETOKEN_API_KEY"] # at_live_...
HEADERS = {
"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json",
"User-Agent": "h3-demo/1.0", # the default Python UA can get a 403
}
def call(method, path, body=None):
while True:
req = urllib.request.Request(API + path, method=method, headers=HEADERS,
data=json.dumps(body).encode() if body else None)
try:
with urllib.request.urlopen(req) as r:
return r.read() if path.endswith("/content") else json.load(r)
except urllib.error.HTTPError as e:
if e.code in (429, 503):
wait = int(json.loads(e.read() or b"{}").get("retry_after") or e.headers.get("Retry-After") or 30)
print(f"{e.code}: retrying in {wait}s")
time.sleep(wait)
continue
raise
job = call("POST", "/videos/generations", {
"model": "gputw/minimax-h3",
"prompt": "A Shiba Inu flying a small plane over Mount Fuji",
"seconds": 5, "resolution": "720p", "aspect_ratio": "9:16",
})
print("job:", job["id"], job["status"])
while job["status"] not in ("completed", "failed"):
time.sleep(10)
job = call("GET", f"/videos/{job['id']}")
print("status:", job["status"], "price:", job.get("price_charged"))
if job["status"] == "completed":
open("h3.mp4", "wb").write(call("GET", f"/videos/{job['id']}/content"))
print("saved h3.mp4")
It saves h3.mp4. In our own runs, a video took 104 to 441 seconds from submit to finish. At campaign peak a job can stay queued for 10 minutes or more (measured around 23:00 JST on Nov 5); the response shows the wait in queue.waited_seconds.
4. Example output
The campaign video, "Dream". Every scene in it was generated by H3 (AI-generated).
Specs and limits
| Item | Value |
|---|---|
| Model |
gputw/minimax-h3 (other models keep regular prices) |
| Length | 1–5 seconds |
| Resolution | 480p / 720p |
| Aspect ratio | 16:9, 9:16, 1:1, 4:3, 3:4 |
| Audio | included automatically |
| Reference images | not supported |
| Concurrency | up to 32 jobs per account (per GPUtw.ai); 120 submissions per minute |
| Regular price | 0.017 points/s at 720p, 0.007 points/s at 480p |
| Free until | 23:59 Nov 6, 2026 Taipei time (15:59 UTC). Jobs finishing after that are charged at the regular price |
Links
- AppleToken: https://appletoken.app/?utm_source=dev&utm_medium=pr&utm_campaign=happyday-20261105&utm_content=IDAEO-HDDV1
- API docs: https://appletoken.app/docs
- Campaign guide, including a prompt you can hand to your AI assistant: https://km.idaeo.ai/post/ai/happyday-h3-free-video-20261105?lang=en&utm_source=dev&utm_medium=pr&utm_campaign=happyday-20261105&utm_content=IDAEO-HDDV1
(AppleToken is operated by Washin Co., Ltd.; compute is provided by GPUtw.ai. The author is affiliated with AppleToken.)
The sample sticks to the Python standard library, so there is nothing to install.
IDAEO-HDDV1
Top comments (0)