{"components":{"headers":{"Deprecation":{"description":"Present only once this operation has been deprecated: the date the deprecation took effect. Absent while the operation is current.","schema":{"type":"string"}},"InferenceId":{"description":"The unique id of this request, on every INFERENCE response — streamed ones and the gateway's own refusals included; the utility routes and a rejected key don't carry it. Quote it to support to name one exact request, and it is the id cost-reconciliation contracts key on. `X-Request-Id` carries the same value under its conventional name.","schema":{"type":"string"}},"KeySpend":{"description":"What the API key that made this request has spent in total, in dollars. The team's own balance is in the console; this is the key's running figure at the moment the request was answered.","schema":{"type":"string"}},"RateLimit":{"description":"Where this caller stands against the policy, in the IETF RateLimit structured-field form: `r` is what is left in the window and `t` the seconds until it resets. Advisory, as the draft specifies — pace against it rather than treating it as a contract.","schema":{"type":"string"}},"RateLimitPolicy":{"description":"The policy itself: `q` requests per `w` seconds. Currently 120 per 60s per caller on the unauthenticated endpoints, except `createAgentKey`, which carries its own stricter policy of 3 per 3600s.","schema":{"type":"string"}},"RequestId":{"description":"The same value as `Inference-Id`, under the conventional name. Both are always sent together.","schema":{"type":"string"}},"ResponseCost":{"description":"What this request cost, in dollars, written as a plain decimal. Absent — never zero — when the charge is not known as the response begins: on a streamed response, whose headers are sent before the first token, and on any refusal, which is not charged. `0` therefore means genuinely free, such as a fully cached read. The exact per-request figure is always in the console's request log.","schema":{"type":"string"}},"RetryAfter":{"description":"Seconds to wait before retrying a 429 response, as defined by HTTP Semantics.","schema":{"minimum":0,"type":"integer"}},"Sunset":{"description":"Present only once a removal date has been set (RFC 8594): the HTTP-date after which this operation stops answering. Absent while none is set.","schema":{"type":"string"}}},"schemas":{"Error":{"description":"A refusal from the gateway.","properties":{"error":{"properties":{"code":{"description":"A stable machine-readable code.","type":["string","null"]},"message":{"description":"What went wrong, in plain language.","type":"string"},"type":{"description":"The error class, e.g. `invalid_request_error`.","type":"string"}},"required":["message","type"],"type":"object"}},"required":["error"],"type":"object"},"ModelId":{"description":"A model identifier from the published catalog. https://inference.boundless.network/docs/pricing lists which are serving today, and what each costs.","enum":["dsv4","glm-5.2","nemotron3-super","qwen3.6","qwen3.8-flash","kimi-k3","qwen3-coder-next","glm-5.3-flash","deepseek-v4-pro-0813","kimi-k2.5","mimo-v2.5","minimax-m2.7","minimax-m3","mimo-v2.5-pro","kimi-k2.6","glm-5.1","hy3","hy4-preview","gpt-5.6-luna","gpt-5.6-sol","claude-opus-5","claude-fable-5.1"],"examples":["glm-5.2"],"type":"string"},"Usage":{"description":"Exact token counts for the request. These are the numbers the request is billed on: multiplying them by the published rate card reproduces the charge.","properties":{"completion_tokens":{"description":"Tokens generated in the response.","type":"integer"},"prompt_tokens":{"description":"Tokens in the request, including any served from cache.","type":"integer"},"total_tokens":{"description":"`prompt_tokens` plus `completion_tokens`.","type":"integer"}},"required":["prompt_tokens","completion_tokens","total_tokens"],"type":"object"},"ChatCompletion":{"description":"One completion, in the OpenAI chat-completions shape.","properties":{"choices":{"items":{"properties":{"finish_reason":{"enum":["stop","length","tool_calls","content_filter"],"type":"string"},"index":{"type":"integer"},"message":{"$ref":"#/components/schemas/ChatMessage"}},"type":"object"},"type":"array"},"created":{"description":"Unix timestamp, seconds.","type":"integer"},"id":{"type":"string"},"model":{"type":"string"},"object":{"const":"chat.completion","type":"string"},"usage":{"$ref":"#/components/schemas/Usage"}},"required":["id","object","created","model","choices","usage"],"type":"object"},"ChatMessage":{"properties":{"content":{"description":"The message text, or null on an assistant tool call.","type":["string","null"]},"name":{"description":"Optional participant name.","type":"string"},"role":{"enum":["system","user","assistant","tool"],"type":"string"},"tool_call_id":{"description":"The tool call this tool-role message answers.","type":"string"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array"}},"required":["role"],"type":"object"},"ChatTool":{"properties":{"function":{"properties":{"description":{"type":"string"},"name":{"type":"string"},"parameters":{"additionalProperties":true,"description":"JSON Schema for the function arguments.","type":"object"}},"required":["name","parameters"],"type":"object"},"type":{"const":"function","type":"string"}},"required":["type","function"],"type":"object"},"ModelList":{"description":"The identifiers the gateway is serving, in the OpenAI list shape, decorated with prices and context length where the catalog publishes them.","properties":{"data":{"items":{"properties":{"context_length":{"description":"The served context window in tokens, absent for a model the catalog has no profile for.","type":"integer"},"created":{"type":"integer"},"id":{"type":"string"},"object":{"const":"model","type":"string"},"owned_by":{"description":"The lab that trained the model, where known.","type":"string"},"pricing":{"description":"USD per MILLION tokens — the rate-card numbers, never zero for an unpriced model (the field is absent instead).","properties":{"input":{"type":"number"},"output":{"type":"number"}},"required":["input","output"],"type":"object"}},"required":["id"],"type":"object"},"type":"array"},"object":{"const":"list","type":"string"}},"required":["object","data"],"type":"object"},"ModelMetadataList":{"description":"The identifiers the gateway is serving, each with the catalog metadata a client needs to configure itself: rates per token, context window, and what the model can do.","properties":{"data":{"items":{"properties":{"model_info":{"properties":{"cache_read_input_token_cost":{"description":"USD per token for a cached input token. Absent where the rate card publishes no cached rate — never zero, which would read as free.","type":"number"},"input_cost_per_token":{"description":"USD per input token.","type":"number"},"max_input_tokens":{"description":"The served context window in tokens.","type":"integer"},"output_cost_per_token":{"description":"USD per output token.","type":"number"},"supported_openai_params":{"description":"Request fields this model accepts, in the OpenAI vocabulary for them.","items":{"type":"string"},"type":"array"},"supports_function_calling":{"type":"boolean"},"supports_reasoning":{"type":"boolean"},"supports_vision":{"type":"boolean"}},"type":"object"},"model_name":{"type":"string"}},"required":["model_name","model_info"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"},"ToolCall":{"properties":{"function":{"properties":{"arguments":{"description":"JSON-encoded arguments matching the declared parameters.","type":"string"},"name":{"type":"string"}},"required":["name","arguments"],"type":"object"},"id":{"type":"string"},"type":{"const":"function","type":"string"}},"required":["id","type","function"],"type":"object"},"Response":{"description":"One result in the OpenAI Responses shape used by Codex CLI.","properties":{"id":{"type":"string"},"model":{"type":"string"},"object":{"const":"response","type":"string"},"output":{"description":"Assistant messages and function calls produced by the model.","items":{"oneOf":[{"properties":{"content":{"items":{"properties":{"annotations":{"items":{},"type":"array"},"text":{"type":"string"},"type":{"const":"output_text","type":"string"}},"required":["type","text"],"type":"object"},"type":"array"},"id":{"type":"string"},"role":{"const":"assistant","type":"string"},"status":{"enum":["in_progress","completed","incomplete"],"type":"string"},"type":{"const":"message","type":"string"}},"required":["id","type","role","content"],"type":"object"},{"properties":{"arguments":{"description":"JSON-encoded arguments matching the function parameters.","type":"string"},"call_id":{"description":"The identifier a function_call_output answers.","type":"string"},"id":{"type":"string"},"name":{"type":"string"},"status":{"enum":["in_progress","completed","incomplete"],"type":"string"},"type":{"const":"function_call","type":"string"}},"required":["type","call_id","name","arguments"],"type":"object"}]},"type":"array"},"status":{"enum":["in_progress","completed","incomplete","failed"],"type":"string"},"usage":{"properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens","total_tokens"],"type":"object"}},"required":["id","object","status","model","output"],"type":"object"},"ResponsesInputItem":{"description":"One item of a Responses conversation, oldest first.","oneOf":[{"description":"A conversation message.","properties":{"content":{"description":"The text, or the Responses content-part array (`input_text`, `output_text`).","type":["string","array"]},"role":{"enum":["user","assistant","system","developer"],"type":"string"},"type":{"const":"message","type":"string"}},"required":["role","content"],"type":"object"},{"description":"A function call the model made on an earlier turn, replayed as context.","properties":{"arguments":{"description":"JSON-encoded arguments matching the function parameters.","type":"string"},"call_id":{"description":"The identifier the matching function_call_output answers.","type":"string"},"name":{"type":"string"},"type":{"const":"function_call","type":"string"}},"required":["type","call_id","name","arguments"],"type":"object"},{"description":"The result of running one of those function calls.","properties":{"call_id":{"description":"The function_call this answers.","type":"string"},"output":{"description":"What the tool returned.","type":["string","array","object"]},"type":{"const":"function_call_output","type":"string"}},"required":["type","call_id","output"],"type":"object"}]},"ResponsesTool":{"description":"A function Codex or another Responses client may ask the model to call.","properties":{"description":{"type":"string"},"name":{"type":"string"},"parameters":{"additionalProperties":true,"description":"JSON Schema for the function arguments.","type":"object"},"strict":{"description":"Whether arguments must conform exactly to the schema.","type":"boolean"},"type":{"const":"function","type":"string"}},"required":["type","name","parameters"],"type":"object"},"AnthropicTool":{"properties":{"description":{"type":"string"},"input_schema":{"additionalProperties":true,"description":"JSON Schema for the tool input.","type":"object"},"name":{"type":"string"}},"required":["name","input_schema"],"type":"object"},"Message":{"description":"One message, in the Anthropic Messages shape.","properties":{"content":{"items":{"properties":{"text":{"type":"string"},"type":{"enum":["text","tool_use"],"type":"string"}},"type":"object"},"type":"array"},"id":{"type":"string"},"model":{"type":"string"},"role":{"const":"assistant","type":"string"},"stop_reason":{"enum":["end_turn","max_tokens","stop_sequence","tool_use"],"type":["string","null"]},"type":{"const":"message","type":"string"},"usage":{"properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens"],"type":"object"}},"required":["id","type","role","content","model","usage"],"type":"object"},"TokenCount":{"description":"The input token count of a request that was not run.","properties":{"input_tokens":{"type":"integer"}},"required":["input_tokens"],"type":"object"},"AgentKey":{"description":"A freshly minted anonymous trial key, with everything needed to use it.","properties":{"baseUrl":{"description":"The inference base URL to point an OpenAI or Anthropic SDK at.","type":"string"},"budgetUsd":{"description":"US dollars of credit this key can spend before it stops answering.","type":"number"},"docs":{"description":"The quickstart URL, for what to do next.","type":"string"},"expiresInHours":{"description":"Hours until the key stops working.","type":"integer"},"key":{"description":"The API key. Shown once, never readable again.","type":"string"},"rpmLimit":{"description":"Requests per minute this key may send.","type":"integer"},"tpmLimit":{"description":"Tokens per minute this key may admit.","type":"integer"}},"required":["baseUrl","budgetUsd","docs","expiresInHours","key","rpmLimit","tpmLimit"],"type":"object"},"AgentKeyOffer":{"description":"The anonymous trial-key offer, and how to take it.","properties":{"baseUrl":{"description":"The inference base URL a minted key calls.","type":"string"},"budgetUsd":{"description":"US dollars of credit a minted key carries.","type":"number"},"docs":{"description":"The quickstart URL, for what to do next.","type":"string"},"expiresInHours":{"description":"Hours a minted key lasts.","type":"integer"},"method":{"description":"The method that mints a key: always POST.","enum":["POST"],"type":"string"},"rpmLimit":{"description":"Requests per minute a minted key may send.","type":"integer"},"tpmLimit":{"description":"Tokens per minute a minted key may admit.","type":"integer"},"url":{"description":"The URL to POST to, absolute.","type":"string"}},"required":["baseUrl","budgetUsd","docs","expiresInHours","method","rpmLimit","tpmLimit","url"],"type":"object"},"CatalogEntry":{"properties":{"bestFor":{"description":"One sentence on what the model suits.","type":"string"},"cachedInputPerMillionTokens":{"type":["number","null"]},"contextTokens":{"type":"integer"},"id":{"description":"The identifier to send as `model`.","type":"string"},"inputPerMillionTokens":{"type":["number","null"]},"name":{"description":"The display name. Never send this as `model`.","type":"string"},"outputPerMillionTokens":{"type":["number","null"]},"serving":{"description":"Whether the gateway is serving it right now.","type":"boolean"},"supports":{"items":{"type":"string"},"type":"array"}},"required":["id","name","bestFor","contextTokens","supports","serving"],"type":"object"},"Health":{"properties":{"status":{"const":"ok","type":"string"}},"required":["status"],"type":"object"},"ModelCatalog":{"description":"The published model catalog with the live rate card, in US dollars per million tokens.","properties":{"currency":{"const":"USD","type":"string"},"data":{"items":{"$ref":"#/components/schemas/CatalogEntry"},"type":"array"},"unit":{"const":"per_million_tokens","type":"string"}},"required":["currency","unit","data"],"type":"object"}},"securitySchemes":{"apiKeyHeader":{"description":"The API key in an `x-api-key` header, as Anthropic SDKs send it.","in":"header","name":"x-api-key","type":"apiKey","x-default-grant":"llm_api","x-permissions-supported":["inference:invoke","models:read"]},"bearerAuth":{"description":"The API key as `Authorization: Bearer <key>`, as OpenAI SDKs send it.","scheme":"bearer","type":"http","x-default-grant":"llm_api","x-permissions-supported":["inference:invoke","models:read"]}}},"externalDocs":{"description":"Full documentation","url":"https://inference.boundless.network/docs"},"info":{"contact":{"email":"support@boundless.network","name":"Boundless support","url":"https://inference.boundless.network/contact"},"description":"Open-weight models over OpenAI chat completions, the Codex-compatible Responses subset, and the Anthropic Messages API, sold on prepaid credits. Every response carries exact token counts, so any charge can be recomputed from the published rate card.\n\n## Versioning\n\nThe wire version is in the URL path: every inference endpoint is under `/v1`, and that prefix is what a client pins. A breaking change to a request or response shape takes a new prefix; it never lands on `/v1`.\n\n## How a change is signalled\n\nThe service is invite-only while the first accounts are onboarded, and the model lineup, prices and base URL may still change during that period — this document is the description of what is served today, not a promise about tomorrow.\n\nNothing is withdrawn silently. When an endpoint, a field or a model identifier is deprecated, its responses begin carrying a `Deprecation` header from that day, and a `Sunset` header (RFC 8594) once a removal date is set. Both are declared on the operations below and are absent from every response today, because nothing is deprecated. https://inference.boundless.network/docs/api-compatibility carries the prose version and the migration path.\n\n## Rate limits\n\nTwo different limits, and they are counted differently.\n\nThe inference API is capped per team in TOKENS per minute, admitted against `prompt_tokens + max_tokens` before a request is dispatched. Over it returns 429 with a `Retry-After` header and is not charged. It is documented at https://inference.boundless.network/docs/rate-limits; read the team's number in the console.\n\n## Request ids and per-request cost\n\nEvery inference response — chat completions, Responses and Messages, streamed or not, refusals included — carries an `Inference-Id` header naming that exact request, and `X-Request-Id` with the same value. The utility routes (`/v1/models`, `count_tokens`) and a rejected key don't carry either.\n\nA completed non-streamed response also carries `X-Response-Cost`, what that one request cost in dollars, and `X-Key-Spend`, the running total for the key that made it. The cost is absent rather than zero when it is not known as the response begins: a streamed response sends its headers before the first token, and a refusal is not charged. So `0` means genuinely free. Multiplying the `usage` counts by the rate card reproduces the same figure, and the console's request log holds it exactly either way.\n\nThe console's own unauthenticated endpoints — this document's `listModelCatalog`, plus the MCP endpoints, /a2a/v1 and /ask — are capped per caller in REQUESTS: 120 per 60 seconds. `createAgentKey` carries its own stricter policy: 3 per 3600 seconds per caller. Every response carries `RateLimit` and `RateLimit-Policy` in the IETF structured-field form, and a refusal carries `Retry-After`. Those fields are advisory, as the draft specifies: pace against them rather than treating them as a contract.\n\n## API-key permissions\n\nCustomer keys are issued with the machine-readable `llm_api` grant declared in `x-api-key-grants`. It contains `inference:invoke` and `models:read`; management routes for accounts, keys, teams, billing and gateway configuration are excluded at issuance. Each operation declares its requirement in `x-required-permissions`. These are API-key grants, not OAuth scopes: this service has no authorization server and does not publish a fictional OAuth flow.","termsOfService":"https://inference.boundless.network/terms","title":"Boundless API","version":"1.0.0"},"openapi":"3.1.1","paths":{"/api/agent-key":{"get":{"description":"Describe the anonymous trial key without minting one: $0.01 of credit, expires in 24 hours, limited to 6 requests and 30,000 tokens per minute. Mint it by POSTing to the same URL. Safe for a crawler or a discovery agent to fetch.","operationId":"describeAgentKey","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentKeyOffer"}}},"description":"The offer, its caps, and the URL and method that take it.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests to this unauthenticated endpoint. `Retry-After` carries the seconds to wait; nothing was charged and no account is involved.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"security":[],"servers":[{"url":"https://inference.boundless.network"}],"summary":"Describe the anonymous trial key","tags":["Trial"],"x-required-permissions":[]},"post":{"description":"Mint a free, anonymous trial key: $0.01 of credit, expires in 24 hours, limited to 6 requests and 30,000 tokens per minute. No credential and no request body. The response carries the key and the base URL to point an OpenAI or Anthropic SDK at. For real workloads a human signs up in the console instead.","operationId":"createAgentKey","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentKey"}}},"description":"The minted key, its caps, and the base URL to call.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests to this unauthenticated endpoint. `Retry-After` carries the seconds to wait; nothing was charged and no account is involved.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Agent keys are not enabled on this deployment, or the shared pool is spent."}},"security":[],"servers":[{"url":"https://inference.boundless.network"}],"summary":"Mint an anonymous trial key","tags":["Trial"],"x-required-permissions":[]}},"/api/catalog":{"get":{"description":"List the published model catalog with the live rate card: every model's API identifier, display name, what it suits, served context length, capabilities, whether it is serving today, and its price in US dollars per million input, cached-input and output tokens. Needs no credential. Prices are read live from the gateway — call this rather than answering a pricing question from memory.","operationId":"listModelCatalog","parameters":[{"description":"Return only the models the gateway is serving right now.","in":"query","name":"serving","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCatalog"}}},"description":"The catalog and the rate card.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests to this unauthenticated endpoint. `Retry-After` carries the seconds to wait; nothing was charged and no account is involved.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The model is temporarily unavailable."}},"security":[],"servers":[{"url":"https://inference.boundless.network"}],"summary":"List models and prices","tags":["Catalog"],"x-required-permissions":[]}},"/api/health":{"get":{"description":"Liveness probe for the console API. Returns `{ \"status\": \"ok\" }` when the console is serving.","operationId":"getHealth","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}},"description":"The console is up."}},"security":[],"servers":[{"url":"https://inference.boundless.network"}],"summary":"Health check","tags":["Status"],"x-required-permissions":[]}},"/v1/chat/completions":{"post":{"description":"Generate a chat completion. Wire-compatible with the OpenAI chat completions API: point an official OpenAI SDK at this base URL and existing code works unchanged. Set `stream: true` for server-sent events; the final chunk carries the `usage` object. Every response reports exact token counts, and those counts multiplied by the published rate card are the charge.","operationId":"createChatCompletion","requestBody":{"content":{"application/json":{"schema":{"properties":{"max_tokens":{"description":"Cap on generated tokens.","minimum":1,"type":"integer"},"messages":{"description":"The conversation so far, oldest first.","items":{"$ref":"#/components/schemas/ChatMessage"},"minItems":1,"type":"array"},"model":{"$ref":"#/components/schemas/ModelId"},"reasoning_effort":{"description":"Controls reasoning on reasoning-capable models. `none` disables thinking. `low`, `medium`, and `high` enable thinking and request that effort level. Omit the field to use the model default.","enum":["none","low","medium","high"],"type":"string"},"stream":{"default":false,"description":"Stream the response as server-sent events.","type":"boolean"},"temperature":{"maximum":2,"minimum":0,"type":"number"},"tool_choice":{"description":"Whether the model may or must call one of the declared tools.","oneOf":[{"enum":["none","auto","required"],"type":"string"},{"properties":{"function":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"type":{"const":"function","type":"string"}},"required":["type","function"],"type":"object"}]},"tools":{"items":{"$ref":"#/components/schemas/ChatTool"},"type":"array"},"top_p":{"maximum":1,"minimum":0,"type":"number"}},"required":["model","messages"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"description":"Returned when `stream` is true: `data:` frames carrying `chat.completion.chunk` objects, terminated by `data: [DONE]`. The last chunk before it carries `usage`.","type":"string"}}},"description":"The completion.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Inference-Id":{"$ref":"#/components/headers/InferenceId"},"X-Key-Spend":{"$ref":"#/components/headers/KeySpend"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-Response-Cost":{"$ref":"#/components/headers/ResponseCost"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request was malformed."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing, revoked, or not valid for this service."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Either the team's throughput cap was exceeded — `Retry-After` says how long, nothing was charged — or its prepaid credits are exhausted, which stops requests until the balance is topped up.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Inference-Id":{"$ref":"#/components/headers/InferenceId"},"X-Key-Spend":{"$ref":"#/components/headers/KeySpend"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The model is temporarily unavailable."}},"servers":[{"url":"https://api.inference.boundless.network"}],"summary":"Create a chat completion","tags":["Inference"],"x-required-permissions":["inference:invoke"]}},"/v1/messages":{"post":{"description":"Generate a message in the Anthropic Messages format. The same models on the same rate card as `createChatCompletion`; use whichever wire format your client already speaks. Send the API key as `x-api-key` or as `Authorization: Bearer`. `max_tokens` is required and must cover a reasoning model's thinking as well as its reply — thinking is not returned in `content`, so a budget too small for both returns an empty `content` array and `stop_reason: max_tokens`. Give reasoning models 1024 or more.","operationId":"createMessage","requestBody":{"content":{"application/json":{"schema":{"properties":{"max_tokens":{"description":"Required. Covers thinking as well as the reply.","minimum":1,"type":"integer"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"minItems":1,"type":"array"},"model":{"$ref":"#/components/schemas/ModelId"},"stream":{"default":false,"type":"boolean"},"system":{"description":"System prompt.","type":"string"},"tool_choice":{"properties":{"name":{"description":"Required when type is tool.","type":"string"},"type":{"enum":["auto","any","tool","none"],"type":"string"}},"required":["type"],"type":"object"},"tools":{"items":{"$ref":"#/components/schemas/AnthropicTool"},"type":"array"}},"required":["model","messages","max_tokens"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"description":"The message.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Inference-Id":{"$ref":"#/components/headers/InferenceId"},"X-Key-Spend":{"$ref":"#/components/headers/KeySpend"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-Response-Cost":{"$ref":"#/components/headers/ResponseCost"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request was malformed."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing, revoked, or not valid for this service."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Either the team's throughput cap was exceeded — `Retry-After` says how long, nothing was charged — or its prepaid credits are exhausted, which stops requests until the balance is topped up.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Inference-Id":{"$ref":"#/components/headers/InferenceId"},"X-Key-Spend":{"$ref":"#/components/headers/KeySpend"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The model is temporarily unavailable."}},"servers":[{"url":"https://api.inference.boundless.network"}],"summary":"Create a message (Anthropic format)","tags":["Inference"],"x-required-permissions":["inference:invoke"]}},"/v1/messages/count_tokens":{"post":{"description":"Count the input tokens of a Messages request without running it. Costs nothing and consumes no credits — use it to size a prompt against a model's context window before sending.","operationId":"countMessageTokens","requestBody":{"content":{"application/json":{"schema":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"minItems":1,"type":"array"},"model":{"$ref":"#/components/schemas/ModelId"},"system":{"type":"string"}},"required":["model","messages"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCount"}}},"description":"The input token count.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request was malformed."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing, revoked, or not valid for this service."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Either the team's throughput cap was exceeded — `Retry-After` says how long, nothing was charged — or its prepaid credits are exhausted, which stops requests until the balance is topped up.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Inference-Id":{"$ref":"#/components/headers/InferenceId"},"X-Key-Spend":{"$ref":"#/components/headers/KeySpend"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The model is temporarily unavailable."}},"servers":[{"url":"https://api.inference.boundless.network"}],"summary":"Count input tokens","tags":["Inference"],"x-required-permissions":["inference:invoke"]}},"/v1/model/info":{"get":{"description":"The same lineup as `listServedModels`, in the model-metadata shape agent harnesses probe for: rates PER TOKEN (input, output and cached input), the served context window, and capability flags. Requires an API key. A harness that reads this shape configures itself entirely from it — a base URL and a key, with no per-model settings to paste or maintain; see the coding-agent guide for one that does. Nothing here describes the deployment: no upstream, no endpoint, no routing.","operationId":"listModelMetadata","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelMetadataList"}}},"description":"The live lineup with catalog metadata attached.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing, revoked, or not valid for this service."}},"servers":[{"url":"https://api.inference.boundless.network"}],"summary":"List model metadata","tags":["Inference"],"x-required-permissions":["models:read"]}},"/v1/models":{"get":{"description":"List the models the gateway is serving right now, in the OpenAI list format with `pricing` (USD per million tokens) and `context_length` on each entry. Requires an API key. For the published catalog with its rate card — and without a key — call `listModelCatalog` on the console origin instead.","operationId":"listServedModels","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}},"description":"The live model list.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing, revoked, or not valid for this service."}},"servers":[{"url":"https://api.inference.boundless.network"}],"summary":"List served models","tags":["Inference"],"x-required-permissions":["models:read"]}},"/v1/responses":{"post":{"description":"Generate a response through the compatibility subset used by Codex CLI custom providers. Instructions, text input, function tools, function_call_output items, streaming, and reasoning effort are translated to the selected open-weight model. OpenAI-hosted tools, remote conversation storage, and other provider-native features are not available. Codex compacts custom-provider conversations locally, so it does not require a /v1/responses/compact route.","operationId":"createResponse","requestBody":{"content":{"application/json":{"schema":{"properties":{"client_metadata":{"additionalProperties":true,"description":"Optional client diagnostics. Accepted for Codex compatibility and not forwarded to the model.","type":"object"},"include":{"description":"Optional Responses fields requested by the client. Accepted for Codex compatibility; the fields it can name are provider-native and are not produced here.","items":{"type":"string"},"type":"array"},"prompt_cache_key":{"description":"Optional client cache key. Accepted for Codex compatibility and not forwarded to the model.","type":"string"},"store":{"const":false,"description":"Boundless does not store prompts or outputs; Codex sends false for custom providers.","type":"boolean"},"input":{"description":"A text prompt, or the ordered conversation as Responses input items.","oneOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/ResponsesInputItem"},"type":"array"}]},"instructions":{"description":"Developer instructions prepended to the conversation.","type":"string"},"model":{"$ref":"#/components/schemas/ModelId"},"parallel_tool_calls":{"default":true,"type":"boolean"},"reasoning":{"description":"Reasoning control. Only the standard effort member is forwarded to the model.","properties":{"effort":{"enum":["none","low","medium","high"],"type":"string"},"summary":{"enum":["auto","concise","detailed","none"],"type":"string"}},"type":"object"},"stream":{"default":false,"description":"Stream Responses events as server-sent events.","type":"boolean"},"tool_choice":{"description":"Whether the model may or must call a declared function.","oneOf":[{"enum":["none","auto","required"],"type":"string"},{"properties":{"name":{"type":"string"},"type":{"const":"function","type":"string"}},"required":["type","name"],"type":"object"}]},"tools":{"items":{"$ref":"#/components/schemas/ResponsesTool"},"type":"array"}},"required":["model","input"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"text/event-stream":{"schema":{"description":"Returned when stream is true: `data:` frames carrying `response.*` lifecycle, text-delta, and function-call argument events, terminated by `data: [DONE]`.","type":"string"}}},"description":"The response or streamed Responses event sequence.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Inference-Id":{"$ref":"#/components/headers/InferenceId"},"X-Key-Spend":{"$ref":"#/components/headers/KeySpend"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-Response-Cost":{"$ref":"#/components/headers/ResponseCost"}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request was malformed."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The API key is missing, revoked, or not valid for this service."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Either the team's throughput cap was exceeded — `Retry-After` says how long, nothing was charged — or its prepaid credits are exhausted, which stops requests until the balance is topped up.","headers":{"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Inference-Id":{"$ref":"#/components/headers/InferenceId"},"X-Key-Spend":{"$ref":"#/components/headers/KeySpend"},"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The model is temporarily unavailable."}},"servers":[{"url":"https://api.inference.boundless.network"}],"summary":"Create a response (Codex-compatible subset)","tags":["Inference"],"x-required-permissions":["inference:invoke"]}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"servers":[{"description":"Inference gateway — the base URL an OpenAI SDK, Codex, or Anthropic SDK points at.","url":"https://api.inference.boundless.network"},{"description":"Console — public catalog and health, no authentication.","url":"https://inference.boundless.network"}],"tags":[{"description":"Calling a model.","name":"Inference"},{"description":"What is served and what it costs. No authentication.","name":"Catalog"},{"description":"Trying the service without an account.","name":"Trial"}],"x-api-key-grants":{"llm_api":{"description":"Inference-only customer key. Permits model invocation and model discovery; excludes account, key, team, billing and gateway-management routes.","permissions":["inference:invoke","models:read"]}}}