Suede x402 API endpoints
Three endpoints, one payment rail. Each is a POST to https://app.suedeai.ai, priced per call in USDC on Base, and a paid call returns a job you can poll for free. The figures below come from the live discovery document and OpenAPI spec. They were first checked on 2026-10-11, and the prices, payment terms, routes and response codes were checked again on 2026-11-25.
The three paid endpoints
| Endpoint | What you get | Price | amount | Poll route |
|---|---|---|---|---|
POST /create-music | A complete original song with vocals, melody and full arrangement, as a finished MP3 | $0.50 | 500000 | GET /api/songs/{songId} |
POST /agent/video | An 8-second 720p clip with native audio | $4.99 | 4990000 | GET /agent/video/{jobId} |
POST /agent/image | One hosted still image, PNG or JPEG | $0.15 | 150000 | GET /agent/image/{jobId} |
amount is the price in USDC base units (6 decimals), exactly as it appears in the 402 challenge and the value you sign. Each endpoint takes a JSON body in which prompt is the only required field.
Which endpoint fits the job
Pick by the asset you need to ship. The uses below are the ones each endpoint's live discovery entry names.
| You need | Call | What to put in the prompt |
|---|---|---|
| A soundtrack under video, a podcast or game theme, a release-ready artist track or a demo sketch | POST /create-music | Genre, mood, instrumentation and tempo. Supply your own lyrics, ask for an instrumental, or pin a style tag. |
| Short-form video, b-roll, a product shot, music-video visuals, a social clip or an ad | POST /agent/video | The scene and its sounds. Audio is generated from what the scene describes, so a silent scene renders near-silent. |
| Album or single cover art, a thumbnail, social or campaign graphics, concept art, a storyboard frame or an article illustration | POST /agent/image | The picture, plus an aspectRatio that matches the placement. |
A finished song from Create Music already comes with cover art in image_url. Call Agent Image when you need artwork in a specific framing, such as a 9:16 story or a 16:9 video thumbnail. Each call is its own purchase, so give each one its own X-Idempotency-Key.
The smallest valid request for each endpoint
Only prompt is required. These bodies are complete:
POST https://app.suedeai.ai/create-music
{"prompt": "Upbeat 80s synthwave with driving bass and neon atmosphere"}
POST https://app.suedeai.ai/agent/video
{"prompt": "Slow push-in on a spinning vinyl record, rain against the window, soft piano and the crackle of the needle"}
POST https://app.suedeai.ai/agent/image
{"prompt": "Album cover, neon city at night, rain on glass"}
The optional fields, with types and limits, are on each endpoint page:
- Create Music:
style,custom_mode,lyrics,make_instrumental,vocal_genderandtags. - Agent Video:
durationSeconds(default8, from3to15) andaspectRatio(16:9,9:16or1:1). - Agent Image:
aspectRatio(ten ratios from1:1to21:9) andoutputFormat(pngorjpeg).
Send the body once without PAYMENT-SIGNATURE to receive the 402 challenge. An unpaid request gets the 402 before the body is validated, so the challenge does not mean the body is valid. Check it against the endpoint page before you sign, because a paid call that fails validation comes back 422.
Payment terms shared by all three
| Field | Value |
|---|---|
x402Version | 2 |
scheme | exact |
network | eip155:8453 (Base mainnet) |
asset | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (USDC; EIP-712 domain "USD Coin", version "2") |
payTo | 0x10FF767043A1723E0BB5B9207bC37D3442cC9E4F |
maxTimeoutSeconds | 300 |
The same PAYMENT-SIGNATURE header also accepts Skyfire pay+jwt and kya-pay+jwt tokens. The product catalog lists Stripe Checkout as a second payment method at the same USD prices: 50, 499 and 15 cents. The quickstart walks through the x402 payment step by step.
Request headers
| Header | Required | Use |
|---|---|---|
Content-Type: application/json | Yes | All three endpoints take a JSON body. |
PAYMENT-SIGNATURE | For a paid call | A base64 x402 PaymentPayload or a Skyfire token. Leave it off the first call to receive the 402 challenge. |
X-Idempotency-Key | No | Up to 200 characters. Resending the same key and body within the cache window returns the original response without charging again. |
Suede-API-Version | No | Pins the API version. The current and only supported value is 1. |
Asynchronous by default
A call that carries PAYMENT-SIGNATURE queues the job and answers 202 Accepted with a pollUrl. Renders take minutes, and x402 and Skyfire clients time out in about 30 seconds, so this keeps your payment client from timing out mid-render. Polling needs no further payment.
?async=falseforces a blocking call that answers200with the finished asset.?async=truequeues the job. Only the literaltrueselects asynchronous mode;1,yesandoncount asfalse.- The body field
asyncModecan switch asynchronous mode on, never off."asyncMode": falseleaves a paid call asynchronous.
All three endpoints answer 202 for a queued job, so a 2xx other than 202 means the asset is already in the body.
Response codes
| Status | Meaning |
|---|---|
202 | Paid call accepted and queued. Poll pollUrl. |
200 | Blocking call finished, with the asset in the body. |
400 | Bad request, for example an unsupported Suede-API-Version. |
402 | Payment required, or the payment was not accepted. |
413 | Create Music only: the JSON body exceeds the 64 KiB ceiling, or a lower configured upload limit. |
422 | The body failed validation. A paid request that fails validation is not charged. |
429 | Rate-limited. Wait for Retry-After. |
5XX | Server or upstream failure. Not charged; retry with the same X-Idempotency-Key. |
Bodies, headers and retry rules for each code are on the errors page.
Collect the result: two poll shapes
Video and image polls follow the same jobId and status pattern. Music returns the song row instead, so a client that handles all three needs two parsers.
| Endpoint | Poll route | Finished when | Asset field | Unknown id |
|---|---|---|---|---|
/create-music | GET /api/songs/{songId} | model_version is no longer pending | audio_url | 404 |
/agent/video | GET /agent/video/{jobId} | status is completed or failed | videoUrl | 200 with status failed |
/agent/image | GET /agent/image/{jobId} | status is completed or failed | imageUrl | 200 with status failed |
For music, audio_url holds a placeholder cover image until the track is rendered, so read model_version first. A model_version of failed is final. Save the pollUrl from the 202 before you do anything else: a restarted worker should resume that poll, not buy the asset again.
Budget a batch of calls
Each call is priced on its own. Multiply the per-call price by the number of renders you plan to buy:
| Batch | Total | Total in base units |
|---|---|---|
| 10 images | $1.50 | 1500000 |
| 10 songs | $5.00 | 5000000 |
| 10 video clips | $49.90 | 49900000 |
Polls, requests that fail validation (422), server failures (5XX) and a resend with the same X-Idempotency-Key and body within the cache window add nothing. A changed prompt or a deliberate second take is a new purchase. For an agent that spends on its own, set a server-side cap and compare each challenge's amount with it before signing, as the quickstart describes.
Frequently asked questions
Do I need a Suede account or an API key to call these endpoints?
No. The public x402 flow needs no Suede account and no API key. Your wallet signs a USDC payment on Base, and the same HTTP request carries it in the PAYMENT-SIGNATURE header.
Do I need ETH on Base to pay for gas?
No. Under the x402 exact scheme the facilitator submits the USDC transfer and pays the gas. Your signature fixes the amount and the recipient.
Can I pay without signing a USDC transfer myself?
The PAYMENT-SIGNATURE header also accepts Skyfire pay+jwt and kya-pay+jwt tokens. The product catalog lists Stripe Checkout as a second payment method at the same USD prices. The Python SDK signs the x402 payment for you if you would rather not write signing code.
Why did my paid call return 202 instead of the file?
Paid calls are asynchronous by default. A render takes minutes and payment clients time out in about 30 seconds, so the call queues the job and returns a pollUrl. Poll it for free, or add ?async=false to block until the asset is ready.
Am I charged when a request fails?
Not for a 422 validation failure, a 5XX server failure, any poll, or a resend with the same idempotency key and body within the cache window. Retry a 5XX with the same X-Idempotency-Key.
Are the older /v1 routes still available?
They are not in the live x402 manifest. The Python SDK still ships helpers for some older /v1/* routes, but new integrations should target the three endpoints on this page.
Where do I check the current price before I sign?
Read app.suedeai.ai/.well-known/x402. Prices are enforced on the server, and the amount in the 402 challenge is the value to sign.
Sources
- app.suedeai.ai/.well-known/x402: resources, prices and payment requirements.
- app.suedeai.ai/openapi.json: headers, the
asyncparameter and response codes. - app.suedeai.ai/api/v1/catalog: product descriptions and payment methods.
For every machine-readable format these endpoints are published in, see discovery documents and MCP server.