POST https://api.percify.io/v3/playground/v1/run starts one generation on a Percify model and returns right away with a generation id and the credits it charged. The result is not in this response: read it with GET /v1/generations/{id} or receive it on a webhook.
Headers
string
required
Bearer pk_live_…. See Authentication.string
Any unique string you choose, such as a UUID. If you send the same key again, Percify returns the generation it already created instead of starting and charging a second one. Keys are kept per account; the first 255 characters count.
Body
string
required
A model id from
GET /v1/models, for example gpt-image-2, zonos2 or infinitetalk-fast. An id that is not in the public catalog returns 400 with the list of available ids.object
required
The model’s inputs. Each model publishes its own JSON Schema as
input_schema in GET /v1/models/{id}. Required fields must be present, values of enum fields must match the listed options, and media fields take URLs Percify can download, so use public https links.string
An
https URL that Percify POSTs to once when the generation succeeds or fails. It must resolve to a public address. See Webhooks.Response
boolean
true when the run started.string
The generation id, a UUID. Keep it to poll the result.
string
The model id you sent.
object | null
null until the run succeeds.string | null
null for a new run.integer
Credits taken from your balance for this run. They are refunded if it fails.
string
When the run started, as an ISO 8601 timestamp.
Example
201 Response
What happens before a run is charged
Percify checks these in order and returns an error without charging when one fails:- The key is valid and under 60 requests a minute.
- The model id is in the public catalog.
- The
webhook, when given, is a validhttpsURL on a public host, andinputis an object. - If the
Idempotency-Keywas used before, the existing generation is returned here. - Your account is under 60 generation starts a minute.
- Required inputs are present and
enumvalues are valid. - For models billed by audio or video length, the media URL can be reached and read.
- The key’s Monthly credit cap allows the run.
- Text prompts and image inputs pass content moderation.
- Your balance covers the price.
503 (retry later) or 400.
Errors
The full list is on Errors and rate limits.
Tips
- Price a run first with
POST /v1/estimate. It takes the same body and never charges. - A single URL sent to a field that expects a list, such as
input_images, is treated as a one-item list. - SVG image links are converted to PNG before the model sees them.
- Send an
Idempotency-Keywhenever your code retries after a timeout. Without it, a retry starts and charges a second run.
Related
Get a generation
Poll or long-poll until the output is ready.
List models
Model ids, input schemas and pricing types.
Estimate cost
The exact credit price, with no charge.
Webhooks
Get the result pushed to your server.