API reference

The Licensed Likeness API

Generate with real, licensed people. Mirai checks each person's terms on every call, keeps drafts watermarked and records each licence. Version 1.0.0.

Base URL
https://mirai.inc/api/v1
Auth
Authorization: Bearer mirai_sk_…

Manage keys in your enterprise account. API usage requires generation entitlement and follows the same watermark and licence rules as Studio. Character APIs below are experimental and disabled by default, not a live third-party catalogue.

Roster

The bookable model roster and per-model character sheets.

GET/modelsscope: read

List the bookable model roster

Public-safe fields only, no reference photos, likeness configuration, earnings, or contact details. Only models who are signed, available, have granted partner-distribution consent and have a complete 6-photo reference kit appear; anyone else is omitted entirely rather than flagged. Each entry carries the model's binding restrictions (excluded_categories, excluded_brands, restricted_regions) so an integrator can refuse an out-of-scope brief before writing it, and references_available, which is false unless the reference lane is open for your key and that model. lanes.references says whether the reference lane is open for your key at all. The response also carries approved_renderers, the exhaustive list of engines a likeness may be sent to.

60/min per key

GET/models/{id}/referencesscope: read

Short-lived reference URLs for a consented model

Closed by default. Available only to a partner with a signed partner agreement that covers rendering on its own infrastructure, for a model whose consent covers the same; otherwise every call returns 403 references_lane_closed, and the lanes where Mirai renders (POST /generate, POST /briefs) are the ones to use. When open, returns signed, expiring proxy URLs to the model's canonical reference kit, for feeding into an APPROVED renderer as identity references. Both renderer and brand are required; category is required for a model with excluded categories, and brand_country for a model with territory restrictions: the declared renderer must be on the approved list (the 400 response enumerates it), and the declared brand is checked against the model's exclusions before anything is served, a brand they have excluded is refused outright. URLs expire in 15 minutes, every fetch is logged, and revocation applies to already-issued URLs immediately. The response carries their binding restrictions; they travel with the references.

60/min per key

Parameters
idrequiredstring (path)
rendererrequiredstring (query)The exact endpoint id these references will be used with, e.g. bytedance/seedream/v5/pro/edit. Must be on the approved-renderer list; anything else is refused with the list attached.
brandrequiredstring (query)The brand this shoot is for. Checked against the model's excluded brands before any reference is issued.
categorystring (query)The product category of the shoot. Required when the model has excluded categories, and checked against them.
brand_countrystring (query)Two-letter country code where the brand is based. Required when the model has territory restrictions, and checked against them.
GET/characters/{modelId}scope: read

Fetch a roster model's character sheet

The structured identity profile distilled at model approval, appearance descriptors, delivery notes, categories, for writing prompts that stay coherent with the real person. Visibility matches GET /models: only bookable models exist; unknown and unavailable ids 404 identically. A roster model without a sheet yet also 404s with code character_sheet_not_ready, the sheet is enrichment, built at approval time.

60/min per key

Parameters
modelIdrequiredstring (path)Model id from GET /models.

Generation

Create draft images and video clips.

POST/generatescope: generate

Generate a draft image with a model's AI likeness

Renders a watermarked draft anchored to the model's canonical identity kit. Sparse prompts are automatically enhanced; every prompt receives Mirai's editorial house style and passes a safety scan before delivery. Streaming transport: generation takes 1-5 minutes, so once it starts the HTTP status is ALWAYS 200 and the body streams heartbeat whitespace until the final JSON. Read the full body, then JSON.parse it (leading whitespace is valid JSON) and check for an error field before treating it as success. Pre-flight failures (auth, validation, entitlement) return real 4xx statuses with JSON bodies. Supports the Idempotency-Key header.

20/min per key, 40/min per account

Parameters
Idempotency-Keystring (header)Any string unique to this logical request. Retries with the same key replay the stored result instead of re-rendering.
POST/videosscope: generate

Animate one of your generated images into a video clip

Starts an image-to-video render (Seedance 2.0; face-reveal prompts route to Wan 3.0 with the model's canonical headshot as an identity anchor; both engines are named in the Model Release). The source is the asset_id of one of YOUR generated images, raw URLs are not accepted. Open-IP sources: when the source asset came from POST /ip/{slug}/generate, the render follows the character sheet instead of the fashion pipeline, the sheet's Seedance motion notes are the default motion direction (your prompt overrides them), the era style lock replaces the photorealism clause, and the sheet's legal exclusions are enforced in the prompt. Async contract: responds 202 immediately with an asset_id. Poll GET /assets/{asset_id} until status leaves processing (typically 1-5 minutes): ready delivers the watermarked draft_url; failed carries an error message and nothing was billed. Billing: on Starter, Growth and Scale a clip is paid from your monthly credits, priced by its length (see Billing); Starter does not include video, and a prepaid video credit pack covers a clip when credits do not. Enterprise follows its order form. A failed render refunds any credit consumed. Supports the Idempotency-Key header, a replay returns the SAME asset_id.

6/min per key, 10/min per account

Parameters
Idempotency-Keystring (header)Any string unique to this logical request. A replay returns the same 202 body (same asset_id) instead of starting a second render.
GET/usagescope: read

Credits used and remaining this period

Starter, Growth and Scale pay for API generations from the account's monthly credits (see Billing). billing: credits returns credits_monthly, credits_used and credits_remaining for the current period. Enterprise accounts return billing: enterprise (not credit-metered; usage follows the order form) and accounts without a subscription return billing: none.

Response 200
billingrequiredcredits | enterprise | none
planstring,null
statusstring
credits_monthlyinteger
credits_usedinteger
credits_remaininginteger
period_startstring,null
period_endstring,null

Licensing

License approved assets for commercial use via Stripe Checkout.

POST/usagescope: license

Record a licence for an image a partner rendered on its own pipeline

Approved generation partners only. Report each delivered asset here. Print, Print + OOH and Digital + OOH are recorded here like digital (at her print rate, and a region may be named) when the talent has print on demand switched on and has accepted the partner consent version that covers it; otherwise they are refused (403 individual_approval_required) and go through POST /briefs. The model must be signed, available, opted into partner licensing and have a complete reference kit, and the brand, category and country are checked against the model's restrictions. Mirai records a metered external licence priced from the model's rate table (video at the video rate, per 10 seconds of runtime) and computes the model's payout; settlement is invoiced periodically. Idempotent on external_asset_ref: re-reporting the same asset never double-bills.

Request body
model_idrequiredstring
external_asset_refrequiredstringYour stable id for the delivered asset.
brandrequiredstringThe brand the asset is for. Checked against the model's excluded brands.
categorystringProduct category. Required when the model has excluded categories.
brand_countrystringTwo-letter country code where the brand is based. Required when the model has territory restrictions.
mediaimage | videoDefault image.
runtime_secondsnumberVideo only, required: clip length in seconds. Priced per second (the model's 10 second rate divided by 10), and never for less than the model's minimum: 10 seconds, or 4 seconds for a model who has accepted the per-second change (from 2026-12-07, never before). The response returns video_minimum_seconds, the minimum used for this model.
reference_tokenstringThe token from the reference URL used, so the licence ties to the exact references served.
formatstringUsage format, default Digital. Digital only.
durationstringLicence duration, default 6 months.
territorystringGlobal, the default. Digital licences are always Global.
GET/licenses/quotescope: read

Price a licence without committing

Non-binding and side-effect free. Called with image_ids alone it returns the full priced option matrix for those assets (formats, durations, per-format territories) so no integrator ever holds a stale copy of the rate card; called with format and duration it returns the exact quote. Every gate the real POST /licenses enforces is evaluated here too and returned as blockers rather than errors, including the instant-scope boundary: images auto-approved under a model's standing digital consent can be licensed for digital use only unless she has print on demand switched on, and otherwise print / out-of-home requires their individual approval. Digital licences are always Global; regions exist for Print + OOH at the same price.

60/min per key

Parameters
image_idsrequiredstring (query)Comma-separated asset ids from /generate. 1 model per quote.
formatstring (query)
durationstring (query)
territorystring (query)
POST/licensesscope: license

Create a licence checkout for approved images

Creates a pending license plus a Stripe Checkout session; complete payment in a browser via checkout_url (the session and the pending license both expire after 1 hour). On payment, the license activates and the assets' clean URLs unlock on GET /assets/{id}. The approval gate: only assets with approval_status: "approved" (the model's sign-off) can be licensed, this is the platform's load-bearing invariant and cannot be bypassed. All images in one license must be from the same model. Image licenses only on v1 (video licensing runs through the Studio). Order acceptance: send advertiser (the legal name of the company the assets are licensed for), accept_order: true and order_version (the current version, licence-order-2026-09-14; GET /licenses/quote returns it with the order summary the buyer is accepting) on every call. The acceptance is stored on the licence as its order terms. Mirai will start requiring all three after notice to integrators; from then on a call without them gets 400 order_acceptance_required. Until then a call that sends none of them still works, but a call that sends any of them is validated in full: a stale order_version gets 409 order_version_changed, an advertiser the talent has excluded gets 403 advertiser_not_permitted. Pricing: fee_cents = image_count x base(format) x multiplier(duration) x multiplier(territory). Base rates, Digital: $50/image; Print + OOH: $120/image; Social: $50/image; Print: $120/image. Duration multipliers, 6 months: x1; 12 months: x1.8; 24 months: x2.5.

10/min per key

Assets

Poll asset state and retrieve deliverable URLs.

GET/assets/{id}scope: read

Fetch the state of one of your generated assets

A single id namespace covers images and videos; the response is discriminated by kind. Returns YOUR assets only, not-owned and not-found are both 404 so ids can't be probed. The authenticated url is non-null IF AND ONLY IF the asset is licensed (model approval + paid license). It streams the original without exposing its permanent storage URL. Licensed image and video downloads carry signed C2PA Content Credentials; X-Content-Credentials on the download says whether they were embedded, and where Mirai enforces them a file that cannot be signed returns 503 credential_unavailable instead of an unsigned copy. Send the same bearer key when following it. draft_url is the watermarked deliverable before licensing, an image thumbnail afterwards, and null for licensed video. For video assets this is the polling endpoint of the POST /videos async contract, watch status (processing → ready | failed).

60/min per key

Parameters
idrequiredstring (path)Asset id returned by POST /generate or POST /videos.
GET/assets/{id}/downloadscope: read

Download a licensed asset

Streams the licensed image or video without exposing its permanent storage URL. Images and videos (MP4) carry signed C2PA Content Credentials (X-Content-Credentials: embedded). Where Mirai enforces them, a file that cannot be signed returns 503 credential_unavailable, retry shortly; otherwise the header reads unavailable. The caller must own the asset and hold an active licence covering it. Send the same bearer key when following the URL returned by GET /assets/{id}.

60/min per key

Parameters
idrequiredstring (path)Licensed image or video asset id.

Enterprise lane

Approved generation partners. Brief a talent for images, video or both; the talent approves the brief, you render on your own stack, submit each final, and the talent approves it before it is licensed.

GET/briefsscope: license

Your briefs, newest first

POST/briefsscope: license

Submit a campaign brief for a talent's approval, before anything is created

Approved generation partners only. JSON, or multipart/form-data with the same fields plus up to 8 reference images. Images too large for one request body can be uploaded first with POST /uploads and named in reference_upload_ids (JSON). media says what the brief covers: image (default), video or both. Images and videos are counted separately (image_deliverables, video_deliverables), and a video brief sets video_seconds, the longest a single video may run. deliverables is still accepted as the old name for image_deliverables. advertiser_country (two-letter code) is required when the talent has territory restrictions. Checked at once against the talent's excluded advertisers, categories and territories, then waits for the talent's approval on Mirai. The talent sees the counts and the video length on the brief.

Request body
model_idrequiredstringThe talent, from GET /models.
advertiserrequiredstringThe brand the campaign is for.
categoryrequiredstringChecked against the talent's excluded categories.
descriptionrequiredstringThe creative idea, looks, settings and where it will run.
advertiser_countrystringTwo-letter country code. Required when the talent has territory restrictions.
mediaimage | video | bothWhat the brief covers. Default image, so existing clients are unchanged.
image_deliverablesintegerStills the brief covers, for image and both. Default 1.
video_deliverablesintegerVideos the brief covers, for video and both. Default 1.
video_secondsintegerRequired for video and both: the longest a single video may run, in seconds.
deliverablesintegerDeprecated: the old name for image_deliverables, still accepted. Not allowed on a video brief.
formatstringImages: Digital, Print + OOH. Video: Digital, Digital + OOH. Both: Digital.
duration6 months | 12 months | 24 months
territoryGlobal | Asia | Middle East | Europe | Australia | North America | South America | Africa
reference_upload_idsarray of stringOptional mood board images already uploaded with POST /uploads (purpose brief_reference), up to 8, instead of reference files. Each id is single use.
Examples

Images only (the default)

{
  "model_id": "08975092-607e-47d9-b416-b2e456b0e011",
  "advertiser": "Example Skincare",
  "category": "Beauty",
  "description": "Morning routine in natural window light, 3 looks.",
  "media": "image",
  "image_deliverables": 3,
  "format": "Digital",
  "duration": "6 months"
}

Video only

{
  "model_id": "08975092-607e-47d9-b416-b2e456b0e011",
  "advertiser": "Example Skincare",
  "category": "Beauty",
  "description": "2 short clips: applying serum, then a smile to camera.",
  "media": "video",
  "video_deliverables": 2,
  "video_seconds": 15,
  "format": "Digital",
  "duration": "6 months"
}

Images and video

{
  "model_id": "08975092-607e-47d9-b416-b2e456b0e011",
  "advertiser": "Example Skincare",
  "category": "Beauty",
  "description": "Launch set: 3 stills and 2 clips of 15 seconds.",
  "media": "both",
  "image_deliverables": 3,
  "video_deliverables": 2,
  "video_seconds": 15,
  "format": "Digital",
  "duration": "12 months"
}
POST/uploadsscope: license

Get a presigned upload URL for a large file, to name on a brief or a submission

Approved generation partners only. The upload-url step for files too large for one request body, such as a video final up to 200 MB. It is optional: multipart on POST /briefs and POST /briefs/{id}/submissions works as before. Send purpose (brief_reference for a mood board image, submission for a final), the file's content_type and exact size in bytes, and for a submission the brief_id. The same caps apply as on the multipart calls: an image stays under 25 MB; a video must be an MP4 and stay within the brief's length allowance (50 MB for a 15 second brief). Then PUT the file to upload_url with exactly the headers returned (the content type and length are signed, and the link works for 5 minutes), and call POST /briefs with reference_upload_ids, or POST /briefs/{id}/submissions as JSON with upload_id and external_asset_ref. An upload id is single use: the create call reads the file and deletes it, and everything checked on a multipart file (type, size, runtime, deliverables, the Illinois rule) is checked on it. A failed create call that did not reach the file leaves it in place for a retry. Answers 501 direct_upload_unavailable where this is not offered; send multipart instead.

Request body
purposerequiredbrief_reference | submissionWhat the file is for.
content_typerequiredstringimage/jpeg, image/png or image/webp for a mood board image; an image type or video/mp4 for a final. Sent again, unchanged, as the Content-Type of the PUT.
sizerequiredintegerThe file's exact length in bytes. Signed into the link: the PUT must carry exactly this many.
brief_idstringRequired for a submission: the approved brief the final is for (its video_seconds sets the size allowed for a video).
Examples

A video final

{
  "purpose": "submission",
  "brief_id": "00000000-0000-4000-8000-000000000000",
  "content_type": "video/mp4",
  "size": 31457280
}
GET/briefs/{id}scope: license

A brief's status and the finals submitted under it

Parameters
idrequiredstring (path)
POST/briefs/{id}/submissionsscope: license

Submit a final image or video rendered on your own stack, under an approved brief

multipart/form-data with file and external_asset_ref, or (for a file uploaded first with POST /uploads) application/json with upload_id and external_asset_ref. The file is read from its bytes: an MP4 is a video final, anything else an image. An image must fit the brief's media (image or both) and is kept under 25 MB. A video must fit a video or both brief, be an MP4 in avc1, avc3, hvc1, hev1, av01, vp09, run no longer than the brief's video_seconds, and stay under 5 MB plus 3 MB per second of video_seconds (50 MB for a 15 second brief, 185 MB for 60 seconds). Images and videos count against their own deliverables. Waits for the talent's approval; once approved it is licensed (a video at the video rate, by runtime, per second with a ten-second minimum per clip) and available from /submissions/{id}/file. Re-submitting the same external_asset_ref returns the existing submission.

Parameters
idrequiredstring (path)
Request body
upload_idrequiredstringFrom POST /uploads (purpose submission, this brief), after the file has been PUT. Single use.
external_asset_refrequiredstringYour id for this asset. Idempotency key.
GET/submissions/{id}scope: license

A final's status, media and duration_seconds; once approved, the licence, file_url and verify_url

Parameters
idrequiredstring (path)
GET/submissions/{id}/filescope: license

The approved final with signed C2PA Content Credentials

An image is served as image/jpeg (mirai-xxxxxxxx.jpg) with signed Content Credentials. A video is served as video/mp4 (mirai-xxxxxxxx.mp4). Video Content Credentials are not embedded yet: X-Content-Credentials reads unsigned, and where Mirai enforces credentials a video returns 503 credential_unavailable until video signing ships.

Parameters
idrequiredstring (path)

Open IP

Experimental catalogue, disabled by default and not a licensed third-party IP offering. Routes return 404 unless separately enabled for a reviewed partner pilot. Public-domain assessments are jurisdiction- and depiction-specific, not blanket commercial clearance.

GET/ipscope: read

List the open-IP character catalog

Experimental open-IP catalogue, not a commercial FAL partnership announcement or a signed third-party catalogue. Disabled unless OPEN_IP_PARTNER_API=1. Query filters: tier (A|B|C), risk (low|medium|high), franchise, commercial_use (true|false). Review the entry's rights assessment and intended jurisdiction before any use. Tier C is a watchlist, entries not yet public domain; they always carry commercial_use: false and the detail route withholds prompt packs for them.

60/min per key

Parameters
tierstring (query)Filter by tier.
riskstring (query)Filter by trademark risk.
franchisestring (query)Filter by franchise key (e.g. oz, hundred-acre-wood).
commercial_usestring (query)true = only licensable entries; false = only watchlist/restricted.
GET/ip/{slug}scope: read

Fetch an open-IP character sheet with FAL prompt packs

Full character sheet (identity, legal dossier, visual DNA, voice spec) plus drop-in FAL prompt packs: image2 for openai/gpt-image-2/edit (including the 6-slot reference kit) and seedance for bytedance/seedance-2.0/reference-to-video. Legal avoid-lists are pre-merged into the negatives. Watchlist (Tier C / commercial_use false) entries return prompt_packs: null and license_terms: null with a watchlist_note.

60/min per key

Parameters
slugrequiredstring (path)Character slug from GET /ip.
POST/ip/{slug}/generatescope: generate

Generate a licensed open-IP character image

Single-call Mirai × FAL flow: name a catalog character, receive a watermarked, licensable draft generated by the same gpt-image-2 chain as POST /generate. The character sheet anchors identity (visual DNA, palette, era style lock) and its legal avoid-list is enforced as an exclusion clause on every render. prompt is optional scene direction. Open-IP images are born approval_status "approved", there is no human likeness to consent, so the returned asset_id can go straight to POST /licenses. To animate, pass asset_id to POST /videos (Seedance); motion guidance lives in the character's prompt_packs. Watchlist (Tier C / commercial_use false) slugs refuse with 403 ip_not_commercial and are never generated.

20/min per key, 40/min per account

Parameters
slugrequiredstring (path)Character slug from GET /ip.

Errors

Inspect response bodies as well as HTTP status. Long-running generation can return an error in its final JSON body after HTTP 200 has already been sent.

invalid_formatThe format value is not in the accepted enum.
invalid_durationThe duration value is not in the accepted enum.
invalid_territoryThe territory value is not in the accepted enum.
brand_country_missingSet your brand's country in Settings before working with a region-restricted model.
region_restrictedThis model is not available to brands based in your country.
images_not_approvedOnly model-approved images can be licensed; unapprovedIds lists the offenders.
card_requiredA free-trial account adds a card (a $0 setup, nothing charged) before its first image of a real model. Nothing was reserved.
order_acceptance_requiredPOST /licenses needs advertiser, accept_order: true and order_version. The body carries the current order_version and order_summary.
order_version_changedorder_version is not the current licence order version. Show the buyer order_summary and resend with the current order_version.
advertiser_not_permittedThe talent is not available for this one; the licence is refused. The error does not say why.
ad_brief_blockedad_product or ad_main_claim is outside what the talent allows or what Mirai allows for anyone (for example a category the talent excluded, a first-person testimonial, a doctor or adviser recommending a product, or a before-and-after). The error text names the Mirai rule when it is one that applies to anyone; when it is the talent's own rule it only says the talent is not available for this one. Nothing was created.
ad_brief_unavailableThe product and claim could not be checked just now. Nothing was created or charged; retry in a minute.
ad_brief_requiredSend ad_product and ad_main_claim together, each 2 or more characters (200 and 300 at most).
duplicate_licenseAn active or pending license already covers one of these images.
model_not_payout_readyThe model's payout account isn't ready; the booking is refused rather than stranding funds.
insufficient_creditsThe plan's monthly credits do not cover this request. The body carries creditsNeeded and creditsRemaining. Nothing was reserved or charged.
video_quota_exceededVideo is not included in the plan and no prepaid credit pack covers it, or (Enterprise) the video allowance is used up with no pack or overage.
source_has_watermarkThe video source image only has a watermarked file; generate a fresh image.
character_sheet_not_readyThe model is on the roster but has no character sheet yet.
key_limit_reachedA brand can hold at most 10 active API keys.
invalid_mediaBrief media must be "image", "video" or "both".
invalid_deliverablesA deliverables count is missing, out of range, or does not match the brief's media.
invalid_video_secondsA video brief needs video_seconds from 5 to 60.
media_mismatchA video was sent under an image-only brief, or an image under a video-only brief.
unsupported_videoThe video is not a playable MP4 (avc1, avc3, hvc1, hev1, av01, vp09) with a readable runtime.
video_too_longThe video runs longer than the brief's video_seconds.
deliverables_exhaustedThe brief's images or videos are used up. Ask the talent to approve a new brief.
API v2

Async jobs, webhooks and certificates

v2 queues a generation as a job and tells you when it is done, on the same pipeline, billing, watermarking and licence rules as v1. Version 2.2.0-beta.

Base URL
https://mirai.inc/api/v2
Auth
Authorization: Bearer mirai_sk_…

POST /jobs answers 202 at once. Poll the job, send Prefer: wait to hold the call, or receive a signed webhook. Send an Idempotency-Key so a retry never queues or bills twice. Creating and cancelling jobs and managing webhook endpoints need the generate scope; reads accept generate or read. Webhooks follow the Standard Webhooks signing scheme, are retried, and every event is also kept in GET /events for 30 days. Certificates verify against the public key set at /.well-known/jwks.json.

Jobs

Asynchronous generation.

GET/jobs

List jobs

Scope generate or read. Your jobs, newest first.

Parameters
limitinteger (query)Page size, 1-100 (default 20).
starting_afterstring (query)Return items after this job id (the previous page's next_cursor).
statusstring (query)Only jobs in this status.
Response 200
objectrequiredobject
datarequiredarray of object
has_morerequiredboolean
next_cursorrequiredstring,nullPass as starting_after for the next page.
POST/jobsscope: generate

Queue a generation job

20/min per key, 40/min per account

Parameters
Idempotency-Keystring (header)Makes retries safe (max 255 chars). Same key + different body → 422.
X-Request-Idstring (header)Your own request id, echoed as Request-Id (8-128 of A-Z a-z 0-9 . _ : -).
Preferstring (header)wait=N (1-60): hold the response until the job finishes or N seconds pass. Answered with Preference-Applied.
GET/jobs/{id}

Get a job

Scope generate or read. Only the account that created the job can read it.

Parameters
idrequiredstring (path)Job id (UUID).
Preferstring (header)wait=N (1-60): hold the response until the job finishes or N seconds pass. Answered with Preference-Applied.
POST/jobs/{id}/cancelscope: generate

Cancel a queued job

Scope generate. Only a job still queued can be canceled; it becomes canceled and a job.canceled webhook is sent. Canceling a canceled job returns it unchanged.

Parameters
idrequiredstring (path)Job id (UUID).

Events

The 30-day feed of every job event.

GET/events

List events

Scope generate or read. Every job event of the last 30 days, newest first, whether or not a webhook endpoint received it.

Parameters
limitinteger (query)Page size, 1-100 (default 20).
starting_afterstring (query)Return events after this event id (the previous page's next_cursor).
typestring (query)Only events of this type.
Response 200
objectrequiredobject
datarequiredarray of object
has_morerequiredboolean
next_cursorrequiredstring,nullPass as starting_after for the next page.
GET/events/{id}

Get an event

Scope generate or read. The id is the webhook-id its deliveries carried.

Parameters
idrequiredstring (path)Event id (msg_...).

Webhooks

Signed event delivery and endpoint management.

GET/webhooks

List webhook endpoints

Scope generate or read. Enabled endpoints. Secrets are never returned after creation or rotation.

Response 200
objectrequiredobject
datarequiredarray of object
has_morerequiredboolean
next_cursorrequiredstring,nullPass as starting_after for the next page.
POST/webhooksscope: generate

Create a webhook endpoint

Request body
urlrequiredstringPublic https URL.
eventsarray of stringDefault: all job events.
descriptionstring
GET/webhooks/{id}

Get a webhook endpoint

Parameters
idrequiredstring (path)Webhook endpoint id (UUID).
PATCH/webhooks/{id}scope: generate

Update a webhook endpoint

Parameters
idrequiredstring (path)Webhook endpoint id (UUID).
Request body
urlstring
eventsarray of string
descriptionstring,null
statusenabled | disabled
DELETE/webhooks/{id}scope: generate

Delete (disable) a webhook endpoint

Parameters
idrequiredstring (path)Webhook endpoint id (UUID).
Response 200
idstring
objectobject
deletedobject
POST/webhooks/{id}/rotate_secretscope: generate

Rotate the signing secret

Returns the new secret once. For 24 hours deliveries carry signatures from both the new and the previous secret, then only the new one.

5/min per key

Parameters
idrequiredstring (path)Webhook endpoint id (UUID).
GET/webhooks/{id}/deliveries

List delivery attempts for an endpoint

Parameters
idrequiredstring (path)Webhook endpoint id (UUID).
limitinteger (query)Page size, 1-100 (default 20).
starting_afterstring (query)Return items after this delivery id (the previous page's next_cursor).
Response 200
objectrequiredobject
datarequiredarray of object
has_morerequiredboolean
next_cursorrequiredstring,nullPass as starting_after for the next page.
POST/webhooks/{id}/deliveries/{delivery_id}/retryscope: generate

Resend a past delivery now

For receivers that were down past the retry window. Same webhook-id (dedupe on it), fresh signature and timestamp. One attempt; it does not restart the automatic schedule.

5/min per key

Parameters
idrequiredstring (path)Webhook endpoint id (UUID).
delivery_idrequiredstring (path)Delivery id (UUID) from GET /webhooks/{id}/deliveries.
Response 200
objectobject
delivery_idstring
deliveredboolean
status_codeinteger,null
errorstring,null
POST/webhooks/{id}/testscope: generate

Send a signed webhook.test event now

5/min per key

Parameters
idrequiredstring (path)Webhook endpoint id (UUID).
Response 200
objectobject
deliveredboolean
status_codeinteger,null
errorstring,null

Certificates

Signed likeness certificates.

GET/certificates/{id}

Get a likeness certificate

Scope generate or read. Visible to the account it was issued to and to the talent it measures.

Parameters
idrequiredstring (path)Certificate id (UUID).

Verify

Public, unauthenticated licence and certificate verification.

POST/verify

Verify an output, certificate or licence (public)

No authentication; CORS-enabled. Send exactly one of sha256 (hex SHA-256 of the file), jws (a signed certificate) or license_id. The answer never contains fees, the licensee's identity or internal ids other than the certificate id.

30/min per key

Errors (v2)

v2 errors are RFC 9457 problem documents. Switch on code; retryable says whether the same request can succeed later.

invalid_bodyThe body is not a JSON object.
unsupported_media_typeSend JSON with Content-Type: application/json.
unknown_parameterA body parameter is not recognised (see param).
missing_fieldsRequired body fields are missing.
invalid_model_idmodel_id is not a UUID.
prompt_too_longprompt exceeds 4000 characters.
invalid_fidelity_minfidelity_min is not a number in 0-10.
invalid_metadatametadata is not an object of short string values.
invalid_formatformat is not an accepted value.
renderer_not_approvedrenderer is not approved for licensed talent.
renderer_not_available_hererenderer is approved but Mirai does not render with it.
invalid_resolutionresolution must be 1k or 4k.
invalid_limitlimit must be an integer from 1 to 100.
invalid_statusstatus is not a recognised value.
invalid_cursorstarting_after is not an id from a previous page.
subscription_requiredAn active subscription is required.
subscription_past_dueThe subscription payment failed; update the payment method.
payment_credits_exhaustedNo credits remaining.
trial_model_not_includedThis model is outside your trial access.
model_unavailableThe talent is not currently available (withdrawn, unsigned, or unknown).
model_not_api_licensableThe talent has not opted into partner licensing.
kit_incompleteThe talent's reference kit is not complete yet, so she cannot be used through the API.
identity_unverifiedNo longer returned. ID verification is optional and is not a partner requirement.
brand_country_missingSet your brand country before using this talent.
region_restrictedThis talent is not available in your region.
check_unavailableA permission check could not run; nothing was queued. Retry.
too_many_open_jobsMore than 50 jobs queued or running.
idempotency_key_reusedIdempotency-Key reused with a different body.
invalid_idempotency_keyIdempotency-Key is longer than 255 characters.
idempotency_in_progressA request with this Idempotency-Key is still in progress.
idempotency_unavailableIdempotency store unavailable; nothing was queued. Retry with the same key.
enqueue_failedThe job could not be queued; retry with the same Idempotency-Key.
job_not_foundNo job with this id in your account.
job_not_cancelableOnly a queued job can be canceled.
certificate_not_foundNo certificate with this id visible to you.
insufficient_scopeThe API key lacks the scope this endpoint needs.
excluded(job error) The concept is outside what the talent agreed to.
policy_denied(job error) The output was refused by the safety system.
fidelity_below_minimum(job error) The certificate did not reach fidelity_min.
generation_failed(job error) Generation failed after retries.
canceled(job error) The job was canceled.
invalid_webhook_urlWebhook url is not a public https URL.
invalid_eventsevents contains an unknown event type.
invalid_descriptiondescription is longer than 200 characters.
empty_updateAn update must change at least one field.
webhook_not_foundNo webhook endpoint with this id in your account.
webhook_disabledThe endpoint is disabled; enable it before resending.
delivery_not_foundNo delivery with this id for this endpoint.
delivery_in_progressThe delivery is still queued or being attempted.
event_not_foundNo event with this id in your account (events are kept 30 days).
invalid_event_typetype is not a recognised event type.
invalid_api_versionMirai-Version is not a supported version (2026-09-26).
too_many_webhook_endpointsEndpoint limit (10) reached.
rotation_conflictThe secret changed during rotation; retry.
api_v2_not_provisionedThis feature is not provisioned on this deployment yet.
invalid_verify_requestSend exactly one well-formed sha256, jws or license_id.
rate_limitedToo many requests.
internal_errorSomething failed on our side; quote request_id.
Mirai API Reference: The Licensed Likeness API