{"openapi":"3.1.0","info":{"title":"Maximus Media House — AI Agent API","version":"1.0.0"},"paths":{"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/models":{"get":{"summary":"Models View","operationId":"models_view_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/images/generations":{"get":{"summary":"Images Generations Get","operationId":"images_generations_get_v1_images_generations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Images Generations","operationId":"images_generations_v1_images_generations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"summary":" Paid Route Options","description":"Answer the browser preflight without payment (HTTP transport spec).","operationId":"_paid_route_options_v1_images_generations_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/images/edits":{"get":{"summary":"Images Edits Get","operationId":"images_edits_get_v1_images_edits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Images Edits","description":"Reference-conditioned image edit (Qwen-Image-Edit-2511, x402).\n\n`{model, prompt, image|image_url}` -> edited image. The buyer sends the\nSOURCE image + an instruction; the model edits THAT image (identity and\ncomposition preserved). Distinct paid route + Bazaar slot (\"image-edit\").","operationId":"images_edits_v1_images_edits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"summary":" Paid Route Options","description":"Answer the browser preflight without payment (HTTP transport spec).","operationId":"_paid_route_options_v1_images_edits_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/images/queue":{"get":{"summary":"Images Queue","description":"Honest wait-lane status for GPU image gen/edit (box is shared).","operationId":"images_queue_v1_images_queue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/chat/completions":{"get":{"summary":"Chat Completions Get","operationId":"chat_completions_get_v1_chat_completions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Chat Completions","operationId":"chat_completions_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"summary":" Paid Route Options","description":"Answer the browser preflight without payment (HTTP transport spec).","operationId":"_paid_route_options_v1_chat_completions_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/videos/generations":{"post":{"summary":"Videos Generations","operationId":"videos_generations_v1_videos_generations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoGenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/videos/queue":{"get":{"summary":"Videos Queue","description":"Honest wait-lane status: what's rendering, what's queued, estimated wait.\n\nVideo serializes behind the one-GPU lock; a buyer polls this to see their\nplace in line instead of being told a lie about immediate completion.","operationId":"videos_queue_v1_videos_queue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/subscription":{"post":{"summary":"Subscription Topup","description":"Buy prepaid balance for the prepaid-only video rail (GAP 2).\n\nA settled x402 payment of cfg.PREPAID_TOPUP_USD credits `wallet` (body.wallet\nor X-Prepaid-Wallet) with the same amount of balance, which video clips draw\ndown. One on-chain tx credits exactly once (idempotent on tx_hash).","operationId":"subscription_topup_v1_subscription_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscription/balance":{"get":{"summary":"Subscription Balance","description":"Remaining prepaid balance (USDC micro-units) for a wallet.","operationId":"subscription_balance_v1_subscription_balance_get","parameters":[{"name":"wallet","in":"query","required":false,"schema":{"type":"string","default":"","title":"Wallet"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pricing":{"get":{"summary":"V1 Pricing","description":"Machine-readable price list for every SOLD paid route.\n\nroute, method, exact USD price, and the asset + network accepted.","operationId":"v1_pricing_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status":{"get":{"summary":"Status Page","description":"Cheap JSON status: uptime, per-route health, last successful settlement.\n\nCached briefly so a poller cannot turn this into a per-call DB scan or a\nport probe storm.","operationId":"status_page_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/agents.txt":{"get":{"summary":"Agents Txt","description":"Concise machine-readable index of the paid routes (agents.txt).\n\nDescriptive only — names the route, method, price and the model it bills.","operationId":"agents_txt_agents_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/x402.json":{"get":{"summary":"Well Known X402 Dot Json","description":"Alias of /.well-known/x402 — the same envelope, no divergent copy.","operationId":"well_known_x402_dot_json__well_known_x402_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/x402":{"get":{"summary":"Well Known X402","description":"x402 v2 capability manifest (IETF draft-hawkins-x402-dns-discovery-03).\n\nServed so indexers / agents can discover the endpoint's paid x402 surface\nwith one HTTPS GET. Built from the live price card so it cannot drift from\nthe gate. Resource URLs point at this own-domain public base, PLUS the\ncompanion PrepLayer deterministic text-prep rail on a sibling subdomain so\na builder discovering the Agents API also sees PrepLayer. Each PrepLayer\nroute keeps its OWN payTo (PrepLayer treasury), never the agent merchant\nwallet — two services, two receivers, never mixed.","operationId":"well_known_x402__well_known_x402_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/agent-card.json":{"get":{"summary":"Well Known Agent Card","description":"A2A agent card (agent-to-agent discovery).\n\nMirrors how /.well-known/x402 is served (same app, same JSONResponse), so an\nA2A crawler sees a machine-readable card at the well-known path. Skills are\nbuilt from the LIVE price card, so the card cannot drift from the gate.","operationId":"well_known_agent_card__well_known_agent_card_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap Xml","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/server.json":{"get":{"summary":"Server Json","operationId":"server_json_server_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/openapi.json":{"get":{"summary":"Well Known Openapi","operationId":"well_known_openapi__well_known_openapi_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/agents.json":{"get":{"summary":"Agents Json","operationId":"agents_json__well_known_agents_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/agents.json":{"get":{"summary":"Agents Json","operationId":"agents_json_agents_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/llms-full.txt":{"get":{"summary":"Llms Full Txt","description":"Full agent-facing reference — companion to /llms.txt.\n\nRetention shape (Move 3): states the prepaid non-renewal contract VERBATIM\nand documents the per-response `billing` block, so an agent's owner can read\nthe spend contract from a single fetch.","operationId":"llms_full_txt_llms_full_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/mcp":{"post":{"summary":"Mcp Endpoint","description":"Streamable-HTTP MCP endpoint (JSON-RPC 2.0).\n\nSupports `initialize`, `ping`, `tools/list` and `tools/call`. An UNPAID\n`tools/call` returns the x402 PaymentRequired object — carrying the Bazaar\ndiscovery extension — in `structuredContent` with `isError`, so an\nx402-aware MCP client can sign and retry. The house gate is tx-hash based\n(verified on-chain against the merchant wallet), so settlement/execution run\nagainst the REST routes after payment; this endpoint performs the discovery\nand payment-required negotiation for MCP clients.","operationId":"mcp_endpoint_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/jobs/{job_id}/download":{"get":{"summary":"Download","operationId":"download_v1_jobs__job_id__download_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"exp","in":"query","required":true,"schema":{"type":"integer","title":"Exp"}},{"name":"sig","in":"query","required":true,"schema":{"type":"string","title":"Sig"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/artifacts/{sha}":{"get":{"summary":"Artifact","description":"DURABLE content-addressed artifact fetch (composability fix, 2026-10-29).\n\nNo expiry, no signature, no job id — the handle IS the sha256 of the bytes.\nA buyer agent can store, forward, or cite this URL indefinitely; identical\nbytes always resolve to the same file. This is ADDITIVE: the 24h HMAC signed\n/v1/jobs/{id}/download is unchanged and still served for callers that use it.\nServed only for artifacts the server actually produced (path is never built\nfrom user input — the sha is validated flat-hex, then used as a filename).","operationId":"artifact_v1_artifacts__sha__get","parameters":[{"name":"sha","in":"path","required":true,"schema":{"type":"string","title":"Sha"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ChatCompletionRequest":{"properties":{"model":{"type":"string","minLength":1,"title":"Model"},"messages":{"items":{"$ref":"#/components/schemas/ChatMsg"},"type":"array","minItems":1,"title":"Messages"},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature","default":0.7},"max_tokens":{"type":"integer","minimum":1.0,"title":"Max Tokens","default":1024},"stream":{"type":"boolean","title":"Stream","default":false}},"type":"object","required":["model","messages"],"title":"ChatCompletionRequest"},"ChatMsg":{"properties":{"role":{"type":"string","pattern":"^(system|user|assistant)$","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMsg"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageEditRequest":{"properties":{"model":{"type":"string","minLength":1,"title":"Model"},"prompt":{"type":"string","minLength":1,"title":"Prompt"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"size":{"type":"string","title":"Size","default":"1024x1024"},"seed":{"anyOf":[{"type":"integer","maximum":4294967295.0,"minimum":0.0},{"type":"null"}],"title":"Seed"},"response_format":{"type":"string","pattern":"^(url|b64_json)$","title":"Response Format","default":"url"}},"type":"object","required":["model","prompt"],"title":"ImageEditRequest"},"ImageGenRequest":{"properties":{"model":{"type":"string","minLength":1,"title":"Model"},"prompt":{"type":"string","minLength":1,"title":"Prompt"},"n":{"type":"integer","minimum":1.0,"title":"N","default":1},"size":{"type":"string","title":"Size","default":"1024x1024"},"seed":{"anyOf":[{"type":"integer","maximum":4294967295.0,"minimum":0.0},{"type":"null"}],"title":"Seed"},"response_format":{"type":"string","pattern":"^(b64_json|url)$","title":"Response Format","default":"b64_json"},"refs":{"items":{"type":"string"},"type":"array","maxItems":4,"title":"Refs"}},"type":"object","required":["model","prompt"],"title":"ImageGenRequest"},"SubscriptionRequest":{"properties":{"wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet"},"amount_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount Usd"}},"type":"object","title":"SubscriptionRequest","description":"Prepaid top-up (POST /v1/subscription).\n\nA settled x402 payment of cfg.PREPAID_TOPUP_USD credits `wallet` with that\namount of balance (USDC micro-units), which video calls draw down. `wallet`\nidentifies the account to credit and may also arrive via X-Prepaid-Wallet."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoGenRequest":{"properties":{"model":{"type":"string","minLength":1,"title":"Model"},"prompt":{"type":"string","minLength":1,"title":"Prompt"},"seed":{"anyOf":[{"type":"integer","maximum":4294967295.0,"minimum":0.0},{"type":"null"}],"title":"Seed"},"start_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Image"},"start_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Image Url"},"response_format":{"type":"string","pattern":"^(url)$","title":"Response Format","default":"url"},"wallet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet"}},"type":"object","required":["model","prompt"],"title":"VideoGenRequest"}}}}