
Grok Imagine Video 1.5 Lite batch API: what xAI documents
xAI's Lite page lists a $0.02 per second price, 10 requests per second, batch support and two regions. Sume jobs are async instead; here is how they differ.
Building on the Sume API: keys and hosts, jobs and runs, polling, webhooks, idempotency, errors and rate limits, the SDK, the CLI, and MCP auth.
Start with: Sume API quickstart: your first video generation call in five steps

xAI's Lite page lists a $0.02 per second price, 10 requests per second, batch support and two regions. Sume jobs are async instead; here is how they differ.

With asynchronous tool calling, a Nova 2.5 Sonic agent can start a Sume music or caption job, answer at once with the job id, and poll status later.

Perplexity's pplx-embed-v2-late embeds images and pages. Sume lists no embeddings route; use video_frames_create for stills and index them on your side.

A Sume 400 invalid_request lists each bad field in details.errors with path, loc, message and type. Read them in Python instead of guessing from the message.

Most Sume 400s create nothing, but a provider input rejected at submit leaves a failed job, a request_id and a refund. How to read it and what key to use.

Every Sume 404 reports public_reason resource_not_found, whatever the code. Branch on error.code to tell a missing job from a bad model id or a missing asset.

What the Sume 409 job_not_queued means: a submit found its job no longer queued, sent nothing to the provider, and the error is not retryable by resending.

Sume reports provider capacity three ways: HTTP 503 provider_capacity_exceeded, a job reason generation_capacity_exhausted, and a sync flag. All three retry.

A Sume job failing with artifact_too_large or artifact_upload_rejected made its file but could not store it. Make the file smaller; rerunning changes nothing.

A Django view that verifies a Sume webhook against request.body: csrf_exempt, 300 s replay window, empty-secret refusal, multi-signature header, 204.

EmbeddingGemma 2 fits 5.5 minutes of audio. A 28-minute video needs six 300-second audio detach ranges at $0.01 per job, $0.06 in total.

EmbeddingGemma 2 fits 58 video frames in its 8K window. Sume's video inspect returns 24 stills per call, so three calls with explicit times cover it.

Fastify parses JSON before your handler, which breaks signatures. Use addContentTypeParser with parseAs string and verifyWebhook from @sume-com/sdk.

Verify a Sume job webhook in Flask: read request.get_data() raw, check the sume-v1 HMAC and 300 s window, refuse an empty secret, answer 204.

Take the Sume webhook body as web::Bytes in Actix Web, verify HMAC SHA-256 with the hmac and subtle crates, and return 204 or 401.

Read the raw Sume webhook body in Falcon ASGI with req.bounded_stream.read(), verify HMAC SHA-256, and set HTTP_204 or raise HTTPUnauthorized.

Sign-check a Sume webhook in Go Fiber with c.BodyRaw() and hmac.Equal, then copy the bytes before handing them to a goroutine, since Fiber reuses them.

GET /v1/assets returns up to 100 assets per page, newest first, with a null next_cursor on the last page. Filters, defaults, and what a bad cursor does.

A Litestar post handler that awaits request.body(), verifies the Sume HMAC signature, sets status_code=204 explicitly, and raises 401 on a mismatch.

Phoenix parses JSON before your controller runs. Cache the raw bytes with a Plug.Parsers body_reader, then verify the Sume webhook HMAC signature.

A Quarkus REST resource that takes the Sume webhook body as byte[], reads the signature headers with @HeaderParam, and answers 204 or 401.

Verify a Sume webhook in Sanic with request.body bytes and hmac.compare_digest, then return an empty 204 so the delivery counts as done.

POST /v1/assets/{id}/complete checks state, expiry, content type, size and checksum in a fixed order, and deletes the object when it rejects one.

GET /v1/assets/{id}/download-url returns a signed GET link that expires in 300 seconds by default, and 409s for registered URLs or assets not yet ready.

A pending_upload asset has a 15-minute URL by default. After the window and a one-hour grace, a reaper deletes the object and marks the row failed.

GET /v1/tts-router/voices can return 503 two ways on Sume. provider_unavailable is a retry; provider_not_configured is not. Cache, timeout and a retry loop.

Use body: .collect(maxSize:) in Vapor 4, read req.body.data, and verify the Sume HMAC SHA-256 signature with swift-crypto before returning .noContent.

Install BodyHandler before your Vert.x route, read the body as bytes, recompute HMAC SHA-256 over timestamp.body, and return 204 to a Sume delivery.

Replace a PowerShell script that called the Sora Videos API: submit to Sume /v1/videos with Invoke-RestMethod, poll polling_url, download the mp4.

Does Caddy break Sume webhook signatures? reverse_proxy passes headers and body through; set max_size above 1 MiB and an 8 s upstream timeout.

Verify a Sume webhook in Clojure: slurp Ring's one-shot body as bytes, HMAC-SHA256 with javax.crypto, MessageDigest/isEqual, rotation entries, 300 s window.

Verify a Sume webhook in Erlang/OTP 26+: crypto:mac over timestamp.raw_body, binary:encode_hex, crypto:hash_equals, rotation entries, and an empty-secret guard.

Map Google's response_format aspect_ratio and image_size, base64 output and inline inputs to Sume's aspect_ratio, resolution, data[].url and input_references.

Verify a Sume webhook in Gleam: crypto.hmac over timestamp.raw_body as a BitArray, lower-cased base16, secure_compare, rotation entries, and a 300 s window.

Vercel added Grok Imagine Video 1.5 Lite to AI Gateway on Oct 8. What generateVideo gives you, and the equivalent text-to-video call on Sume's /v1/videos.

Verify a Sume webhook in Julia: SHA.hmac_sha256 over timestamp.raw_body, a hand-rolled constant-time compare, rotation entries, and a five-minute replay window.

A Nushell script that POSTs a Sume image job with an Idempotency-Key, polls /v1/jobs/{id}/status by next_poll_after_seconds, then fetches the result.

Sume's eleven-* TTS Router ids return MP3 only, and three of the five accept just one format. WAV, avatar voices and word timings belong to the sonic ids.

Inngest can lift step concurrency 3x for 60 minutes a month. Sume's limit does not move: size bursts to accepted capacity and retry queue_full with one key.

Each TTS Router id has its own max_characters. A Python planner splits a script on paragraph breaks so each request fits the row you picked.

Send the same text to sonic-3.6 and eleven-v4-turbo through the TTS Router with one Python script, poll both jobs, and compare the files by ear.

A Sume job stuck in processing can end as worker_job_stalled or worker_lease_expired. Both are terminal job.failed events with the hold refunded. Resubmit.

Two Sume submit failures that are not 402 or 429: admission or the usage hold could not be evaluated. The row is failed and refunded; retry with the same key.

CircleCI kills a run step after 10 silent minutes. Print a status line on every poll, raise no_output_timeout, and keep one Sume Idempotency-Key per workflow.

Some agent clients fill every optional tool field with empty strings, zeros and empty arrays. What Sume's MCP drops, what it keeps, and what still errors.

A 402 on Sume means nothing was reserved, so a cheaper request can go straight through. Python ladder: Seedance 720p, 480p, then Wan 480p, one key per rung.

A [redacted_url] in a Sume job error is by design: URLs, provider ids, env names and secrets are masked, and the provider reason is capped at 300 characters.

Sume's old /v1/lipsync-1.0 paths return 404 and its model ids return model_not_found. Send the same still and audio to veed/fabric-1.0 or H3 Max lip-sync.