lithovas.

MiniMax H3 Webhook Guide — Async Task Callbacks

Use MiniMax H3 webhooks when your app cannot keep a browser or server request open while a text to video task completes. Submit the task to `https://www.lithovas.com/api/generate` with `webhook_url`, store the returned task id, and treat polling as a fallback. Pricing is $0.1181 per per second and failed generations cost $0.

Create a task with webhook_url

Send the generation request from your backend and include a callback URL that your app controls.

curl -X POST https://www.lithovas.com/api/generate \
  -H "Authorization: Bearer $YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax-h3/text-to-video","input":{"prompt":"A cinematic product shot"},"webhook_url":"https://your-app.com/webhooks/97ai"}'

Task state machine

StateMeaningAction
PENDINGTask accepted and queuedStore taskId and show an in-progress state
SUCCESSGeneration completedSave resultUrls, creditsConsumed, and prompt metadata
FAILUREGeneration failed upstreamShow the error and keep billing at $0 for the failed task

Webhook handler checklist

  1. Accept only POST requests at your callback URL.
  2. Verify the task id exists in your database before updating state.
  3. Make the handler idempotent; the same terminal event may be delivered more than once.
  4. Store `resultUrls`, final state, credits consumed, and the original prompt metadata.
  5. Keep polling `GET https://www.lithovas.com/api/generate/{taskId}` as a fallback if your callback endpoint is unavailable.

Frequently asked questions

Does MiniMax H3 support webhooks?+

Yes. Include `webhook_url` when you create the MiniMax H3 generation task through 97AI.PRO.

Should I use polling or webhooks for MiniMax H3?+

Use webhooks for production and polling for local testing or fallback recovery. Both patterns can coexist safely.

What happens if my webhook endpoint is down?+

Keep the task id and poll the task details endpoint. Your result remains available after the generation finishes.

Are failed MiniMax H3 tasks billed?+

No. Failed tasks cost $0 under 97AI.PRO's zero-risk billing policy.

Can I use a localhost webhook while developing?+

Use a tunnel such as ngrok or Cloudflare Tunnel so 97AI.PRO can reach your local callback endpoint.

Ready to try MiniMax H3?

Sign up on 97AI.PRO, top up with credit card / USDC / Alipay, and get an API key in under 60 seconds.

Related text to video