Skip to main content
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.
string
processing for a new run. See statuses.
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:
  1. The key is valid and under 60 requests a minute.
  2. The model id is in the public catalog.
  3. The webhook, when given, is a valid https URL on a public host, and input is an object.
  4. If the Idempotency-Key was used before, the existing generation is returned here.
  5. Your account is under 60 generation starts a minute.
  6. Required inputs are present and enum values are valid.
  7. For models billed by audio or video length, the media URL can be reached and read.
  8. The key’s Monthly credit cap allows the run.
  9. Text prompts and image inputs pass content moderation.
  10. Your balance covers the price.
If the model cannot start the job after the charge, the credits are refunded in the same request and you get a 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-Key whenever your code retries after a timeout. Without it, a retry starts and charges a second run.

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.
Last modified on September 16, 2026