Catalog
AIPOSTlive

Image generation (async)

Submit an async StableStudio image-generation job from a text prompt; poll ai/image-generate-async-status with the returned jobId for the completed image assets.

$0.02-$0.50
per call
Success
100%
p50 latency
2.12s
p95 latency
2.31s
Calls (30d)
2
FlowImage generation (async) (this step) →Generation job status(free)— the response's native job handle feeds step ②; agents get the same provider-pinned hint in h402.followUp.

Provider contract

Call path
/routes/stablestudio/ai/image-generate-async
Method
POST
Selected provider
stablestudiodefault
Provider price
Dynamic $0.02-$0.50; quote required
Settlement
Base USDC · x402 · 5% h402 fee

Quickstart

Both commands call the selected provider directly.

cURL
curl -X POST '/routes/stablestudio/ai/image-generate-async' \
  -H 'content-type: application/json' \
  -d '{"prompt":"A minimal flat illustration of a router directing colorful packets, dark background","model":"flux-2-pro"}'
CLI
h402 call 'ai/image-generate-async' --provider 'stablestudio' --method POST --json '{"prompt":"A minimal flat illustration of a router directing colorful packets, dark background","model":"flux-2-pro"}'

Parameters & live test

pays real USDC

Fill the request fields, quote the exact per-call total, then choose x402 or eligible bonus credit explicitly before sending. Only the selected provider's listed parameters are accepted.

promptstringrequired

Text prompt describing the image.

modelstringoptionaldefault flux-2-pro

Generation model; each quotes its own price. Optional — defaults to flux-2-pro when omitted; provider-native, so pin /routes/stablestudio to choose one.

One of
aspect_ratiostringoptional

Provider-native aspect ratio for FLUX and Grok models.

e.g.
aspectRatiostringoptional

Provider-native aspect ratio for Nano Banana models.

e.g.
POST/routes/stablestudio/ai/image-generate-async
Request body
{
  "prompt": "A minimal flat illustration of a router directing colorful packets, dark background",
  "model": "flux-2-pro"
}

This starts a job — poll Generation job status (ai/image-generate-async-status) for the final result.

ResponseExample response
{
  "data": {
    "success": true,
    "jobId": "cmrw9dqf6000004l2011tp4c0",
    "status": "pending",
    "type": "flux-2-pro-generate",
    "pollUrl": "https://stablestudio.dev/api/jobs/cmrw9dqf6000004l2011tp4c0"
  },
  "h402": {
    "routeId": "ai/image-generate-async",
    "provider": "stablestudio",
    "selectedCandidateId": "ai/image-generate-async/stablestudio",
    "routing": "manual",
    "followUp": {
      "routeId": "ai/image-generate-async-status",
      "path": "/routes/stablestudio/ai/image-generate-async-status",
      "method": "GET",
      "params": {
        "jobId": "cmrw9dqf6000004l2011tp4c0"
      },
      "docsUrl": "https://h402-test.hunt.town/catalog/ai/image-generate-async-status",
      "instruction": "This response is a job receipt, not the final result. Poll GET /routes/stablestudio/ai/image-generate-async-status with the returned id as jobId (free) until the provider reports completion — terminal status labels are provider-native, and a failure status means the job errored. Final-result example: https://h402-test.hunt.town/catalog/ai/image-generate-async-status"
    },
    "paidBy": "x402-exact"
  }
}

Providers

Choose a provider for this task. The catalog recommends the current default from quality, reliability, and price; your selected provider stays pinned. Listed prices are provider prices; settlement adds a 5% h402 fee.

stablestudio
x402
100
Success
100%
p50
2.12s
Calls
2
100%
Dynamic $0.02-$0.50; quote required$0.030/call
Last successful call: 26d ago· Aggregated by h402 — not the source provider