Getting started

Why Nolgia

On this page
  1. One API, one job model
  2. The price before the spend
  3. Check the refund outcome
  4. Reusable subjects and looks
  5. From wherever you work

You can generate image, video, audio and 3D media through the same API, quote a request before spending credits, and reuse your subjects and looks across generations.

One API, one job model #

POST /generate/image, POST /generate/video, POST /generate/audio and POST /generate/3d return 202 with a Job; GET /jobs/{id}/wait waits for its result. Start with the Quick Start.

Image Video Audio 3D
44 73 16 2

The price before the spend #

Check the refund outcome #

A failed job carries failure.code and reports the ledger outcome in failure.credits_refunded: true means refunded; false means charged, including a content-filter refusal the provider billed for. An absent value does not confirm a refund; see Errors.

Value Meaning
out_of_credits the wallet cannot pay for the job. Nothing was submitted and nothing was charged. Top up, or submit a cheaper model or fewer seconds.
rate_limit refused for now, not refused outright - the caller's own concurrency ceiling, or the provider's. Retry later; the same request will be accepted.
prompt_nsfw a content filter refused the request or the result it produced, on safety grounds. Editing the prompt or the reference media is the fix. Whether the credits were refunded is failure.credits_refunded, not this code.
ip_detected legacy, still accepted but no longer emitted. A content filter refused it for a real person's likeness or a protected work, rather than for safety. The fix is different from prompt_nsfw - change the reference image or the named subject, not the tone of the prompt - which is why it is its own code.
job_failed the job ran and did not produce an asset for any other reason, including a provider error. The default for an unclassified failure.
timeout the job ran past its time budget, or a GET /jobs/{id}/wait returned before the job reached a terminal status. On a failed job the work is over; on a wait the job may still be running.
validation the request itself is not acceptable - a missing or malformed field, a model that does not support the capability asked of it, a duration the model will not render. Nothing was submitted and nothing was charged. Retrying unchanged will fail identically.
confirmation_rejected the cost confirmation gate did not pass. Either a client showed the customer a quote and the customer declined, or a supplied confirmation token was refused. A submit that carries no confirmation token is never refused for this reason.
canceled the job was canceled by its owner (POST /jobs/{id}/cancel), not broken. It is the code the SDK wait helpers raise for a canceled job; cancellation on the job says what the provider did and what was refunded. A canceled job carries no failure.
job_not_cancellable POST /jobs/{id}/cancel refused (409) because the job already finished, or its finished result is already being delivered. The job will reach succeeded or failed on its own; nothing was changed.
approval_required refused with 402 (title Approval Needed) because the generation would take an agent run past its limit (the credit_ceiling a guided preset's review card sent with the brief; the card shows the customer what such a run typically costs, not the limit). Nothing was submitted and nothing was charged. The detail names the generation's cost, the new run total and the limit; the agent must ask the customer to approve that total before it continues, never quote the limit to them, and never retry, split the job or switch models to fit.
run_ended refused with 409 (title Run Ended) because the agent run this generation was started for (the turn its turn-scoped credential names) has already ended: the platform failed, swept or stopped the turn, or it finished and delivered its reply. Nothing was submitted and nothing was charged. The agent must stop working on that run, never retry or switch models; the customer's chat already shows how it ended.
likeness_refused The reference was refused for a real-person likeness. suggested_models lists the models of the same kind that accept photoreal people, best first, filtered for your inputs and effective plan; none when the provider's answer names a minor, or names copyright outside ByteDance's PrivacyInformation refusal.
copyright_refused The input or generated media was refused for copyright restrictions.
output_safety_blocked The checker blocked generated output; up to two identical retries are allowed within 30 minutes, except categories involving minors.
input_safety_blocked The checker refused the input. Change the prompt or references.
invalid_media The provider could not decode or inspect the input media. Replace it with valid media.
frame_constraint Frame pinning conflicts with the requested reference media. Drop the frames or the references.
media_constraint The input media is readable but outside what the model takes: a frame rate, an image shape or an image or clip size. The message names the limit; export or crop the media to fit it. Retrying the unchanged media is not useful.
card_required refused with 402 (title Card Required) for one of two reasons. Free credits: the account is on the free plan (never paid) with no card on file, no paid credits and no sign-up grant or Insider welcome left (those spend without a card), so its remaining free credits are locked; adding a card (no charge) unlocks them (suggested_models is empty then). While the free daily allowance is on the detail names the daily credits a card adds; while it is off this is returned only to an account holding free credits that wait for a card, and an account with none gets out_of_credits. Premium video: the model is premium video (Seedance 2.5, Kling 4.0, every Gemini Omni model and every video model at or above 5.4 credits per second) and the account has no card on file and has never paid for a plan or credits. Nothing was submitted and nothing was charged. Adding a card in the NOLGIA app unlocks it with no charge (help_url is the app's card page); suggested_models lists cheaper video models this account can run now, best first. Images and the cheaper models work without a card. Never retry the same request.
paid_credits_required refused with 402 (title Paid Credits Required) because the model is premium video (Seedance 2.5, Kling 4.0, Gemini Omni and every video model at or above 5.4 credits per second) and the account is on the free plan (it has never paid for a plan or credits) with no paid credits to cover it. Free credits (the sign-up grant and other free grants) pay for images and the cheaper video models only. Nothing was submitted and nothing was charged. Subscribing or buying credits unlocks it (help_url is the app's billing page); suggested_models lists cheaper video models the free credits cover, best first. Never retry the same request.
idempotency_key_reused refused with 409 because the Idempotency-Key already names a different request on this account (another body, apart from confirmation_token). A key keeps naming its job while the job runs and for 24 hours after it finishes. Nothing was submitted and nothing was charged; job_id names the job the key belongs to. Send a new key for a new request, or the original request again to get that job.

Reusable subjects and looks #

Reuse these in your generations or through the Agent Sessions API.

Resource What you reuse
Characters character_ids supplies an ordered cast of up to four characters.
Locations Save a place's description and reference images.
Products Reuse products imported from a store link or built from your images.
Brand kits Keep palettes, fonts, logos and never-rules together.
Saved styles Apply a prompt fragment and reference images with style_id.
Presets Choose an outcome-named workflow that opens a creation tool or hands off to the agent.

From wherever you work #

Use nolgia.ai, the nolgia CLI, the MCP server for Claude Code and Cursor, skills for coding agents, or the NOLGIA Agent.