GPT Image 1 generation via micropayments — pay per image with USDC on Base, no API keys needed.
What it does
This endpoint provides access to OpenAI's GPT Image 1 model for image generation through StableStudio's pay-per-call micropayment infrastructure. The specific route listed is `/api/generate/gpt-image-1/generate`, though the OpenAPI spec documents the newer `gpt-image-1.5` variant at a slightly different path. The endpoint accepts a POST with a JSON body containing a prompt and optional parameters for quality, size, background transparency, output format, and moderation level. Pricing for GPT Image 1.5 generation ranges from $0.009 to $0.20 per call depending on quality and resolution settings. Generation takes approximately 3 seconds.
Payment is handled via the MPP protocol (Tempo method on Base L2) or x402. Calling the endpoint without a payment header returns a 402 with a `PAYMENT-REQUIRED` header containing base64-encoded USDC payment requirements. After signing and submitting payment, the endpoint returns a job ID which must be polled via `GET /api/jobs/{jobId}` using SIGN-IN-WITH-X wallet authentication until the image URL is available. No API keys or subscriptions are required — only a crypto wallet with USDC on Base.
StableStudio is a broader platform offering multiple image and video models (Nano Banana Pro, Flux 2 Pro, Grok, Seedance, Wan, Sora, Veo) all accessible through the same micropayment pattern. An MCP server is available via `npx -y agentcash@latest` for agent integration. Note: the probe returned 405 on HEAD/GET because this is a POST-only endpoint — the endpoint is live and correctly documented in the OpenAPI spec.
Capabilities
Use cases
- —Generate images from text prompts with per-call crypto micropayments
- —Create images with transparent backgrounds for design assets
- —Agent-driven image generation without API key management
- —Programmatic image creation with quality/size/format controls
- —Low-cost image generation starting at $0.009 per image
Fit
Best for
- —Agents and bots needing on-demand image generation without subscriptions
- —Developers who want to pay per generation with USDC rather than monthly plans
- —Applications requiring transparent PNG output or multiple format options
- —Low-volume or bursty image generation workloads
Not for
- —Users without a crypto wallet or USDC on Base
- —High-throughput batch image processing (async polling adds latency)
- —Applications requiring synchronous image responses
Quick start
# 1. POST without payment to get 402 challenge
curl -X POST https://stablestudio.dev/api/generate/gpt-image-1/generate \
-H 'Content-Type: application/json' \
-d '{"prompt": "A cat in a spacesuit on Mars"}"
# Returns 402 with PAYMENT-REQUIRED header (base64 JSON)
# 2. Decode header, sign USDC payment, re-POST with PAYMENT-SIGNATURE header
# 3. Poll GET /api/jobs/{jobId} with SIGN-IN-WITH-X header until completeExample
Request
{
"size": "1024x1024",
"prompt": "A cat in a spacesuit on Mars, photorealistic",
"quality": "high",
"background": "opaque",
"moderation": "auto",
"output_format": "png"
}Response
{
"type": "gpt-image-1-generate",
"jobId": "abc123-def456",
"status": "pending",
"success": true
}Endpoint
Quality
Full OpenAPI schema with detailed input/output specs, clear pricing ($0.009–$0.20), documented payment flow, and agents.txt present. The probe returned 405 because HEAD/GET were used on a POST-only endpoint — the endpoint is live per the OpenAPI spec. Minor deductions: the listed path uses 'gpt-image-1' but the OpenAPI spec documents 'gpt-image-1.5', creating slight ambiguity; no dedicated docs page exists (404).
Warnings
- —The listed endpoint path uses 'gpt-image-1' but the OpenAPI spec documents 'gpt-image-1.5' — these may be different model versions or the path may have been updated
- —Probe returned 405 because HEAD/GET were tried on a POST-only endpoint — not an indication the endpoint is down
- —No dedicated documentation page exists at /docs (returns 404); all docs are embedded in the OpenAPI spec x-guidance field
- —Requires a crypto wallet with USDC on Base (EIP-155:8453) for payment
Citations
- —GPT Image 1.5 generation costs $0.009–$0.20 per call and takes ~3shttps://stablestudio.dev
- —Payment is via USDC on Base (EIP-155:8453) with x402 or MPP Tempo protocolhttps://stablestudio.dev
- —MCP server available via npx -y agentcash@latesthttps://stablestudio.dev
- —GPT Image 1.5 generate accepts prompt, quality, size, background, output_format, moderation parametershttps://stablestudio.dev
- —Successful generation returns jobId with pending status, polled via GET /api/jobs/{jobId}https://stablestudio.dev