{"openapi":"3.1.0","info":{"title":"Gondola Gateway","version":"1.0.0","description":"OpenAI-compatible and Anthropic-compatible inference over the Venice AI model catalog. Two ways to pay. (1) Pay per request with x402, protocol v2 or v1: POST with no credentials and the 402 carries the live price twice, as a PAYMENT-REQUIRED response header (x402 v2 envelope, base64 JSON) and as this v1 JSON body. Sign the authorization (USDC on Base, EIP-3009), retry with the PAYMENT-SIGNATURE header (v2) or the X-PAYMENT header (v1), and read the PAYMENT-RESPONSE / X-PAYMENT-RESPONSE receipt off the served response. No account, no API key, and any overpayment banks as reusable wallet credit. (2) Bring a Bearer key (gnd_...) minted at https://gondola-ai.com/wallet and top up a balance instead. Prices are per request and set by a marketplace of lenders, so they move; always read the current one from the 402 challenge or from GET https://api.gondola-ai.com/v1/models.","contact":{"name":"Gondola","url":"https://gondola-ai.com","email":"support@gondola-ai.com"}},"x-guidance":"Agents: list models at GET /models (free, no auth). To pay per request, POST the endpoint with no Authorization header and no payment header; the 402 carries the exact atomic USDC amount, the recipient and the EIP-712 domain, both in the PAYMENT-REQUIRED response header (x402 v2) and in the v1 JSON body's accepts[0]. Sign it, resend the identical request with the PAYMENT-SIGNATURE header (v2) or the X-PAYMENT header (v1), and keep the PAYMENT-RESPONSE / X-PAYMENT-RESPONSE header as your receipt. Overpaying is safe: the surplus is credited to the paying wallet and spends on later requests. Optional request headers: x-gondola-max-charge-usd caps the absolute USD charge for one request, x-gondola-max-factor caps the price multiple you will accept. Both refuse cleanly rather than silently filling at a higher price.","servers":[{"url":"https://api.gondola-ai.com/v1","description":"Gondola gateway"}],"paths":{"/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Create a chat completion (OpenAI compatible)","description":"OpenAI-compatible chat completions across the Venice AI model catalog. Pay per request in USDC on Base via x402, with no account and no API key. Overpayment is never lost: it banks as reusable wallet credit for your next call. Model ids and live prices: GET https://api.gondola-ai.com/v1/models.","x-payment-info":{"protocol":"x402","x402Version":1,"scheme":"exact","network":"base","asset":"USDC","pricing":"dynamic per request","discovery":"POST without an X-PAYMENT header to receive a 402 challenge with the live price."},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id to run, e.g. from GET /v1/models. Official provider spellings also resolve."},"messages":{"type":"array","description":"OpenAI chat messages, each { role, content }."},"max_tokens":{"type":"number","description":"Upper bound on generated tokens. Also bounds what the request can cost."},"stream":{"type":"boolean","description":"Set true for a server-sent-events stream of the completion."},"temperature":{"type":"number","description":"Sampling temperature. Costs nothing extra; clamped to the model's range."}},"required":["model","messages"]}}}},"responses":{"200":{"description":"A chat completion. With stream: true the response is a text/event-stream of OpenAI-shaped chunks instead.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"model":{"type":"string"},"choices":{"type":"array"},"usage":{"type":"object"}}}}}},"400":{"description":"Request refused. The body carries a machine readable code.","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required. Sign one of `accepts` as an EIP-3009 USDC authorization and retry with the X-PAYMENT header; the served response carries an X-PAYMENT-RESPONSE receipt.","content":{"application/json":{"schema":{"type":"object","required":["x402Version","error","accepts"],"properties":{"x402Version":{"type":"integer","const":1},"error":{"type":"string","description":"Human readable reason the request was not served."},"accepts":{"type":"array","description":"Payment options. Pick one, sign it, and retry with the X-PAYMENT header.","items":{"type":"object","properties":{"scheme":{"type":"string","description":"Always \"exact\"."},"network":{"type":"string","description":"Always \"base\"."},"maxAmountRequired":{"type":"string","description":"Atomic USDC units (6 decimals) required for this request."},"resource":{"type":"string","description":"Canonical URL this payment is for."},"description":{"type":"string"},"mimeType":{"type":"string"},"payTo":{"type":"string","description":"Recipient address."},"maxTimeoutSeconds":{"type":"integer"},"asset":{"type":"string","description":"USDC contract address on Base."},"extra":{"type":"object","description":"EIP-712 domain the payer signs against."},"outputSchema":{"type":"object","description":"Request and response shape for agents."},"extensions":{"type":"object","description":"Discovery metadata, e.g. extensions.bazaar."}}}}}}}}},"503":{"description":"Request refused. The body carries a machine readable code.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/images/generations":{"post":{"operationId":"createImage","summary":"Generate images (OpenAI compatible)","description":"OpenAI-compatible image generation across the Venice AI model catalog. Pay per request in USDC on Base via x402, with no account and no API key. Overpayment is never lost: it banks as reusable wallet credit for your next call. Model ids and live prices: GET https://api.gondola-ai.com/v1/models.","x-payment-info":{"protocol":"x402","x402Version":1,"scheme":"exact","network":"base","asset":"USDC","pricing":"dynamic per request","discovery":"POST without an X-PAYMENT header to receive a 402 challenge with the live price."},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Image model id, e.g. from GET /v1/models."},"prompt":{"type":"string","description":"Text prompt describing the image to generate."},"n":{"type":"number","description":"How many images to generate, 1 to 4. Each one is priced and billed."},"size":{"type":"string","description":"Requested size, e.g. \"1024x1024\". Resolved to the nearest tier the model prices."},"format":{"type":"string","description":"Output image format, \"png\" or \"webp\"."}},"required":["model","prompt"]}}}},"responses":{"200":{"description":"Generated images, base64 encoded in data[].b64_json.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"number"},"data":{"type":"array"}}}}}},"400":{"description":"Request refused. The body carries a machine readable code.","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required. Sign one of `accepts` as an EIP-3009 USDC authorization and retry with the X-PAYMENT header; the served response carries an X-PAYMENT-RESPONSE receipt.","content":{"application/json":{"schema":{"type":"object","required":["x402Version","error","accepts"],"properties":{"x402Version":{"type":"integer","const":1},"error":{"type":"string","description":"Human readable reason the request was not served."},"accepts":{"type":"array","description":"Payment options. Pick one, sign it, and retry with the X-PAYMENT header.","items":{"type":"object","properties":{"scheme":{"type":"string","description":"Always \"exact\"."},"network":{"type":"string","description":"Always \"base\"."},"maxAmountRequired":{"type":"string","description":"Atomic USDC units (6 decimals) required for this request."},"resource":{"type":"string","description":"Canonical URL this payment is for."},"description":{"type":"string"},"mimeType":{"type":"string"},"payTo":{"type":"string","description":"Recipient address."},"maxTimeoutSeconds":{"type":"integer"},"asset":{"type":"string","description":"USDC contract address on Base."},"extra":{"type":"object","description":"EIP-712 domain the payer signs against."},"outputSchema":{"type":"object","description":"Request and response shape for agents."},"extensions":{"type":"object","description":"Discovery metadata, e.g. extensions.bazaar."}}}}}}}}},"503":{"description":"Request refused. The body carries a machine readable code.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/messages":{"post":{"operationId":"createMessage","summary":"Create a message (Anthropic Messages compatible)","description":"Anthropic Messages compatible completions across the Venice AI model catalog. Pay per request in USDC on Base via x402, with no account and no API key. Overpayment is never lost: it banks as reusable wallet credit for your next call. Model ids and live prices: GET https://api.gondola-ai.com/v1/models.","x-payment-info":{"protocol":"x402","x402Version":1,"scheme":"exact","network":"base","asset":"USDC","pricing":"dynamic per request","discovery":"POST without an X-PAYMENT header to receive a 402 challenge with the live price."},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Model id to run, e.g. from GET /v1/models. Claude spellings also resolve."},"messages":{"type":"array","description":"Anthropic messages, each { role, content }."},"max_tokens":{"type":"number","description":"Required by the Anthropic contract. Upper bound on generated tokens."},"system":{"type":"string","description":"Optional system prompt, as a string or content blocks."},"stream":{"type":"boolean","description":"Set true for a server-sent-events stream of Anthropic message events."}},"required":["model","messages","max_tokens"]}}}},"responses":{"200":{"description":"An Anthropic message. With stream: true the response is a text/event-stream of Anthropic message events instead.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"role":{"type":"string"},"model":{"type":"string"},"content":{"type":"array"},"stop_reason":{"type":"string"},"usage":{"type":"object"}}}}}},"400":{"description":"Request refused. The body carries a machine readable code.","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"Payment required. Sign one of `accepts` as an EIP-3009 USDC authorization and retry with the X-PAYMENT header; the served response carries an X-PAYMENT-RESPONSE receipt.","content":{"application/json":{"schema":{"type":"object","required":["x402Version","error","accepts"],"properties":{"x402Version":{"type":"integer","const":1},"error":{"type":"string","description":"Human readable reason the request was not served."},"accepts":{"type":"array","description":"Payment options. Pick one, sign it, and retry with the X-PAYMENT header.","items":{"type":"object","properties":{"scheme":{"type":"string","description":"Always \"exact\"."},"network":{"type":"string","description":"Always \"base\"."},"maxAmountRequired":{"type":"string","description":"Atomic USDC units (6 decimals) required for this request."},"resource":{"type":"string","description":"Canonical URL this payment is for."},"description":{"type":"string"},"mimeType":{"type":"string"},"payTo":{"type":"string","description":"Recipient address."},"maxTimeoutSeconds":{"type":"integer"},"asset":{"type":"string","description":"USDC contract address on Base."},"extra":{"type":"object","description":"EIP-712 domain the payer signs against."},"outputSchema":{"type":"object","description":"Request and response shape for agents."},"extensions":{"type":"object","description":"Discovery metadata, e.g. extensions.bazaar."}}}}}}}}},"503":{"description":"Request refused. The body carries a machine readable code.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/models":{"get":{"operationId":"listModels","summary":"List available models and prices","description":"Free, unauthenticated. Returns every routable model with its buyer-inclusive price, modality, privacy classification and capability flags.","security":[],"responses":{"200":{"description":"The model catalog.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"data":{"type":"array"}}}}}}}}}}}