{"openapi":"3.1.0","info":{"title":"uRouter API","version":"0.1.0","description":"Model discovery, API keys, request accounting, reusable deposits and reseller controls. Deposits and paid execution are being verified in a limited rollout; unavailable accounts receive 503."},"servers":[{"url":"https://api.urouter.net"}],"paths":{"/v1/models":{"get":{"summary":"List public model capabilities and indicative prices","responses":{"200":{"description":"Catalog and freshness","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Catalog"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getV1Models"}},"/v1/models/{id}":{"get":{"summary":"Read one model","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Model plus updated_at and stale","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelDetail"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getV1ModelsById"}},"/v1/key":{"get":{"summary":"Read the authenticated inference key settings","security":[{"InferenceKey":[]}],"responses":{"200":{"description":"Name, prefix, models, operations and expiry; never the secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceKeyMetadata"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getV1Key"}},"/v1/requests/{id}":{"get":{"summary":"Read a request belonging to this logical inference key","security":[{"InferenceKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Request accounting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getV1RequestsById"}},"/v1/chat/completions":{"post":{"summary":"Chat completions","description":"Chat or SSE for enabled accounts. Reserves a maximum cost and settles actual usage. Accounts without access receive 503 before reserving funds.","security":[{"InferenceKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"}}],"responses":{"200":{"description":"Completion or SSE stream","headers":{"X-Request-Id":{"schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"string"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"postV1ChatCompletions"}},"/control/v1/customers":{"get":{"summary":"List delegated customers","security":[{"ResellerKey":[]}],"x-required-scope":"customers.read","parameters":[{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getControlV1Customers"},"post":{"summary":"Create or return a managed customer by tenant-scoped reference","security":[{"ResellerKey":[]}],"x-required-scope":"customers.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInput"}}}},"responses":{"200":{"description":"Existing reference; same customer"},"201":{"description":"Created customer ID and external_id"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"postControlV1Customers"}},"/control/v1/customers/{customerId}":{"get":{"summary":"Read customer identity and exact USD balance","security":[{"ResellerKey":[]}],"x-required-scope":"customers.read","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getControlV1CustomersByCustomerId"},"delete":{"summary":"Revoke delegation and integration-issued credentials","security":[{"ResellerKey":[]}],"x-required-scope":"customers.create","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteControlV1CustomersByCustomerId"}},"/control/v1/customers/{customerId}/funding/addresses":{"post":{"summary":"Get or create reusable deposit addresses","security":[{"ResellerKey":[]}],"x-required-scope":"customers.create","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deposit choices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositChoices"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"No amount is required. Calls reuse the customer’s deposit route. Include the returned memo when present and meet the asset/network minimum. Credit reflects confirmed settlement after fees.","operationId":"postControlV1CustomersByCustomerIdFundingAddresses"}},"/control/v1/customers/{customerId}/funding":{"get":{"summary":"Read deposit receipts and available balance","security":[{"ResellerKey":[]}],"x-required-scope":"customers.read","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getControlV1CustomersByCustomerIdFunding"}},"/control/v1/customers/{customerId}/keys":{"get":{"summary":"List redacted inference keys","security":[{"ResellerKey":[]}],"x-required-scope":"keys.read","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getControlV1CustomersByCustomerIdKeys"},"post":{"summary":"Create a one-time inference secret","security":[{"ResellerKey":[]}],"x-required-scope":"keys.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeySettings"}}}},"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"One attempt identity. Replays return 409; reconcile through GET /control/v1/operations/{idempotencyKey}. Secrets are not replayed."}],"responses":{"201":{"description":"Created key metadata and one-time secret"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"postControlV1CustomersByCustomerIdKeys"}},"/control/v1/customers/{customerId}/keys/{keyId}":{"get":{"summary":"Read redacted key metadata","security":[{"ResellerKey":[]}],"x-required-scope":"keys.read","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getControlV1CustomersByCustomerIdKeysByKeyId"},"patch":{"summary":"Edit provided key settings; omitted fields remain unchanged","security":[{"ResellerKey":[]}],"x-required-scope":"keys.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyPatch"}}}},"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"One attempt identity. Replays return 409; reconcile through GET /control/v1/operations/{idempotencyKey}. Secrets are not replayed."}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"patchControlV1CustomersByCustomerIdKeysByKeyId"},"delete":{"summary":"Revoke inference key","security":[{"ResellerKey":[]}],"x-required-scope":"keys.manage","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"One attempt identity. Replays return 409; reconcile through GET /control/v1/operations/{idempotencyKey}. Secrets are not replayed."}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteControlV1CustomersByCustomerIdKeysByKeyId"}},"/control/v1/customers/{customerId}/keys/{keyId}/rotate":{"post":{"summary":"Replace secret and preserve logical budget/settings","security":[{"ResellerKey":[]}],"x-required-scope":"keys.manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Empty"}}}},"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"One attempt identity. Replays return 409; reconcile through GET /control/v1/operations/{idempotencyKey}. Secrets are not replayed."}],"responses":{"201":{"description":"Replacement secret and same logical key ID"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"postControlV1CustomersByCustomerIdKeysByKeyIdRotate"}},"/control/v1/customers/{customerId}/usage":{"get":{"summary":"Read filtered requests and whole-filter totals","security":[{"ResellerKey":[]}],"x-required-scope":"usage.read","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"model","in":"query","schema":{"type":"string"},"description":"Exact filter"},{"name":"state","in":"query","schema":{"type":"string"},"description":"Exact filter"},{"name":"from","in":"query","schema":{"type":"string"},"description":"YYYY-MM-DD, inclusive UTC dates"},{"name":"to","in":"query","schema":{"type":"string"},"description":"YYYY-MM-DD, inclusive UTC dates"},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque next_cursor from the prior page"}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getControlV1CustomersByCustomerIdUsage"}},"/control/v1/customers/{customerId}/requests/{requestId}":{"get":{"summary":"Read one customer-owned request","security":[{"ResellerKey":[]}],"x-required-scope":"usage.read","parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getControlV1CustomersByCustomerIdRequestsByRequestId"}},"/control/v1/link-requests":{"post":{"summary":"Create one-use account-owner approval link","security":[{"ResellerKey":[]}],"x-required-scope":"customers.create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInput"}}}},"responses":{"201":{"description":"approval_url and expiry; not a grant until the owner accepts"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"postControlV1LinkRequests"}},"/control/v1/events":{"get":{"summary":"Read signed events after a per-reseller sequence cursor","security":[{"ResellerKey":[]}],"x-required-scope":"events.read","parameters":[{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^\\d+$"},"description":"Start at 0. Persist next_cursor after processing; deduplicate by event id."}],"responses":{"200":{"description":"data[] and next_cursor. Verify HMAC-SHA256(control key, timestamp + \".\" + exact response body).","headers":{"X-Urouter-Event-Timestamp":{"schema":{"type":"string"}},"X-Urouter-Event-Signature":{"schema":{"type":"string"},"description":"sha256=<hex digest>"}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getControlV1Events"}},"/control/v1/operations/{idempotencyKey}":{"get":{"summary":"Reconcile an admitted key-management operation","security":[{"ResellerKey":[]}],"x-required-scope":"keys.read","parameters":[{"name":"idempotencyKey","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"400":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"uRouter error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getControlV1OperationsByIdempotencyKey"}}},"components":{"securitySchemes":{"InferenceKey":{"type":"http","scheme":"bearer","bearerFormat":"ur_live_…"},"ResellerKey":{"type":"http","scheme":"bearer","bearerFormat":"ur_res_…"}},"schemas":{"ChatRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":150},"messages":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{"anyOf":[{"anyOf":[{"type":"string","maxLength":1000000},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":1000000}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"type":"object","properties":{"url":{"type":"string","maxLength":12000000},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"],"additionalProperties":false}},"required":["type","image_url"],"additionalProperties":false}]}}]},{"type":"null"}]},"name":{"type":"string","maxLength":128},"tool_call_id":{"type":"string","maxLength":200},"tool_calls":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":200},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","maxLength":128},"arguments":{"type":"string","maxLength":1000000}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false}},"max_tokens":{"type":"integer","minimum":1,"maximum":131072},"max_completion_tokens":{"type":"integer","minimum":1,"maximum":131072},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"stop":{"anyOf":[{"type":"string","maxLength":200},{"maxItems":8,"type":"array","items":{"type":"string","maxLength":200}}]},"stream":{"type":"boolean"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"reasoning_effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"reasoning":{"type":"object","properties":{"effort":{"type":"string","maxLength":30},"max_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"exclude":{"type":"boolean"}},"additionalProperties":false},"tools":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","maxLength":128},"description":{"type":"string","maxLength":4000},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean"}},"required":["name","parameters"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","maxLength":128}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}]},"response_format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"json_object"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"json_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","maxLength":4000},"strict":{"type":"boolean"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","schema"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]}},"required":["model","messages"],"additionalProperties":false},"ChatCompletion":{"type":"object","properties":{"choices":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"finish_reason":{"type":["string","null"]},"message":{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"type":["string","null"]},"reasoning_content":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":200},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","maxLength":128},"arguments":{"type":"string","maxLength":1000000}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false}},"required":["index","finish_reason","message"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["prompt_tokens","completion_tokens","total_tokens"],"additionalProperties":false},"id":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"model":{"type":"string"},"urouter":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"cost_usd":{"type":["string","null"]},"accounting":{"type":"string","enum":["pending","settled"]}},"required":["request_id","cost_usd","accounting"],"additionalProperties":false}},"required":["choices","id","object","created","model","urouter"],"additionalProperties":false},"DepositChoices":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"asset_v1":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"network_id":{"type":"string"},"network":{"type":"string"},"address":{"type":"string"},"memo":{"type":["string","null"]},"minimum":{"default":null,"type":["string","null"]}},"required":["asset_v1","symbol","name","network_id","network","address","memo","minimum"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"Model":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"max_output_tokens":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"supported_parameters":{"type":"array","items":{"type":"string"}},"brand":{"type":["string","null"]},"input_types":{"type":"array","items":{"type":"string"}},"output_types":{"type":"array","items":{"type":"string"}},"operations":{"type":"array","items":{"type":"string"}},"features":{"type":"array","items":{"type":"string"}},"context_length":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"context_window":{"type":"object","properties":{"min":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"abliterated":{"type":["boolean","null"]},"uncensored":{"type":["boolean","null"]},"pricing":{"type":"object","properties":{"source":{"type":"string","enum":["live","reference"]},"discount_pct":{"type":["number","null"]},"reference_dimensions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"amount":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string"}},"required":["kind","amount","quantity","unit"],"additionalProperties":false}},"kind":{"type":"string","enum":["estimated","quote_required"]},"currency":{"type":"string","const":"USD"},"dimensions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"amount":{"type":"string","pattern":"^\\d+(?:\\.\\d+)?$"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string"}},"required":["kind","amount","quantity","unit"],"additionalProperties":false}}},"required":["source","discount_pct","reference_dimensions","kind","currency","dimensions"],"additionalProperties":false},"capacity":{"type":"object","properties":{"status":{"type":"string","enum":["available","unavailable","unknown"]},"quantity":{"type":"null"},"credit_usd":{"type":["string","null"]},"uncapped":{"type":["boolean","null"]}},"required":["status","quantity","credit_usd","uncapped"],"additionalProperties":false},"options":{"type":"object","properties":{"sizes":{"type":"array","items":{"type":"string"}},"durations_seconds":{"type":"array","items":{"type":"number"}},"resolutions":{"type":"array","items":{"type":"string"}},"voices":{"type":"array","items":{"type":"string"}},"aspect_ratios":{"type":"array","items":{"type":"string"}},"qualities":{"type":"array","items":{"type":"string"}},"response_formats":{"type":"array","items":{"type":"string"}}},"required":["sizes","durations_seconds","resolutions","voices","aspect_ratios","qualities","response_formats"],"additionalProperties":false},"requests_24h":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"execution_enabled":{"type":"boolean","const":false}},"required":["id","name","description","max_output_tokens","supported_parameters","brand","input_types","output_types","operations","features","context_length","abliterated","uncensored","pricing","capacity","options","requests_24h","execution_enabled"],"additionalProperties":false},"ModelDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"max_output_tokens":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"supported_parameters":{"type":"array","items":{"type":"string"}},"brand":{"type":["string","null"]},"input_types":{"type":"array","items":{"type":"string"}},"output_types":{"type":"array","items":{"type":"string"}},"operations":{"type":"array","items":{"type":"string"}},"features":{"type":"array","items":{"type":"string"}},"context_length":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"context_window":{"type":"object","properties":{"min":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"max":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"abliterated":{"type":["boolean","null"]},"uncensored":{"type":["boolean","null"]},"pricing":{"type":"object","properties":{"source":{"type":"string","enum":["live","reference"]},"discount_pct":{"type":["number","null"]},"reference_dimensions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"amount":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string"}},"required":["kind","amount","quantity","unit"],"additionalProperties":false}},"kind":{"type":"string","enum":["estimated","quote_required"]},"currency":{"type":"string","const":"USD"},"dimensions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"amount":{"type":"string","pattern":"^\\d+(?:\\.\\d+)?$"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string"}},"required":["kind","amount","quantity","unit"],"additionalProperties":false}}},"required":["source","discount_pct","reference_dimensions","kind","currency","dimensions"],"additionalProperties":false},"capacity":{"type":"object","properties":{"status":{"type":"string","enum":["available","unavailable","unknown"]},"quantity":{"type":"null"},"credit_usd":{"type":["string","null"]},"uncapped":{"type":["boolean","null"]}},"required":["status","quantity","credit_usd","uncapped"],"additionalProperties":false},"options":{"type":"object","properties":{"sizes":{"type":"array","items":{"type":"string"}},"durations_seconds":{"type":"array","items":{"type":"number"}},"resolutions":{"type":"array","items":{"type":"string"}},"voices":{"type":"array","items":{"type":"string"}},"aspect_ratios":{"type":"array","items":{"type":"string"}},"qualities":{"type":"array","items":{"type":"string"}},"response_formats":{"type":"array","items":{"type":"string"}}},"required":["sizes","durations_seconds","resolutions","voices","aspect_ratios","qualities","response_formats"],"additionalProperties":false},"requests_24h":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"execution_enabled":{"type":"boolean","const":false},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"stale":{"type":"boolean"}},"required":["id","name","description","max_output_tokens","supported_parameters","brand","input_types","output_types","operations","features","context_length","abliterated","uncensored","pricing","capacity","options","requests_24h","execution_enabled","updated_at","stale"],"additionalProperties":false},"InferenceKeyMetadata":{"type":"object","required":["name","prefix","models","operations","expires_at"],"properties":{"name":{"type":"string"},"prefix":{"type":"string"},"models":{"type":"array","items":{"type":"string"}},"operations":{"type":"array","items":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"}}},"Catalog":{"type":"object","required":["object","data","updated_at","stale"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}},"updated_at":{"type":"string","format":"date-time"},"stale":{"type":"boolean"}}},"KeySettings":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"models":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":150}},"operations":{"default":[],"maxItems":5,"type":"array","items":{"type":"string","enum":["chat","image","video","audio","embedding"]}},"expires_at":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lifetime_limit":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,18})?$"},{"type":"null"}]},"daily_limit":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,18})?$"},{"type":"null"}]},"monthly_limit":{"default":null,"anyOf":[{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,18})?$"},{"type":"null"}]}},"required":["name","models","operations","expires_at","lifetime_limit","daily_limit","monthly_limit"],"additionalProperties":false},"KeyPatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"models":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":150}},"operations":{"maxItems":5,"type":"array","items":{"type":"string","enum":["chat","image","video","audio","embedding"]}},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"lifetime_limit":{"anyOf":[{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,18})?$"},{"type":"null"}]},"daily_limit":{"anyOf":[{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,18})?$"},{"type":"null"}]},"monthly_limit":{"anyOf":[{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,18})?$"},{"type":"null"}]}},"additionalProperties":false},"CustomerInput":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":128}},"required":["external_id"],"additionalProperties":false},"Empty":{"type":"object","additionalProperties":false},"Request":{"type":"object","required":["id","model","operation","state","maximum_usd","cost_usd","input_tokens","output_tokens","created_at","settled_at"],"properties":{"id":{"type":"string","format":"uuid"},"model":{"type":"string"},"operation":{"type":"string"},"state":{"enum":["reserved","dispatching","pending_cost","settled","released"]},"maximum_usd":{"type":"string"},"cost_usd":{"type":["string","null"]},"input_tokens":{"type":["string","null"]},"output_tokens":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"settled_at":{"type":["string","null"],"format":"date-time"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"}}}}}}}}