{"openapi":"3.1.0","info":{"title":"OfflineCreator Studio agent commerce","version":"1.0.0","description":"Machine-payable generation. Runtime 402 challenges are authoritative. Amounts are dynamic per locked quote."},"servers":[{"url":"https://offlinecreatorstudio.com"}],"x-service-info":{"name":"OfflineCreator Studio","categories":["media","generation","compute"],"docs":{"homepage":"https://offlinecreatorstudio.com/mcp-cli","x402":"https://offlinecreatorstudio.com/x402"}},"paths":{"/api/v1/generations":{"post":{"operationId":"startGeneration","summary":"Start a priced generation","description":"Authenticated generation. Insufficient credits emit an MPP or x402 402 challenge priced at the locked quote.","x-payment-info":{"intent":"charge","method":"stripe","amount":1,"currency":"usd","description":"Per-model generation price, from 1 cent(s). The 402 challenge is authoritative."},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationRequest"}}}},"responses":{"200":{"description":"Generation reserved or queued"},"401":{"description":"API key or MCP OAuth required"},"402":{"description":"Payment required (MPP and/or x402)"}}}},"/api/v1/generations/quote":{"post":{"operationId":"quoteGeneration","summary":"Lock a generation quote","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["modelId"],"properties":{"modelId":{"type":"string"},"aspectRatio":{"type":"string"},"options":{"type":"object"}}}}}},"responses":{"200":{"description":"Locked quote"}}}},"/api/agent/models":{"get":{"operationId":"listPayPerGenerationModels","summary":"Public model catalog with prices, no account required","description":"Unauthenticated. Lists every launch model with its base price in USD, credit cost, supported aspect ratios, and whether it can be bought anonymously. Models needing an uploaded input are marked payPerGeneration false. Options can change the price, so the 402 challenge stays authoritative.","responses":{"200":{"description":"Model catalog with base prices"}}}},"/api/agent/generate":{"post":{"operationId":"payPerGeneration","summary":"Pay per generation over x402, no account required","description":"Unauthenticated. The first call returns HTTP 402 with x402 payment requirements priced from the model catalog; retrying with a PAYMENT-SIGNATURE header settles the payment and starts the generation. No credit balance is involved and no signup is required. The response carries a claim token for polling and download. Settlement is USDC, so there is no card minimum and a one-credit image costs one cent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["modelId"],"properties":{"modelId":{"type":"string"},"prompt":{"type":"string"},"aspectRatio":{"type":"string"}}}}}},"responses":{"200":{"description":"Payment settled and generation started"},"402":{"description":"x402 PAYMENT-REQUIRED with the quoted price"},"503":{"description":"Rail not configured on this deployment"}}}},"/api/agent/generate/{id}":{"get":{"operationId":"claimGeneration","summary":"Poll status and download a prepaid generation","description":"Present the claim token from the paid response, either as `Authorization: Claim <token>` or a `claim` query parameter. Completed jobs return a short-lived signed output URL.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"claim","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Status, and an output URL once completed"},"401":{"description":"Claim token missing"},"404":{"description":"No prepaid generation matches that claim"}}}},"/api/v1/checkout/x402":{"post":{"operationId":"topUpX402","summary":"Buy a credit pack over x402 USDC","x-payment-info":{"offers":[{"intent":"charge","method":"stripe","amount":"1500","currency":"usd","description":"topup-1000 (1,000 credits) via MPP Stripe SPT or human Stripe"},{"intent":"charge","method":"stripe","amount":"3900","currency":"usd","description":"topup-3000 (3,000 credits)"}]},"responses":{"200":{"description":"Credits granted"},"402":{"description":"x402 PAYMENT-REQUIRED"}}}},"/api/acp/checkout_sessions":{"post":{"operationId":"createAcpCheckout","summary":"Create an ACP checkout session for a generation","x-payment-info":{"intent":"charge","method":"stripe","amount":1,"currency":"usd","description":"ACP checkout priced from the locked generation quote, from 1 cent(s). Card settlement has a 50 cent floor; smaller amounts settle over x402."},"responses":{"200":{"description":"Checkout session"},"402":{"description":"Payment required on complete"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Studio API key or MCP OAuth access token."}},"schemas":{"GenerationRequest":{"type":"object","required":["modelId"],"properties":{"modelId":{"type":"string"},"prompt":{"type":"string"},"aspectRatio":{"type":"string"},"options":{"type":"object","additionalProperties":true},"quoteToken":{"type":"string"},"maxCredits":{"type":"integer","minimum":1,"description":"Spend ceiling in credits. A locked quote above it is refused with 409 MAX_CREDITS_EXCEEDED before anything is reserved or charged."}}}}},"security":[{"bearerAuth":[]}]}