Pay for one generation with this request (Machine Payments Protocol, HTTP 402) — no credits
Changed onThe first call quotes one job and returns 402: the body names job_id, model and amount; WWW-Authenticate: Payment carries a challenge bound to that job. Pay it (card through a Stripe Link agent wallet; USDC is accepted for credit top-ups, not here yet) and send the same request again with Authorization: Payment <credential>; that runs exactly that job. An image is returned in the response; a video starts and is polled at GET /v1/jobs/{job_id} (the same id). Price: the credits price for the job, at least $0.50 (card minimum), at most $50. A job that fails after payment is refunded. Send the Varosity key as X-API-Key. Media-driven models (length set by supplied audio/video) are not offered here.
Request
- Base URL: https://varosity.ai/api
- URL: https://varosity.ai/api/v1/pay/generate
- Auth: API key in header X-API-Key
Request body
Response
Paid: { job_id, status (succeeded | running), output_url, poll_url (video), amount_cents, payment_reference } plus a Payment-Receipt header
Changes
- info
the endpoint scheme security
apiKeyHeaderwas added to the API - info
added the non-success response with the status
- info