/v1 only ever add. A field, an error code or a value you don’t know yet can appear in any answer, so read what you need and ignore the rest. An endpoint marked beta can change or go away without the 180 days’ notice a stable one gets; its answers carry "beta": true, and it stays out of the API reference until it is stable.
Photo checks, plans, the saved photo, and why a run failed
New in beta
POST /v1/photo-checkschecks a photo you uploaded before you run it. Send{ "file": "file_..." }with a key that hasgenerations:write. The answer hasfaces,adult,framing(full,waistorface),setting(outdoororindoor),blockedandmoderation_reason. A run of the same photo reuses the answer, and checks are free. See Photos of people.POST /v1/plansturns a person’s own words into what to run. Send{ "ask": "me as a giant in Paris" }with a key that hasgenerations:read. The answer’srouteisrun,clarify,free_tool,api,refuse,link,emptyorno_match, with up to threeoptions, each amodeland theinputthe words filled, itscost_usd, and whether the welcome credit covers it. Nothing runs and nothing is stored. Agents get the same answer from the MCP toolplan.GET,PUTandDELETE /v1/me/photo?workspace=<slug>read, keep and delete a person’s saved photo in one workspace. It takes the person’s studio session, not an API key: a key belongs to the workspace, which has no person behind it, so a script passes a file ID in each run instead. Keeping a photo needsis_me: trueand a photo with exactly one adult face.POST /v1/ask-draftskeeps up to 280 characters typed on tryleap.ai for an hour and answers anask_...ID, so the words travel through sign-in by ID and never in a URL. It takes no key, and only the site’s own origin can read the answer in a browser. Each address can keep 20 asks every ten minutes.
New endpoint
DELETE /v1/files/{id}deletes a file you uploaded and its bytes, and answers{ "id": "file_...", "object": "file", "deleted": true }. Runs that used it keep their results. See Delete a file.
New fields
- A generation has
failure_causewhen it failed:provider_error,provider_refused,photo_blocked,timeout,outage,input_removedorinput_rejected, so your code can branch without readingerror.message. It is null on any other run and on failures from before causes were recorded. Treat a value you don’t know asprovider_error. See When a run fails. - A preset’s generation has
slow_atanddeadline_atwhile it runs. Fromslow_atyou can cancel it whatever it has done, and you pay nothing. Atdeadline_atLeap stops it, and it fails withfailure_causetimeoutat no cost. - A preset’s
previewis now a smaller JPEG, about 960 pixels on its long side, at a link that works for 10 minutes. Read the run again for a fresh link. - Each model on
/v1/modelshasexpected_seconds, how long Leap’s own runs of it took at its defaults. Each effect hasphoto, what its photo must show (framingandsetting), and a video preset that makes a picture first hasstill, the frame of the clip that picture becomes and whether it shows as thepreview. See Models. GET /v1/creditshaswelcome:statusgrantedwithamount_usd,withheldwhen the sign-up limits held the welcome credit back, ornone. See Pricing.
New error codes
409 file_in_use:DELETE /v1/files/{id}while a run that hasn’t finished uses the file, or while someone in the workspace keeps it as their saved photo. See file_in_use.409 unpaid_failure_cap: a video run in a workspace that has never topped up, once 6 of its video runs have ended without a charge. Images still run, and the first top-up lifts it. Only workspaces created since this shipped meet it, and a workspace that has paid never does. See unpaid_failure_cap.422 photo_blocked: the photo check refused a photo the run was given, before anything was held. The error hasmoderation_reason,minorornudity, andparamnames the input. See photo_blocked.
Changed
- Every photo you uploaded is checked before a run that takes it starts, for every model and preset. When the check can’t run, the run answers
503withRetry-Afterand nothing starts. A workspace’s runs can check 600 new photos an hour, and one with several photos refused as possible minors in a day can’t check new ones for 24 hours; both answer429. - A workspace the unpaid limit doesn’t cover (one that has paid, or was created before this shipped) stops getting a run’s
previewfor the rest of the UTC day once 10 of its runs that showed one have failed for their input. - Canceling a preset run after its
previewstill answers409 conflict, as before, until the run passes itsslow_at.