{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/chat/completions":{"post":{"operationId":"create-a-chat-completion","summary":"Create a chat completion","description":"Generates a model response for a conversation. Supports streaming (`stream: true`, server-sent events) and non-streaming responses. When streaming, each frame is a `data:` line holding one JSON completion chunk, the chunk carrying `usage` has an empty `choices` array, and the stream ends with the literal `data: [DONE]`. OpenAI-compatible: the supported fields are documented here, and the wider OpenAI SDK parameter set is accepted so that existing OpenAI code runs unmodified.","tags":["chatCompletions"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}},{"name":"x-session-id","in":"header","description":"Groups related requests into one session. Required when using `planner_mode`, which uses it to resume a paused plan.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A chat completion object, or an SSE stream of completion chunks when `stream` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}}}},"400":{"description":"The request was malformed, or a parameter was missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The organization's account is blocked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountBlockedError"}}}},"403":{"description":"The API key is not permitted to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested model or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The rate limit for your plan has been exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error occurred while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream service failed while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}}}},"/responses":{"post":{"operationId":"create-a-response","summary":"Create a response","description":"Creates a model response using the Responses API. Supports streaming (`stream: true`, server-sent events) and background mode (`background: true`). When streaming, each frame carries a named `event:` and a JSON `data:` payload, and the stream ends on a terminal event, one of `response.completed`, `response.failed` or `response.incomplete`; there is no `[DONE]` sentinel. OpenAI-compatible, so existing Responses API code runs unmodified.","tags":["responses"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A response object, or an SSE stream of response events when `stream` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseObject"}}}},"400":{"description":"The request was malformed, or a parameter was missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The organization's account is blocked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountBlockedError"}}}},"403":{"description":"The API key is not permitted to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested model or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The `previous_response_id` refers to a response that has not finished. Wait for it to reach a terminal status, then retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The rate limit for your plan has been exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error occurred while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream service failed while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRequest"}}}}}},"/responses/{response_id}":{"get":{"operationId":"retrieve-a-response","summary":"Retrieve a response","description":"Returns a previously created response by id. With `stream=true` the response is delivered as server-sent events instead of a single JSON body, replaying the run from the beginning and continuing live if it is still going. Streaming a retrieve requires a response created with `background: true`; on any other response it returns a 400.","tags":["responses"],"parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"stream","in":"query","description":"If true, replay the response as server-sent events. Requires a response created with `background: true`.","required":false,"schema":{"type":"boolean","default":false}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The response object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseObject"}}}},"400":{"description":"The request was malformed, or a parameter was missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key is not permitted to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested model or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The rate limit for your plan has been exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error occurred while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream service failed while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"delete-a-response","summary":"Delete a response","description":"Deletes a previously created response by id.","tags":["responses"],"parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Responses_deleteAResponse_Response_200"}}}},"400":{"description":"The request was malformed, or a parameter was missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key is not permitted to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested model or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The rate limit for your plan has been exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error occurred while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream service failed while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/responses/{response_id}/cancel":{"post":{"operationId":"cancel-a-response","summary":"Cancel a response","description":"Cancels an in-progress background response. Returns the response object.","tags":["responses"],"parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The cancelled response object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseObject"}}}},"400":{"description":"The request was malformed, or a parameter was missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key is not permitted to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested model or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The rate limit for your plan has been exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error occurred while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream service failed while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/responses/{response_id}/input_items":{"get":{"operationId":"list-input-items","summary":"List input items","description":"Returns the list of input items for a given response.","tags":["responses"],"parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of input item objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Responses_listInputItems_Response_200"}}}},"400":{"description":"The request was malformed, or a parameter was missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key is not permitted to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The requested model or resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The rate limit for your plan has been exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"An unexpected error occurred while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"An upstream service failed while handling the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"servers":[{"url":"https://api.asi1.ai/v1","description":"ASI:One production API"}],"components":{"schemas":{"ChatMessageContentOneOf1Items":{"type":"object","properties":{},"title":"ChatMessageContentOneOf1Items"},"ChatMessageContent1":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageContentOneOf1Items"},"title":"ChatMessageContent1"},"ChatMessageContent":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ChatMessageContent1"}],"description":"The message content. A string, an array of content parts for multimodal input, or null (for example on assistant messages that only carry tool_calls).","title":"ChatMessageContent"},"ChatMessageToolCallsItems":{"type":"object","properties":{},"title":"ChatMessageToolCallsItems"},"ChatMessage":{"type":"object","properties":{"role":{"type":"string","description":"The role of the message author (for example `system`, `user`, `assistant`, or `tool`)."},"content":{"oneOf":[{"$ref":"#/components/schemas/ChatMessageContent"},{"type":"null"}],"description":"The message content. A string, an array of content parts for multimodal input, or null (for example on assistant messages that only carry tool_calls)."},"name":{"type":"string","description":"An optional name for the participant."},"tool_call_id":{"type":"string","description":"For tool messages: the id of the tool call being responded to."},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessageToolCallsItems"},"description":"For assistant messages that call tools."},"reasoning_content":{"type":["string","null"],"description":"The model's reasoning, when reasoning was requested. `null` otherwise. See the Reasoning guide."}},"required":["role","content"],"title":"ChatMessage"},"FunctionToolType":{"type":"string","enum":["function"],"description":"Always `function`. Any other tool type is rejected with a 400.","title":"FunctionToolType"},"FunctionToolFunction":{"type":"object","properties":{"name":{"type":"string","description":"Name of the function. The model uses this to refer to the call."},"description":{"type":"string","description":"What the function does and when to use it. The model selects tools from this text, so it is worth writing carefully."},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"JSON Schema describing the function's arguments."},"strict":{"type":"boolean","description":"Whether the model must follow the parameter schema exactly. Requires `additionalProperties: false` and every property listed in `required`."}},"required":["name"],"title":"FunctionToolFunction"},"FunctionTool":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/FunctionToolType","description":"Always `function`. Any other tool type is rejected with a 400."},"function":{"$ref":"#/components/schemas/FunctionToolFunction"}},"required":["type","function"],"description":"A function the model may call. Your code defines the schema and executes the call. Only function tools are supported.","title":"FunctionTool"},"ChatCompletionRequestToolChoice0":{"type":"string","enum":["auto","none","required"],"title":"ChatCompletionRequestToolChoice0"},"ChatCompletionRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionRequestToolChoice0"},{"type":"object","additionalProperties":{"description":"Any type"}}],"description":"Controls which (if any) tool is called.","title":"ChatCompletionRequestToolChoice"},"ResponseFormatOneOf0Type":{"type":"string","enum":["text","json_object"],"title":"ResponseFormatOneOf0Type"},"ResponseFormat0":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ResponseFormatOneOf0Type"}},"required":["type"],"title":"ResponseFormat0"},"ResponseFormatOneOf1Type":{"type":"string","enum":["json_schema"],"title":"ResponseFormatOneOf1Type"},"ResponseFormatOneOf1JsonSchema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the schema. Required when `type` is `json_schema`."},"description":{"type":"string","description":"What the schema is for."},"schema":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The JSON Schema the reply must conform to."},"strict":{"type":"boolean","description":"Whether the reply must match the schema exactly."}},"required":["name"],"title":"ResponseFormatOneOf1JsonSchema"},"ResponseFormat1":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ResponseFormatOneOf1Type"},"json_schema":{"$ref":"#/components/schemas/ResponseFormatOneOf1JsonSchema"}},"required":["type","json_schema"],"title":"ResponseFormat1"},"ResponseFormat":{"oneOf":[{"$ref":"#/components/schemas/ResponseFormat0"},{"$ref":"#/components/schemas/ResponseFormat1"}],"description":"Constrains the reply's format. See the Structured Data guide.","title":"ResponseFormat"},"ChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string","description":"The ASI:One model to use."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"},"description":"The conversation so far."},"stream":{"type":"boolean","default":false,"description":"If true, partial deltas are streamed as server-sent events."},"temperature":{"type":"number","format":"double","minimum":0,"maximum":2,"description":"Sampling temperature."},"max_tokens":{"type":"integer","description":"Maximum number of tokens to generate."},"top_p":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Nucleus sampling probability mass."},"stop":{"type":"array","items":{"type":"string"},"description":"Up to four strings that end generation when produced."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/FunctionTool"},"description":"A list of tools the model may call. See the Tool Calling guide."},"tool_choice":{"$ref":"#/components/schemas/ChatCompletionRequestToolChoice","description":"Controls which (if any) tool is called."},"parallel_tool_calls":{"type":"boolean","description":"Whether the model may call several tools in one turn."},"response_format":{"$ref":"#/components/schemas/ResponseFormat"},"enable_thinking":{"type":"boolean","description":"ASI:One extension. Whether the model reasons before answering. See the Reasoning guide."},"thinking_budget":{"type":"integer","minimum":0,"maximum":16384,"description":"ASI:One extension. Maximum tokens the model may spend reasoning. Applies on asi1."},"planner_mode":{"type":"boolean","description":"ASI:One extension. Routes the request to the planner, which breaks it into steps and runs them against tools and Agentverse agents. Available on asi1, asi1-ultra and asi1-mini. See the Planner Mode guide."},"agents":{"type":"array","items":{"type":"string"},"description":"ASI:One extension. Agentverse agent addresses the planner may use without discovering them first. Used with planner_mode."}},"required":["model","messages"],"description":"OpenAI-compatible chat completion request. The supported fields are documented here; the wider OpenAI SDK parameter set is accepted so that existing OpenAI code runs unmodified.","title":"ChatCompletionRequest"},"ChatCompletionResponseChoicesItemsFinishReason":{"type":"string","enum":["stop","tool_calls","length"],"description":"Why generation stopped. `stop` is a normal completion, `tool_calls` means the model wants a tool result, `length` means a token limit was reached. Treat an unrecognised value as a finished reply.","title":"ChatCompletionResponseChoicesItemsFinishReason"},"ChatCompletionResponseChoicesItemsDelta":{"type":"object","properties":{},"description":"Present on streaming responses.","title":"ChatCompletionResponseChoicesItemsDelta"},"ChatCompletionResponseChoicesItems":{"type":"object","properties":{"index":{"type":"integer"},"finish_reason":{"$ref":"#/components/schemas/ChatCompletionResponseChoicesItemsFinishReason","description":"Why generation stopped. `stop` is a normal completion, `tool_calls` means the model wants a tool result, `length` means a token limit was reached. Treat an unrecognised value as a finished reply."},"message":{"$ref":"#/components/schemas/ChatMessage","description":"Present on non-streaming responses."},"delta":{"$ref":"#/components/schemas/ChatCompletionResponseChoicesItemsDelta","description":"Present on streaming responses."}},"title":"ChatCompletionResponseChoicesItems"},"ChatCompletionResponseUsagePromptTokensDetails":{"type":"object","properties":{"cached_tokens":{"type":"integer","description":"Prompt tokens served from cache. These still count toward `prompt_tokens`."}},"description":"Breakdown of the prompt tokens.","title":"ChatCompletionResponseUsagePromptTokensDetails"},"ChatCompletionResponseUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"prompt_tokens_details":{"$ref":"#/components/schemas/ChatCompletionResponseUsagePromptTokensDetails","description":"Breakdown of the prompt tokens."},"reasoning_tokens":{"type":"integer","description":"Tokens spent reasoning before answering. `0` when reasoning was not requested."}},"description":"Token usage for the request.","title":"ChatCompletionResponseUsage"},"ChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"created":{"type":"integer","description":"Unix timestamp (seconds) of creation."},"model":{"type":"string","description":"The model that produced the response."},"choices":{"type":"array","items":{"$ref":"#/components/schemas/ChatCompletionResponseChoicesItems"},"description":"A list of generated choices."},"usage":{"$ref":"#/components/schemas/ChatCompletionResponseUsage","description":"Token usage for the request."}},"required":["id","object","choices"],"title":"ChatCompletionResponse"},"ErrorErrorType":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","rate_limit_error","server_error"],"description":"The error category, derived from the status code.","title":"ErrorErrorType"},"ErrorError":{"type":"object","properties":{"message":{"type":"string","description":"A human-readable description of the problem."},"type":{"$ref":"#/components/schemas/ErrorErrorType","description":"The error category, derived from the status code."},"param":{"type":["string","null"],"description":"The request field the error relates to, when it maps to one. Nested fields use dot notation, for example `messages.0.content`."},"code":{"type":"string","description":"A stable machine-readable code, for example `invalid_api_key` or `model_not_found`."},"status":{"type":"integer","description":"The HTTP status code, repeated in the body so it is available on streamed errors."},"data":{"type":"object","additionalProperties":{"description":"Any type"},"description":"Additional structured detail, when available."}},"required":["message","type","code","status"],"title":"ErrorError"},"Error":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorError"}},"required":["error"],"description":"The OpenAI-style error envelope returned by the OpenAI-compatible endpoints.","title":"Error"},"AccountBlockedErrorData":{"type":"object","properties":{"reason":{"type":"string"}},"title":"AccountBlockedErrorData"},"AccountBlockedError":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"integer"},"ev":{"type":"integer"},"data":{"$ref":"#/components/schemas/AccountBlockedErrorData"}},"description":"Returned when an organization's account is blocked. This endpoint does not use the standard error envelope for this case.","title":"AccountBlockedError"},"ResponseRequestInputOneOf1Items":{"type":"object","properties":{},"title":"ResponseRequestInputOneOf1Items"},"ResponseRequestInput1":{"type":"array","items":{"$ref":"#/components/schemas/ResponseRequestInputOneOf1Items"},"title":"ResponseRequestInput1"},"ResponseRequestInput":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/ResponseRequestInput1"}],"description":"Text, or a list of input items, to generate a response for. Input item content parts are text; an image part is rejected with a 400. Send images to /v1/chat/completions as an image_url content part.","title":"ResponseRequestInput"},"ResponsesFunctionToolType":{"type":"string","enum":["function"],"description":"Always `function`. Any other tool type is rejected with a 400.","title":"ResponsesFunctionToolType"},"ResponsesFunctionTool":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ResponsesFunctionToolType","description":"Always `function`. Any other tool type is rejected with a 400."},"name":{"type":"string","description":"Name of the function. The model uses this to refer to the call."},"description":{"type":"string","description":"What the function does and when to use it. The model selects tools from this text, so it is worth writing carefully."},"parameters":{"type":"object","additionalProperties":{"description":"Any type"},"description":"JSON Schema describing the function's arguments."},"strict":{"type":"boolean","description":"Whether the model must follow the parameter schema exactly. Requires `additionalProperties: false` and every property listed in `required`."}},"required":["type","name","parameters"],"description":"The flat function-tool shape accepted on `/v1/responses`, where the function's fields sit at the top level. The nested `FunctionTool` shape is accepted here too.","title":"ResponsesFunctionTool"},"ResponseRequestToolsItems":{"oneOf":[{"$ref":"#/components/schemas/ResponsesFunctionTool"},{"$ref":"#/components/schemas/FunctionTool"}],"title":"ResponseRequestToolsItems"},"ResponseRequestToolChoice0":{"type":"string","enum":["auto","none","required"],"title":"ResponseRequestToolChoice0"},"ResponseRequestToolChoice":{"oneOf":[{"$ref":"#/components/schemas/ResponseRequestToolChoice0"},{"type":"object","additionalProperties":{"description":"Any type"}}],"description":"Controls which (if any) tool is called.","title":"ResponseRequestToolChoice"},"TextFormatOneOf0Type":{"type":"string","enum":["text","json_object"],"title":"TextFormatOneOf0Type"},"TextFormat0":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/TextFormatOneOf0Type"}},"required":["type"],"title":"TextFormat0"},"TextFormatOneOf1Type":{"type":"string","enum":["json_schema"],"title":"TextFormatOneOf1Type"},"TextFormat1":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/TextFormatOneOf1Type"},"name":{"type":"string","description":"Name of the schema. Required when `type` is `json_schema`."},"description":{"type":"string","description":"What the schema is for."},"schema":{"type":"object","additionalProperties":{"description":"Any type"},"description":"The JSON Schema the reply must conform to."},"strict":{"type":"boolean","description":"Whether the reply must match the schema exactly."}},"required":["type","name"],"title":"TextFormat1"},"TextFormat":{"oneOf":[{"$ref":"#/components/schemas/TextFormat0"},{"$ref":"#/components/schemas/TextFormat1"}],"description":"The flat output-format shape used by `/v1/responses`. An unrecognised `type` is rejected with a 400.","title":"TextFormat"},"ResponseRequestText":{"type":"object","properties":{"format":{"$ref":"#/components/schemas/TextFormat"}},"description":"Output format configuration. `text.format` takes precedence over `response_format`.","title":"ResponseRequestText"},"ResponseRequestReasoningEffort":{"type":"string","enum":["none","minimal","low","medium","high"],"description":"How much the model may reason before answering. `none` disables reasoning. Any other value is rejected with a 400.","title":"ResponseRequestReasoningEffort"},"ResponseRequestReasoning":{"type":"object","properties":{"effort":{"$ref":"#/components/schemas/ResponseRequestReasoningEffort","description":"How much the model may reason before answering. `none` disables reasoning. Any other value is rejected with a 400."}},"description":"Reasoning configuration. See the Reasoning guide.","title":"ResponseRequestReasoning"},"ResponseRequest":{"type":"object","properties":{"model":{"type":"string","description":"The ASI:One model to use."},"input":{"$ref":"#/components/schemas/ResponseRequestInput","description":"Text, or a list of input items, to generate a response for. Input item content parts are text; an image part is rejected with a 400. Send images to /v1/chat/completions as an image_url content part."},"instructions":{"type":"string","description":"System/developer instructions inserted ahead of the input."},"stream":{"type":"boolean","default":false,"description":"If true, response events are streamed as server-sent events."},"background":{"type":"boolean","default":false,"description":"If true, run the response as a background task; poll it with the retrieve endpoint or stop it with cancel."},"store":{"type":"boolean","default":true,"description":"Whether to persist the response so it can be retrieved by id."},"previous_response_id":{"type":"string","description":"The id of a previous response to continue from."},"max_output_tokens":{"type":"integer","minimum":1,"description":"Upper bound on tokens generated for the response."},"temperature":{"type":"number","format":"double","minimum":0,"maximum":2,"description":"Sampling temperature."},"top_p":{"type":"number","format":"double","minimum":0,"maximum":1,"description":"Nucleus sampling probability mass."},"tools":{"type":"array","items":{"$ref":"#/components/schemas/ResponseRequestToolsItems"},"description":"A list of tools the model may call, in either the flat Responses shape or the nested Chat Completions shape. See the Tool Calling guide."},"tool_choice":{"$ref":"#/components/schemas/ResponseRequestToolChoice","description":"Controls which (if any) tool is called."},"parallel_tool_calls":{"type":"boolean","description":"Whether the model may call several tools in one turn."},"text":{"$ref":"#/components/schemas/ResponseRequestText","description":"Output format configuration. `text.format` takes precedence over `response_format`."},"reasoning":{"$ref":"#/components/schemas/ResponseRequestReasoning","description":"Reasoning configuration. See the Reasoning guide."},"enable_thinking":{"type":"boolean","description":"ASI:One extension. Whether the model reasons before answering. Used when `reasoning.effort` is absent."},"thinking_budget":{"type":"integer","minimum":0,"maximum":16384,"description":"ASI:One extension. Maximum tokens the model may spend reasoning."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Up to 16 key-value string pairs attached to the response."}},"required":["model","input"],"description":"OpenAI-compatible Responses API request.","title":"ResponseRequest"},"ResponseObjectStatus":{"type":"string","enum":["queued","in_progress","completed","failed","cancelled","incomplete"],"description":"Lifecycle status. `queued` and `in_progress` mean the run is still going; `completed`, `failed`, `cancelled` and `incomplete` are terminal.","title":"ResponseObjectStatus"},"ResponseObjectOutputItems":{"type":"object","properties":{},"title":"ResponseObjectOutputItems"},"ResponseObjectUsageInputTokensDetails":{"type":"object","properties":{"cached_tokens":{"type":"integer","description":"Input tokens served from cache. These still count toward `input_tokens`."}},"description":"Breakdown of the input tokens.","title":"ResponseObjectUsageInputTokensDetails"},"ResponseObjectUsageOutputTokensDetails":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","description":"Tokens spent reasoning before answering. `0` when reasoning was not requested."}},"description":"Breakdown of the output tokens.","title":"ResponseObjectUsageOutputTokensDetails"},"ResponseObjectUsage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"$ref":"#/components/schemas/ResponseObjectUsageInputTokensDetails","description":"Breakdown of the input tokens."},"output_tokens":{"type":"integer"},"output_tokens_details":{"$ref":"#/components/schemas/ResponseObjectUsageOutputTokensDetails","description":"Breakdown of the output tokens."},"total_tokens":{"type":"integer"}},"description":"Token usage for the response.","title":"ResponseObjectUsage"},"ResponseObject":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"status":{"$ref":"#/components/schemas/ResponseObjectStatus","description":"Lifecycle status. `queued` and `in_progress` mean the run is still going; `completed`, `failed`, `cancelled` and `incomplete` are terminal."},"model":{"type":"string"},"output":{"type":"array","items":{"$ref":"#/components/schemas/ResponseObjectOutputItems"}},"usage":{"$ref":"#/components/schemas/ResponseObjectUsage","description":"Token usage for the response."}},"description":"An OpenAI-compatible response object. See the linked OpenAI reference for the full schema.","title":"ResponseObject"},"Responses_deleteAResponse_Response_200":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean"}},"title":"Responses_deleteAResponse_Response_200"},"ResponsesResponseIdInputItemsGetResponsesContentApplicationJsonSchemaDataItems":{"type":"object","properties":{},"title":"ResponsesResponseIdInputItemsGetResponsesContentApplicationJsonSchemaDataItems"},"Responses_listInputItems_Response_200":{"type":"object","properties":{"object":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ResponsesResponseIdInputItemsGetResponsesContentApplicationJsonSchemaDataItems"}}},"title":"Responses_listInputItems_Response_200"}},"securitySchemes":{"default":{"type":"http","scheme":"bearer"}}}}