> This is part 1 of 2 of the full documentation (pages 1–100 of 131).
> The content is paginated: fetch every part to see all of it.
> Next part: https://docs.nexos.ai/llms-full.txt/1
> Page index: https://docs.nexos.ai/llms.txt

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
This site has an agentic ask interface you may use to query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nexos.ai/index.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

---

# Getting started

Get started with nexos.ai, your all-in-one AI platform for business.

Here you'll find comprehensive guides and resources divided into two main solutions:

Working with:

<table data-card-size="large" data-view="cards"><thead><tr><th align="center"></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><h3>Gateway API</h3></td><td>Get API endpoints, authentication methods, and sample requests to integrate AI capabilities into your applications.</td><td><a href="/gateway-api">Gateway API</a></td></tr><tr><td align="center"><h3>Workspace</h3></td><td><p>Manage your AI models, users, and governance from one place.</p><p><strong>Admins:</strong> set usage, control access.<br><strong>Users:</strong> get setup guidance.</p></td><td><a href="/workspace">Workspace</a></td></tr></tbody></table>


# Workspace

Browse nexos.ai Workspace docs: Chat, Projects, Agents, and Messaging App integrations for users, and Organization management and Observability for admins.

nexos.ai Workspace is an AI platform that brings 200+ LLMs into one place for your team. Users can chat with any model, compare outputs side by side, build no-code AI Agents, and connect their company

## For users

<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><strong>Chat</strong></td><td><a href="/workspace/chat">Chat</a></td></tr><tr><td align="center"><strong>Projects</strong></td><td><a href="broken://spaces/DcOhapgXnoeDvgGQ8Jm4/pages/knXmSeV8uuKFbvn1HN1q">Broken link</a></td></tr><tr><td align="center"><strong>Agents</strong></td><td><a href="/workspace/agents">Agents</a></td></tr><tr><td align="center"><strong>nexos.ai in Messaging Apps</strong></td><td><a href="/workspace/settings/user-settings/my-apps">My Apps</a></td></tr><tr><td align="center"><strong>Troubleshooting</strong></td><td><a href="/workspace/troubleshooting">Troubleshooting</a></td></tr></tbody></table>

## For admins and workspace owners

<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><strong>Organization management</strong></td><td><a href="/workspace/settings/organization">Organization</a></td></tr><tr><td align="center"><strong>Observability</strong></td><td><a href="/workspace/settings/observability">Observability</a></td></tr><tr><td align="center"><strong>User Settings</strong></td><td><a href="/workspace/settings/user-settings">User Settings</a></td></tr></tbody></table>


# nexos.ai Chat

Learn how nexos.ai Chat works. Pick a model or let Auto choose, adjust settings like temperature and system prompts, and compare models side by side.

nexos.ai Chat lets you start a conversation with any model from a single interface. Pick a model manually or let Auto select the best fit for your prompt, then refine responses with advanced settings like temperature and system prompts.&#x20;

## Getting Started

Starting an [AI chat](https://nexos.ai/features/ai-chat/) takes three steps: open a new chat window, choose the model that fits your task, and enter your prompt.

{% stepper %}
{% step %}

### Click **New chat**

Click **New chat** on the left side of the screen.
{% endstep %}

{% step %}

### Choose your preferred model

Choose a model from the selection window (see image below), or select **Auto** to let nexos.ai choose the best model for your request based on context and your workspace rules.&#x20;

Each model shows context window size, supported inputs, and supported outputs.

Match your task to the model's capabilities. For images, choose models like DALL-E with image output. For text, any text-output model works.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fs4CGoqz7ydYyXUfzlUyO%2Fezgif.com-video-to-gif-converter.gif?alt=media&amp;token=4abdf48b-a59d-4d8e-9279-b9fdb636a90a" alt="nexos.ai chat interface showing a prompt with an attached CSV file requesting help building a quarterly report."><figcaption></figcaption></figure>

{% hint style="info" %}
Tech details info:

* Context window: measured in tokens, determines how much text can be processed
* Input types: text, image, audio, file compatibility
* Output types: text, image, code generation capabilities
  {% endhint %}
  {% endstep %}

{% step %}

### Begin your conversation

Enter your prompt in the chat interface. Use web search (click **Web search**) to enhance results with current information. Upload files (click the **+** icon) or images to include additional context in your conversation. See example below:

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FpuTQo4blcfyUwqx6kHsP%2FScreenRecording2026-03-27at18.14.07-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=2d708252-555c-49a4-9ec2-301eaa2a8d11" alt="nexos.ai model selection window showing Claude Opus 4.1 details including context window, input/output types, and reasoning capability."><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Advanced options

This is completely optional, if you'd like - you can configure these settings to customize how the AI responds and behaves in your chat.

{% stepper %}
{% step %}

### Max completion tokens

Limits the length of the AI's response.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FDUDp0B9wveKFqt1K9lBB%2FScreenRecording2026-03-27at18.18.00-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=cca2f5fc-ffe7-4f8f-8a8d-b13401c3ad1b" alt="nexos.ai max completion tokens limit." width="513"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Temperature

Controls response randomness. Lower values (0.1) produce more focused answers, higher values (0.9) create more **creative** responses.
{% endstep %}

{% step %}

### Top P

Narrows word choices during generation. Lower values make responses more predictable.
{% endstep %}

{% step %}

### System prompt

Sets the AI's behavior and role before the conversation starts. Acts as instructions for how the assistant should respond.
{% endstep %}
{% endstepper %}

## Token usage

Every conversation now shows your real-time costs at the top right of each Chat. See total cost, average per message, and conversation length so you know exactly where your budget is going.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FOPDrg6W1pHZCmEDp1JSI%2FRecording%202026-10-26%20112244.gif?alt=media&amp;token=5c487b80-dcc5-43b2-a005-e73c95e3caec" alt="" width="563"><figcaption></figcaption></figure>


# File generation & analysis

Code Interpreter helps you turn questions and data into **computed answers** and **downloadable files -** right inside nexos.ai Chat.&#x20;

It can run Python code to analyze data, spot issues, and produce outputs you can use immediately.

***

### Capabilities

* **Analyze data** (especially spreadsheets and CSV-style data)
* **Create charts** to visualize results
* **Generate files** such as cleaned CSVs and reports, and attach them in the conversation

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FrZk2UktgHxocKVnwhS3q%2Fimage.png?alt=media&amp;token=dde7a407-1265-4a97-853a-ead87b6a71fd" alt=""><figcaption></figcaption></figure>

***

### Common use cases

* Clean and transform a CSV, then export a new version.
* Create a quick analysis and summary you can share.
* Debug data issues by finding errors and anomalies.

***

### Where it works

You can use Code Interpreter in:

* **Chat**
* **Agents** (great for repeatable workflows with saved instructions)&#x20;

***

### How to use it

{% stepper %}
{% step %}

#### Start a new chat&#x20;

You can do that in Chat or Agents.
{% endstep %}

{% step %}

#### Provide your data

* Add files to use them as source material in chats
* Or describe what you want to generate (for example: “Create a cleaned CSV and a chart”)
  {% endstep %}

{% step %}

#### Ask for the outcome

Examples:

* “Clean this dataset and export a new CSV.”
* “Summarize trends and generate a simple report.”
* “Create a chart of revenue by month.”

Your results will appear in Chat, and generated files will be attached when available.
{% endstep %}
{% endstepper %}

***

### Tips for best results

* Specify desired output: **CSV, chart, or other specific document format**.
* Name the columns or metrics you care about (e.g., “group by month,” “remove duplicates”).


# Smart Routing

Smart Routing is an intelligent model selector that automatically chooses the best language model for each request, using only organization-approved models. It looks at your prompt, available models, and organization rules to balance response quality, speed, and cost - without you having to pick a model manually every time.

You can think of it as an “auto” mode for model selection: you focus on the task, Smart Routing picks the model.

***

### How to use Smart Routing

Smart Routing can be selected directly from the model picker in Chat, just like any other model.

{% stepper %}
{% step %}

#### Start a new chat

1. Click **New chat** on the left side of the screen.
2. A new chat window will open, with a model picker at the top.
   {% endstep %}

{% step %}

#### Select Smart Routing

1. Click the **model quick menu** at the bottom-right of Chat.
2. Choose **Auto** from the list.
3. Once selected, Smart Routing will automatically pick the best underlying model for each message in this chat.

You can switch back to a specific model anytime by reopening the model menu and choosing a different model.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FlzJQH6F10PRHVFHShmme%2FScreenRecording2026-03-27at18.27.25-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=f1f13a7c-eb8b-4a8d-b0f6-7622bfb694f6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Start chatting

1. Type your prompt in the message box.
2. (Optional) Turn on tools such as web search or integrations if available in your workspace. Smart Routing will pick models that offer the capabilities you have selected.
3. Click **Send**.

Smart Routing will choose the model and return a response. From your perspective, it behaves like any other model - the selection happens behind the scenes.
{% endstep %}
{% endstepper %}

***

### When to use Smart Routing vs a specific model

**Use Smart Routing when:**

* You don’t want to think about which model is best for each task.

**Use a specific model when:**

* You must always use a given vendor/model for compliance or contractual reasons
* You are benchmarking or comparing outputs across models (for example, using the “Compare models” feature in Chat)
* A workflow is tuned around the behavior of a particular model

In all other cases, Smart Routing is a safe default that keeps model selection efficient and transparent for everyday users.


# Deep Research

Deep Research is a mode in Workspace Chat that runs a deeper, multi-step investigation and returns a structured report with source citations.

Use it when you need more than a quick answer—like market scans, competitor research, or multi-angle analysis for a business decision.

***

### How to use Deep Research

{% stepper %}
{% step %}

#### Turn on Deep Research

In your chat window, turn **Deep Research** on. You can find it under **AI Tools**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F07sZd5vTf6vOhIIeWGLO%2Fimage.png?alt=media&amp;token=2833a7ed-6687-455d-824d-c0894108263b" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Ask your question

Type what you want to learn and what you want as output.

Include:

1. Goal (what decision you’re making)
2. Scope (market, region, timeframe)
3. Output format (e.g., “compare top 5 options with pros/cons + recommendation”)
   {% endstep %}

{% step %}

#### Let it run

Deep Research runs autonomously, then generates a structured report with citations.

Most runs take **5–20 minutes**.
{% endstep %}
{% endstepper %}

***

### Guardrails

Guardrails are checked at two points:

1. **Your initial query** (before research starts)
2. **The final report** (before it’s delivered)

If the initial query or final report violates guardrails, Deep Research stops.

***

### FAQs

#### How long does Deep Research take?

Usually **5–20 minutes**, depending on the question.

#### Do I pay per use?

Not currently. Usage is limited daily by your company’s budget.

#### Will it work for every model?

Deep Research works with the [Recommended Models.](https://docs.nexos.ai/models)


# Memory and Personalization

User Memory helps nexos.ai remember important context about you across chats, so you do not have to repeat the same details every time you start over. As you work, the app can dynamically add new context into memory based on what you share in your chats, so future answers can better match your situation and stay consistent.

Personalization is a simple addition to Memory that you control directly. You can manually add information about yourself using custom instructions, such as your role, your preferences, and how you want responses to be written.

It helps you start faster and get answers that match your style.

#### Where it works

You can use it anywhere your workspace supports it, such as:

* Chat
* Agents

### How to use it

#### 1) Open your personalization settings

Go to the Personalization settings area.

{% stepper %}
{% step %}

### Open your settings

Open Settings, then go to the Personalization tab. From here, you can toggle Memory on or off at any time.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FY0KwPbLAr4ZLD1LEnQqA%2FPersonalization.gif?alt=media&amp;token=2df9e07e-8192-48ad-afa0-1ae6d0fae420" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Manage your saved Memory

If you want to review what nexos.ai remembers, click **Manage memory**. You will be taken to a page where you can see your saved memories, delete a single memory, or delete all memories.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FBpUvOPhq3vEnBYJFGuAN%2FScreenshot%202026-02-26%20at%2010.07.02.png?alt=media&amp;token=9726faa6-8dc9-4501-918c-f4189d1fac13" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Add your personalization details

Add a few key details about yourself so nexos.ai can respond in a way that fits your work. For example, you can add your role, what you do, and any general preferences you want the assistant to follow.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fkg1xJeGVUKHYlftvJrUm%2FScreenshot%202026-02-26%20at%2010.22.24.png?alt=media&amp;token=6ec55d86-74fc-44b1-8c5b-07e9d15e048a" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Add custom instructions

Use the custom instructions field to describe how you want responses to be written. You can either type your own instructions or choose from the suggested options provided.

**Examples:**

* Keep answers short and clear.
* Use bullet points and headings.
* Always include a checklist at the end.
* Use a professional and friendly tone.

After you fill in your personalization details and custom instructions, make sure you **save** your changes so they apply to future chats.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F8NAtiJ68vhW6SVh7Fl2I%2FScreenRecording2026-02-26at10.28.27-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=5b9cb07b-aced-46dc-9292-c7b7b36d6d3d" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

### Start chating

Start a new chat and ask your question as usual. nexos.ai will use your saved preferences and remembered context to shape future responses.
{% endstep %}
{% endstepper %}

### When to use it

Use Memory and Personalization when you often repeat the same context in new chats, when you want more consistent answers across conversations, or when you want responses in a specific style, summaries, checklists, or a certain tone.

### You stay in control

You can view what nexos.ai remembers, edit it, or delete it at any time. If you want a different style for a single request, you can simply say so in your message and it will apply for that one response.

<br>


# Interactive Chat

Interactive Chat makes conversations in nexos.ai feel more like working with a teammate.

Instead of only replying to the exact prompt you type, nexos.ai can pause, ask follow-up questions, and guide the conversation when it needs more context to give you the best possible answer.

This helps you get more accurate and useful results without needing to guess the perfect prompt from the start.

## How it works

When your request is missing important details, nexos.ai may pause and ask a follow-up question before continuing.

This usually happens when key context is missing or when more than one valid interpretation is possible.

**For example, it may ask about:**

* the audience
* the format you want
* the time period
* the topic or source to focus on
* whether connected tools or integrations should be used
* whether the result should be generated as a file, slide deck, or document

Once you answer, nexos.ai continues with the extra context and provides a more relevant response.

## What you need to do

Simply reply to the follow-up question in the chat. After that, nexos.ai resumes the task and uses your answer to improve the result.

## Why it’s useful

**Interactive Chat helps you:**

* get more relevant answers faster
* provide the right context at the right moment
* reduce repeated prompting
* spend less time figuring out what details to include upfront
* reduce manual back-and-forth to reach the expected result

## When you’ll notice it

You’re most likely to see Interactive Chat when:

* your request is broad or open-ended
* multiple answers are possible
* more context is needed before continuing
* the best result depends on your preferences or business context

### In short

Interactive Chats helps nexos.ai work more like a collaborator in the conversation.

It asks for missing context when needed and helps refine the response, so you can get to the right answer with less effort.

This means less guessing, less re-prompting, and better results from the start.


# File Previews

### File previews

File previews let you open supported files directly inside nexos.ai without leaving your workspace. This makes it easier to quickly review generated files before downloading or sharing them.

### How it works

When a supported file is generated in nexos.ai, you can select it to open a preview inside the platform. The preview loads automatically, so you can read the file right away.

File previews are available for:

* HTML
* PDF
* TXT
* PNG
* XLSX
* CSV
* PPTX
* DOCX

### Why it’s useful

File previews help you review output faster without downloading every file first. This is especially useful when you want to quickly check reports, presentations, documents, or spreadsheets before continuing your work.

### How to use it

1. Generate or open a supported file in nexos.ai.
2. Select the file.
3. The preview opens automatically inside the workspace.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FxnL9qBapFqUJjtkyQezJ%2FScreenRecording2026-05-27at16.12.491-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=4d517337-f5c2-4076-99d6-dc0e29234328" alt="" width="563"><figcaption></figcaption></figure>

### Where it works

File previews are available in:

* Chat
* Agents
* Agent Drafts
* Projects

### What to know

* File previews are **read-only**
* You can view supported files directly in the platform, but not edit them from the preview


# Chat Sharing

Chat Sharing turns your AI conversations into shareable knowledge. Generate a link to share a chat with your workspace, so others can see exactly what was created and how it got there.

Use it when you want to share useful AI work with teammates or send outputs to people inside your organization without copying everything into another tool.

### How to use Chat Sharing

{% stepper %}
{% step %}
Open the Share menu In your chat window, click **Share** in the top-right corner.
{% endstep %}

{% step %}
Copy the link Click **Copy link** to generate and copy the shareable URL. You can then paste it anywhere you want to share the chat with your team.
{% endstep %}

{% step %}
Update or revoke access later Open the Share menu again anytime to stop sharing or manage the link.
{% endstep %}
{% endstepper %}

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F68Fkfx48Jpg2lZ3r5eb2%2FScreenshot%202026-09-21%20at%2021.20.55.png?alt=media&amp;token=435c076f-bdab-4f2b-aef6-84ca6295b083" alt=""><figcaption></figcaption></figure>

### What recipients can see

People opening the link can view the shared chat in read-only format, including:

* your prompts
* AI responses, including the reasoning and thinking process
* generated files, which they can download

{% hint style="info" %}
**Note:** Your uploaded files are not included in shared chats.&#x20;
{% endhint %}

### Important notes

* Shared chats are currently available only within your organization
* Shared chats do not appear in the recipient's sidebar
* Access is available only through the shared link
* Updates are reflected when the page is refreshed, not in real time
* Some workspaces may have Chat Sharing turned off by an admin

### FAQs

**Who can open a shared chat?**\
Currently, shared chats are limited to users in your workspace.&#x20;

**Can someone continue the shared chat?**\
No. Shared chats are view-only.

**Can I stop sharing a chat?**\
Yes. You can make a chat private anytime from the Share menu. This deactivates the current link and stops anyone from accessing it.

**Does the link change if I update access?**\
Yes. A new link is generated each time you change the access level. If you switch to private, the previous link becomes inactive. When you share again, you'll need to copy and share the new link


# Token usage and File Storage

Every conversation now shows your real-time costs at the top right of each Chat. See the total cost, average per message, and conversation length so you know exactly where your budget is going. See how much storage your uploaded files use. The file count and total size are displayed together, so you can easily keep track of your storage usage.

### Credit usage

Start a New Chat or continue the old one, send your prompt, and click on **Usage** to find out what it cost in AI Workspace credits.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FCgKFtMbMuMpeTkgnAK2A%2Fimage.png?alt=media&amp;token=98af070e-8fe3-4a87-97df-69b306702420" alt=""><figcaption></figcaption></figure>

### File storage

The uploaded files and the storage space they use are displayed in the top-right corner of your chat:

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F4PQCgAVHLHRynxnVRJho%2Fimage.png?alt=media&amp;token=4819cd32-3a94-459a-948a-b4b2ff733566" alt="" width="407"><figcaption></figcaption></figure>

### Deleting Files in Chat

1. Find the file usage indicator in the top-right corner and click it.
2. Hover over the file you want to delete and click the three-dot menu.
3. Select Delete to remove the file.

{% hint style="info" %}
Currently, deleting multiple files at once in a chat is not supported.
{% endhint %}

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FyFzJ36zVgBv2PgSMeVMZ%2FRecording%202026-10-26%20114723.gif?alt=media&amp;token=7df248cb-3482-49f5-98fc-47e72fdae0c7" alt=""><figcaption></figcaption></figure>


# Agents

Agents let you create reusable AI helpers with a defined purpose and model. Each one runs with your rules, specific tools, integrations and knowledge.

To create a custom agent, head to the navigation tab **Agents →** click **Create agent.** You can also see this [video walk-through](#video-walk-through) with an example use case.&#x20;

{% stepper %}
{% step %}

### Create an agent

It'll be easier to navigate if you give your agent a proper name and a description.\
*Note: you can create as many agents as you'd like: different tasks, use cases, etc.*&#x20;
{% endstep %}

{% step %}

### Execution

Choose how to trigger your agent. Currently, we support **prompt-based triggers**, which let you chat with the agent or run now.

**What does “Run Now” mean?**\
Use it when the agent can follow instructions immediately.\
*Example:* A Sprint Architect agent that checks JIRA and summarizes sprint health can run now automatically.
{% endstep %}

{% step %}

### Model

Choose the model your agent will use to process prompts. You can change it at any time.\
Model fallback behavior follows your organization’s settings (i.e., if one model fails, another will be used).

:bulb:*Pro tip*:  *if you want to get the best outcomes from agents, use the models our AI engineers recommend. You can access the recommended models from the model picker in the agent creation form.*
{% endstep %}

{% step %}

### Creativity

AI models generate text by predicting the next word based on probabilities. You can control how strictly the model follows your **context** and how much it draws on **outside knowledge**, which affects the novelty and length of the output.

*Grounded*: strictly context, concise and safe; *Guided*: mostly context with selective knowledge; *Balanced*: mix of context and outside knowledge; *Analytical*: context-focused, uncovers patterns; *Creative*: freely explores new ideas.
{% endstep %}

{% step %}

### Instructions

Describe how your assistant should follow prompts, generate responses, and maintain tone. You can enter up to 32,000 characters to set style, rules, and behavior. Note, that longer instructions tend to generate longer response.

:bulb:*Pro tip*:  LLMs understand Markdown — use headings, lists, and formatting to clearly communicate your instructions.
{% endstep %}

{% step %}

### Capabilities

If needed, enable web search to include real-time results from the internet.\
Enrich your agent with knowledge base - add files from an existing [Project](broken://pages/knXmSeV8uuKFbvn1HN1q), like brand guidelines, tone of voice, or reference documents to give your assistant extra context.\
This lets it provide sourced answers using your own materials. Knowledge can be updated or removed anytime.
{% endstep %}

{% step %}

### Integrations

Empower your agent with [integrations](/gateway-api/integrations) and allow connect to popular platforms like Microsoft 365, SharePoint, Jira, Confluence, Slack and many more. Your agent can fetch information, view files, and read messages. These integrations let your agent provide context-aware answers and insights from your connected systems.\
Note: if you want to use integrations, select a model that supports them.
{% endstep %}
{% endstepper %}

Once saved, you can start chatting with your agent right away. It will appear in the agents list under the Agents menu, and you can access all your agents via the **Chat** model dropdown.

### **Agent Sharing**

Share Agents with your team to collaborate more easily and standardize workflows across your organization.

### Video walk-through

{% embed url="<https://www.youtube.com/watch?v=uogFpbEhRbA>" %}


# Agent Builder

Agent Builder is the no-code solution for creating powerful Agents within nexos.ai. Configure Agents with specific instructions to delegate your repetitive work.

To start creating your first Agent with Agent Builder, simply log in to nexos.ai. Then, for quick access, navigate to the plus sign next to Agents or click on the Agent icon in the navigation bar and click on the “Create agent from scratch” button in the drop-down menu. Here are the best practices for using Agent Builder to create the best AI teammate.&#x20;

{% stepper %}
{% step %}

### Describe the task you want to delegate

Tell the AI Agent Builder what you need in plain language. Just describe the job as you would to a new human hire. Helpful guiding questions for your first prompt:&#x20;

* What should your Agent do?&#x20;
* What decisions should it make?
* What should it avoid?&#x20;

The clearer your description, the better your Agent performs. Think about the actual problem you want to solve. For example, “I want to stay on top of things I need to do – please review my emails, Jira, and Slack threads, and compile a list of action items every morning at 8 AM.” If you need the Agent to run on a particular schedule (for example, send you an overview of all Slack updates every morning), ask it to run periodically. Press “Send.”
{% endstep %}

{% step %}

### Refine your agent

The AI Agent Builder asks follow-up questions and sharpens the instructions until your Agent's behavior is exactly right. You review, approve, and move on. This back-and-forth ensures your Agent matches your exact workflow. You stay in control. If something isn't quite right, you can iterate until it's perfect.&#x20;

At this stage, the Builder will propose an Agent name, description, enable or disable Web Search, draft starters, and show Flow to your right – a visual representation of the steps your Agent will take to complete the task at hand, with optional steps for human-in-the-loop reviews. Look over the process closely and suggest edits if necessary.

Some parameters, like creativity level, are automatically selected using best practices, but all settings can be changed if needed via prompt or Agent editor.
{% endstep %}

{% step %}

### Connect your tools

Type the integrations your Agent needs: Slack, Jira, Google Workspace, SharePoint, and more. Your Agent works within the tools you already use, pulls information from the systems your team relies on daily, and acts within this context.&#x20;

The Agent Builder will suggest integrations that make sense for your Agent. This step is optional – if your Agent doesn’t need access to tools or internal data, skip it.
{% endstep %}

{% step %}

### Test it

Try prompting your Agent straight away in the “Try Agent” window on the right to see it in action and make any quick adjustments. Run it on real work scenarios.&#x20;

Here are a few guiding questions for testing and final refinement:&#x20;

* Does it handle edge cases?&#x20;
* Is the tone right?&#x20;
* Does it pull the right data?&#x20;

Testing is fast. Adjustments are faster. You'll know immediately if your Agent is ready.
{% endstep %}

{% step %}

### Launch your agent

Your Agent is ready. Click “Save” – now, it’s available for you anytime to handle the work you've been doing manually. The page will redirect immediately to the chat with your Agent or, if it’s a scheduled Agent, to the list of all Agents.
{% endstep %}

{% step %}

### Edit your agent

If you need to further edit your Agent at a later time, navigate to Agents > Created by you > Three dots on the right > Edit. Here, you can customize every part of your Agent, like changing the model, schedule, starter prompt, name, description, and more.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
A Schedule Agent cannot be shared; it can only be duplicated.
{% endhint %}

{% hint style="info" %}
Schedule Agent will not appear in the left-side panel, only in the Agents list.
{% endhint %}

### Pausing a Schedule Agent

You can now pause scheduled agents to avoid unnecessary credit usage and resume them later with all your settings preserved.

#### &#xD;Option 1:

1\. Go to Agents -> Click the three dots on the Agent you wish to manage;\
2\. Pause schedule.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FrLvC883jCQsrlyQvLs88%2Fhttps___files.gitbook.com_v0_b_gitbook-x-prod.appspot.com_o_spaces%252FDcOhapgXnoeDvgGQ8Jm4%252Fuploads%252FOS8pZ5KqF1X185LKnju3%252FRecording%25202026-10-20%2520164237.gif?alt=media&amp;token=3864d548-7e63-4750-8e56-25eaf387f40b" alt="" width="563"><figcaption></figcaption></figure>

#### Option 2:

1\. Go to Agents -> Created by you;\
2\. Click the three dots on the Agent you wish to manage -> Edit;\
3\. Click on the Settings wheel -> Toggle off the Schedule.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FGklhv6r6dnpvZtZj9RYq%2FRecording%202026-10-20%20164550.webp?alt=media&amp;token=7a6e6a29-f555-4e50-bc41-4dbbd9f34ba5" alt="" width="563"><figcaption></figcaption></figure>


# Human-in-the-Loop (HITL) Approvals

Human-in-the-Loop (HITL) Approvals lets your agent pause before taking an action that changes something in another tool. Instead of acting immediately, nexos.ai shows you what the agent plans to do and waits for your decision.

This helps you stay in control of actions like sending a message, creating a ticket, or updating a record.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FSBV7zvFKDGnj4zTyh15J%2Fimage.png?alt=media&amp;token=be9f4ff6-f847-4c2d-84dd-d5649939add1" alt="" width="563"><figcaption></figcaption></figure>

### Where to find it

You will see approvals in different places depending on how the agent is running.

#### For chat agents

The approval appears directly in the conversation when the agent reaches an action that needs your review.

#### For scheduled agents

The approval appears in the agent’s Activity history. You may also notice it from the Activity panel, where paused agents show that they are waiting for approval.

To get there:

1. Open Agents.
2. Find the agent you want to review.
3. Open the agent’s Activity history or select the notification from the Activity panel.
4. Review the pending approval card.

### How it works

When an agent is about to perform an action that changes something outside nexos.ai, it pauses and shows an approval card.

The card gives you a clear summary of:

* what the agent wants to do
* which integration it will use
* the key details of the action

You can then choose what should happen next.

### Turn approvals on or off for each integration

Approval settings are managed per integration inside the agent settings. For each integration added to the agent, you can turn the approval toggle on or off.

If the toggle is on, nexos.ai will ask for approval before the agent takes an action that changes something in that integration.\
If the toggle is off, the agent can continue with write actions in that integration without asking each time.

To manage it:

1. Open Agents.
2. Select the agent you want to update.
3. Open Studio in the top-right corner.
4. Select Settings.
5. Go to Integrations.
6. For each added integration, turn Require my approval before taking each action on or off.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FBdduYWK3rD5rtBlseAZe%2FScreenRecording2026-06-29at19.49.55-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=cb53d142-283a-4292-bf8f-2d0bb44dbfb5" alt="" width="563"><figcaption></figcaption></figure>

### What you can do

Each approval card gives you three options:

* Approve\
  The agent performs the action and continues.
* Decline\
  The agent does not perform the action and stops that run.
* Always approve\
  Future actions for that agent + integration can continue automatically without asking each time.

### What happens next

After you make a decision:

* if you approve, the action is completed and the agent continues
* if you decline, the action is canceled and the run stops
* if you choose always approve, the action is completed and similar future actions for that agent/integration can continue automatically

If no action is taken, the request will eventually expire and the run will stop.

### What users need to know

* Approvals only appear for actions that change something in another system.
* Read-only actions, like searching or retrieving information, continue without asking for approval.
* Approval requests stay available even if you leave and come back later.
* You should always review the action before approving it.


# Prompt library

### Instructions by department

<details>

<summary>Product Management</summary>

#### Product strategy evaluator

This assistant evaluates your current solution from a product perspective, compares it to similar offerings, exposes the main shortcomings, and produces both KANO and MoSCoW prioritization.&#x20;

{% code overflow="wrap" %}

```
Follow {COMPANY} custom instructions for tone, terminology, and confidentiality.

Clarify scope first. Ask up to 3 precise questions if goals, target users, or constraints are unclear. If answers are not available, proceed with clearly tagged assumptions.

1. Build a concise product summary:

target users and primary jobs to be done

current solution overview and key flows

success metrics used today if provided

2. Run a focused market scan:

if competitor names or docs are provided, use them first

if not, request names the team considers peers

only when helpful, use web search, label findings as external, and include links

compile a short table: competitor, segment, core claim, pricing signal, notable strengths, notable weaknesses

3. Perform a gap analysis on our solution. Organize gaps by category: usability, capability, performance, integration, security and compliance, trust, pricing and packaging. For each gap add severity, evidence, and quick fix or experiment.

4. Produce KANO classification for missing or underperforming features:

categories: must-have, performance, delighter, indifferent, reverse

table columns: feature, user outcome, category, evidence source or assumption, risk if omitted

summary: what must be fixed now to avoid dissatisfaction, what can differentiate, what to avoid

5. Produce RICE prioritization for the backlog:

metrics: Reach, Impact, Confidence, Effort; compute RICE score = (Reach × Impact × Confidence) / Effort and sort descending by score

include dependency or enabling work where relevant

table columns: item, rationale, dependency, reach (units/time period), impact (standardized scale), confidence (%), effort (estimate range if available), RICE score

Do not guess facts. Keep rationales short and specific. Where data is missing, state exactly what file or field would resolve the uncertainty.

```

{% endcode %}

#### Outcome KPI setter

This assistant defines success metrics and guardrails for initiatives.

{% code overflow="wrap" %}

```
Define one north star, 3 to 5 drivers, and 2 guardrails. Provide formulas and data sources.

Output:
KPI table with owner and review cadence
risks if gamed and how to counter
sources or schema request
If data does not exist, recommend a minimal tracking plan.
```

{% endcode %}

#### Story point packer&#x20;

This assistant converts requirements into INVEST user stories with real acceptance criteria.

{% code overflow="wrap" %}

```
Instructions
From inputs given, requirement notes and any UX artifacts. help me with: 

For each story write As a, I want, so that, plus 3 to 5 acceptance criteria and edge cases.

Output a backlog grouped by epic and priority. Include dependencies where obvious.

If context is thin, ask up to 2 questions, then proceed with tagged assumptions.
```

{% endcode %}

</details>

<details>

<summary>Marketing</summary>

#### Social Media Captions Assistant

This assistant writes on-brand captions and short posts that fit platform norms, reuse past wins, and surface safe alternates.

{% code overflow="wrap" %}

```
Instructions:
Follow {COMPANY} voice and any custom instructions. Keep copy tight and scannable.
If Project files exist, mine past high performers and style guides. If not, work from the user brief.
Ask up to 2 targeted questions if goals or audience are unclear. Then proceed with clearly tagged assumptions.
When you use external trends, label them as external and include links.

Output:
Primary caption in platform limit
Two alternates with different hooks
Hashtags or keywords, optional
Notes on why it fits audience and goal
Sources: file names and locations if used
```

{% endcode %}

#### Marketing assistant 1

Project-aware marketer that answers from your files, keeps {COMPANY} voice, labels external sources, and flags missing context.

{% code overflow="wrap" %}

```
You handle all marketing queries using the materials in this Project.
Always follow the {COMPANY} custom instructions for tone and formatting. Your responses should be concise, aligned with our brand voice, and based on proven data from past campaigns.
When relevant, you may use web search to find fresh trends or examples, but clearly mark anything that comes from outside the Project.
If context is missing, say so directly and recommend what should be added.
```

{% endcode %}

#### Marketing assistant 2

Computes first-order AOV, CAC, ROAS by channel and creative, ranks winners, outputs metrics → insights → actions, cites files and dates.

{% code overflow="wrap" %}

```
You evaluate acquisition performance from this Project’s orders and ad exports. Compute first order AOV, CAC, and ROAS by channel, campaign, ad set, and creative. Rank winners and underperformers. If benchmarks are useful, pull them via web search and label as external. Output: metric table first, insights second, actions third. Cite file names and date ranges. If UTM mapping or cost data is missing, state the exact mapping or file required. No speculation. Show calculations clearly.
```

{% endcode %}

#### Marketing assistant 3

Produces a concise market view from project reports with key findings, competitor table, and risks vs opportunities, labels external news, cites pages.

{% code overflow="wrap" %}

```
You produce a short market view based on reports and notes in this Project. Start with key findings, then competitor table, then risks and opportunities. If fresh news matters, use web search, label as external, and link it. Cite report file names and page numbers where possible. If a claim cannot be verified in Project materials, say so.
```

{% endcode %}

</details>

<details>

<summary>Legal</summary>

#### DPA Readiness reviewer

This assistant checks if a draft DPA covers the critical points customers expect.

{% code overflow="wrap" %}

```
Inputs accepted: draft DPA, security overview.

Checklist sections: roles, subprocessors, transfer mechanism, security measures, breach notice, audit rights, deletion, liability, governing law.

Output:

-checklist: item, status, evidence, gap, suggested fix

- Red flag summary in 80 words
Cite section and page for each item. If a section is missing, state it plainly.
```

{% endcode %}

#### Legal assistant 1

Exact clauses plus plain-language explanation.

{% code overflow="wrap" %}

```
Answer using contracts and policies in this Project. Start with a direct answer, then quote the clause with file and location.
Explain in plain language, note exceptions. If you reference public law, label external and link.
If the contract is missing, name it and stop.
```

{% endcode %}

#### Legal assistant 2

Contract risk scan: surfaces auto-renew traps, liabilities, and SLA gaps.

{% code overflow="wrap" %}

```
Use contracts in this Project to help me determine renewal windows, auto-renew, liability caps, indemnities, SLAs, DPA terms.
Output table with Contract, Term, Location, Risk, Severity, Action.
If a needed exhibit is missing, name it. External citations must be labeled.
```

{% endcode %}

#### Legal assistant 3

Helps with policy alignment check, validates drafts against internal policy with fixes.

{% code overflow="wrap" %}

```
When asked, compare the draft in this Project to the policy docs i drop in here. Map each requirement, flag gaps, propose fixes with citations.
Output table with Requirement, Status, Evidence, Fix, Owner, Due.
If a policy is absent, state which policy file is required.
```

{% endcode %}

</details>

<details>

<summary>Creative</summary>

#### Creative brief builder

This assistant turns scattered inputs into a creative brief a team can execute.

{% code overflow="wrap" %}

```
Instructions
Parse inputs and detect objective, audience, single message, proof points, deliverables, timeline, mandatories.
Prefer internal references if available. Pull quotes or metrics with file and page.
If examples help, add two public examples labeled as external with links.
If inputs are thin, output a brief with clear placeholders and a list of missing items.

Brief Template: 
Objective
Audience and insight
Single message and tone
Proof and references
Deliverables and specs
Timeline and owners
Mandatories and constraints
Risks and open questions
```

{% endcode %}

</details>

<details>

<summary>Customer Support/Success</summary>

#### CSAT Driver Miner

This assistant mines static conversation exports to find what moves CSAT.

{% code overflow="wrap" %}

```
1.segment by channel, topic, agent, first response time, resolution time

2. compute CSAT deltas by segment

3. surface top 5 drivers, positive and negative

Output:

driver list with effect size

example snippets with ticket ids and timestamps

3 coaching themes and macros to add or edit

If key columns are missing, name them and proceed with partial analysis.
```

{% endcode %}

#### Macro librarian

This assistant upgrades the macro library so replies are faster and consistent.

{% code overflow="wrap" %}

```
Inputs accepted: existing macros, recent tickets, policy PDFs.

Build:

1. merge duplicate macros
2. add missing variants for top 5 issues
3. insert variables and guardrails

Output:

macro set with titles and bodies
mapping text to issues
gaps list with sources

If no macros exist, create a starter set based on ticket patterns.
```

{% endcode %}

</details>

### Instructions by use case

<details>

<summary>Market research</summary>

#### Market snapshot

Concise view of size, trends, players, risks.

{% code overflow="wrap" %}

```
Produce a snapshot using reports and notes in this Project. Start with key findings, then competitor table, then risks and opportunities.
If fresh news matters, search the web, label external, link.
Cite report files and pages. If a claim cannot be verified here, say so.
```

{% endcode %}

#### &#x20;Competitors

Competition moves that affect positioning, with suggested responses.

{% code overflow="wrap" %}

```
From this Project’s competitive notes, and our listed competitors, extract the main messaging in their homepages and shifts. Summarize product changes, pricing, messaging, partnerships.
Add 3 response ideas tied to our positioning. Any public items must be labeled external with links.
If a competitor file is missing, or you need more information - tell me. 
You always offer outside of the box solutions to approach our competition.
```

{% endcode %}

#### Buyer signals

Use your data to predict conversion.

{% code overflow="wrap" %}

```
Use the research and win-loss notes in this Project + my given prompt to list ICP traits and buying signals.
Rank signals by observed impact and cite evidence. Always suggest 3 or more qualification questions.
If evidence is thin, list the exact interviews or reports needed
```

{% endcode %}

</details>

<details>

<summary>Project management </summary>

#### Scope and plan

Turns a goal into a scope the team can ship.

{% code overflow="wrap" %}

```
From problem statements in files and my prompts, help to draft scope, deliverables, acceptance criteria, timeline, owners, and risks.
If you need patterns, search the web, label external, link.
List any missing inputs by file or field and stop.
```

{% endcode %}

#### &#x20;Roadmap priorities

Ranks work with a clear scoring method.

{% code overflow="wrap" %}

```
Prioritize initiatives using {RICE, WSJF or MoSCoW}.
Output table with Item, Score, Effort, Owner, Quarter, Dependencies.
If a value is missing, state the exact field needed to score.
```

{% endcode %}

</details>

<details>

<summary>Effective meetings</summary>

#### Decision-first agenda

Agendas that end in decisions, not status.

{% code overflow="wrap" %}

```
Goal: produce a decision-oriented agenda from goals in my prompts and any docs in Project.
For each item return: Decision to make, Owner, Inputs needed, Timebox, Success criteria.
If inputs are missing, list them and propose the smallest pre-read that would unblock.
Style: tight bullets. Label external links as external.
```

{% endcode %}

#### Pre-read check&#x20;

Build context that lands in under 5 minutes.

{% code overflow="wrap" %}

```
Assemble a pre-read. Sections and caps:

-summary 120 words

-key facts and metrics (max 7 bullets) with citations

-questions to resolve (max 5)

- links to sources with file and page or sheet

If Project has nothing, build the frame with placeholders and a short list of must-have inputs. External data allowed, label external.
```

{% endcode %}

#### Minutes to actions

Meeting minutes that drive follow-through.

{% code overflow="wrap" %}

```
Turn transcripts or notes into:

-decisions

-action table Owner, Task, Due, Status

-blockers and dependencies

Rules: assign tentative owners or dates only when missing and mark as tentative. Cite timestamps or pages when possible. If no notes exist, return a blank template with a 3-line guide on how to capture them next time.
```

{% endcode %}

</details>

<details>

<summary>Notes to actions </summary>

#### Notes "normalizer"

Turn chaos into a trustworthy summary.

{% code overflow="wrap" %}

```
Ingest scattered notes. Deduplicate, group by theme, keep only evidence-backed points.
Return: themes with 1-sentence insight, quotes or evidence, open questions.
Tag each item with Source file and location or Assumption. If Project is empty, build the structure from the prompt and flag evidence gaps.
```

{% endcode %}

#### Action register &#x20;

Extract accountable work across sources.

{% code overflow="wrap" %}

```
Scan notes, tickets, and docs. Output a register: Task, Context, Owner, Due, Dependency, Priority, Source.
Rules: propose defaults only when missing and mark tentative. No tasks without a clear outcome.
If owners are unknown, suggest the most likely function and why. Cite sources when available.
```

{% endcode %}

</details>

<details>

<summary>Decision support </summary>

#### Option evidence matrix

Compare options with real proof, reusable across domains.

{% code overflow="wrap" %}

```
Build a matrix: Option, Cost, Benefit, Risk, Effort, Confidence, Evidence file and location.
Recommendation: one pick with 3 reasons and conditions to accept.
If no files exist, fill the matrix with placeholders and explicitly list the smallest data set needed to finalize. External benchmarks allowed, label external.
```

{% endcode %}

#### Risk scenarios  &#x20;

Base, downside, upside that fit any decision.

{% code overflow="wrap" %}

```
Create  scenarios. Identify the two drivers that swing outcomes most.
Return: table Driver, Low, Base, High, Impact narrative 80 words.
Assume conservative values when inputs are missing and tag them. If rates or market stats are used, mark external and link. Cite internal numbers when present.
```

{% endcode %}

#### Exec one-pager

Comms with leaders get facts, asks, and timing in one shot.

{% code overflow="wrap" %}

```
Sections in order: facts and metrics, top risks, opportunities, open questions, asks with dates.
Cite internal sources inline. If none exist, produce the sections with placeholders and a checklist of the minimum data to finalize. Keep prose under 250 words total. External items must be labeled.
```

{% endcode %}

</details>


# Agent Usage

Agent Usage is a dashboard where you can see how your agents are being used and what they cost. It lists each agent with its requests, credit cost, model, and integrations, so you can tell which agents are used most, which cost the most, and which are worth the spend.

What you see depends on your role. Workspace owners see all agents in the workspace, team owners see their own and team's agents, and users see the agents they own and the shared agents they run.

Use it when you want to review agent activity, compare agents, or explain agent spend.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FYzi4nD91qZYbkqJDKF00%2Fimage.png?alt=media&amp;token=21ae36c9-a5e0-44d9-a217-2feeb00646cd" alt="" width="563"><figcaption></figcaption></figure>

### Where to find it

The path depends on your workspace role.

**For workspace owners and admins:**

{% stepper %}
{% step %}
Click the profile icon in the bottom left corner of the sidebar.
{% endstep %}

{% step %}
Select **Management**.
{% endstep %}

{% step %}
Select **Agent usage**.
{% endstep %}
{% endstepper %}

<div align="left"><figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FPvfqJXX9ucR9OOShdXnr%2Fimage.png?alt=media&amp;token=6950b85b-ba94-4be4-9987-6a71c22cfdef" alt="" width="156"><figcaption></figcaption></figure></div>

**For members and general users:**

{% stepper %}
{% step %}
Click the profile icon in the bottom left corner of the sidebar.
{% endstep %}

{% step %}
Select **Settings**.
{% endstep %}

{% step %}
Select **Agent usage.**
{% endstep %}
{% endstepper %}

### What you will find in the table

| **Column**     | **What it shows**                                                                                                                |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Agent name     | Current name of the agent                                                                                                        |
| Owner and team | Current owner and team of the agent                                                                                              |
| Current model  | Model the agent uses now                                                                                                         |
| Integrations   | Integrations the agent uses                                                                                                      |
| Type           | How the agent runs: a chat agent, which you start in a conversation, or a scheduled or event-based agent, which runs on its own. |
| Users          | Distinct users who triggered the agent in the selected period. Useful for shared agents.                                         |
| Requests       | LLM requests made during agent runs. One prompt can trigger several requests.                                                    |
| Last run       | Time of the most recent run                                                                                                      |
| Credit cost    | Credits spent based on the selected billing period for the agent                                                                 |

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FNAwDq4Ke83NmSO1Vd6od%2Fimage.png?alt=media&amp;token=81f5d9bc-cd3f-4beb-b332-bd8a88d21065" alt=""><figcaption></figcaption></figure>

### What each role sees

Access is applied by role, so you never see agents outside your scope.

| **Role**        | **What each role sees**                                                                                                                               |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Workspace owner | All agents in the workspace, with full request counts and full credit spend                                                                           |
| Team owner      | Their own agents, agents owned by team members, and agents shared with the team. Agents shared directly with an individual team member are not shown. |
| User            | Agents they own, and agents shared with them that they run                                                                                            |

### How usage is attributed

* Requests count only for the user who made them. Activity by other users on a shared agent is not counted for you.
* Credit cost is attributed to the user who triggered the run.

### Filter and sort

Filter and sort the table by:

* owner or team
* model
* integration
* status
* time period (up to 90 days)

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FbpO7ONHnbSPLmvJZEVzp%2FScreenshot%202026-10-27%20at%2011.39.32.png?alt=media&amp;token=686c54a4-2a82-4f2f-b422-e6b0fa36418a" alt="" width="563"><figcaption></figcaption></figure>

### Export to CSV

Select Download CSV to export the current view.&#x20;

### Empty and error states

* If you have no agents in your scope, the table shows an empty state.
* If data fails to load, an error message appears with a way to retry.

### Important notes

* Runs from the “Try now” tab in the agent editor are not counted.
* Name, owner, team, model, and integrations show current values, not history.
* Deleted agents are combined into one row, and their data cannot be recovered.
* Agents with no usage are not listed yet.
* Prompts, chat content, and outputs are visible only to the agent owner.

### FAQs

**Why can't I see an agent?**&#x20;

The table shows only agents in your role's scope. Team owners do not see agents shared directly with an individual team member.

**Why does a shared agent show different numbers for me and the owner?**&#x20;

Requests and credit cost are attributed to the user who triggered them. The owner's view can include activity from other users, and yours includes only your own.

**Can I see what was said in an agent's runs?**&#x20;

No. Agent usage shows cost and activity, not content.

**Why is an agent I deleted still counted?**&#x20;

Deleted agents are combined into one row so that spend stays accounted for.

**How far back can I look?**&#x20;

Up to 90 days.

<br>


# Knowledge Bases

Knowledge Bases store and manage all your documents and files in one place, so your AI can access the knowledge it needs.

### What is a Knowledge Base? <a href="#what-is-a-knowledge-base" id="what-is-a-knowledge-base"></a>

A Knowledge Base is a centralized file repository where you store documents, files, and internal knowledge. Instead of files being trapped inside individual projects, Knowledge Bases let you organize knowledge once and reuse it across multiple conversations and agents.

Once you add knowledge (document, file, etc.) to a Knowledge Base, any chat or agent can connect to it and use that knowledge as grounding context.

### Where to find it

Knowledge Bases are in the left sidebar under Workspace.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F1mqha7V2zlcjXtmbOXpG%2FScreenshot%202026-09-30%20at%2012.54.23.png?alt=media&amp;token=e86987a6-3d2f-4daf-b5be-c6db3c3da926" alt="" width="237"><figcaption></figcaption></figure>

### Create a Knowledge Base

1. In the left sidebar, select Knowledge Bases.
2. Select New knowledge base.
3. Enter a name for your Knowledge Base.
4. Select Create.

Your Knowledge Base is now ready to receive files.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FSoEgs4fPrsS9Fn1CbPXk%2Frecording_large.gif?alt=media&amp;token=b128706c-0098-42c1-8a20-ec547b354d0c" alt=""><figcaption></figcaption></figure>

#### Add files to a Knowledge Base

1. Open the Knowledge Base you want to add files to.
2. Select Add files (top-right corner).
3. Choose how to add content:
4. Upload files from your computer
5. Select the files you want to add.
6. Select Add to upload the files.

Your files are now available for AI to reference in conversations and agents.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FaTalivP2M0WWz39DS8N5%2Frecording_conversion_1304.gif?alt=media&amp;token=288da4b1-3066-41d5-8201-9e44c44b401e" alt=""><figcaption></figcaption></figure>

#### Organize files in a Knowledge Base

You can organize files within a Knowledge Base using categories or folders (if supported). This helps keep knowledge organized and makes it easier to manage large Knowledge Bases.

Common ways to organize:

* by team or department
* by topic or subject
* by document type
* by project or initiative

#### Filter and search files

You can search and filter files in a Knowledge Base to find what you need quickly.

**Search by file name**

1. Open the Knowledge Base.
2. Use the Search bar at the top.
3. Type the file name or keywords.
4. Matching files appear in the list.

**Filter by size, status, and date**

1. Open the Knowledge Base.
2. Select the Filters icon.
3. Choose your filter options:
4. Size – filter by file size (e.g., 1-10 MB, 10-50 MB, etc.)
5. Status – filter by status (e.g., Active, Archived, Processing, etc.)
6. Date – filter by upload date or modification date (e.g., Last 7 days, Last 30 days, etc.)
7. The file list updates to show only files matching your filters.

You can apply multiple filters at the same time to narrow results further.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fx5aiNfmY22VGQLO8VZlu%2FScreenshot%202026-09-30%20at%2013.06.47.png?alt=media&amp;token=d20cf743-8206-4e6b-a2bf-326326cc4a6d" alt=""><figcaption></figcaption></figure>

**Delete or replace a file from a Knowledge Base**

1. Open the Knowledge Base.
2. Find the file you want to delete or replace.
3. Hover over the file or select the three-dot menu icon.
4. Select Delete or replace.
5. Confirm the deletion or replacement.

The file is removed or replaced within the Knowledge Base. Deleted files will no longer be available to chats or agents that reference this Knowledge Base.

Note: Deleting a file may affect conversations or agents that relied on that knowledge.&#x20;

### **Connect Knowledge Bases to a Chat Group**

Once you have a Chat Group with conversations, you can connect Knowledge Bases to give all chats in the group access to that knowledge.

1. Open the Chat Group.
2. In the right panel, select Group knowledge.
3. Select + Add knowledge base.
4. Choose the Knowledge Base(s) you want to connect.
5. Select Connect.

Now every chat in this group can reference the connected Knowledge Bases automatically.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FfN1AZnc5V8OqHRhRd1YB%2Frecording_1313.gif?alt=media&amp;token=b343fb21-9329-4870-81ed-e941bae67b49" alt=""><figcaption></figcaption></figure>

### How Knowledge Bases and Chat Groups work together

#### When you connect a Knowledge Base to a Chat Group:

* All chats in the group have access to that Knowledge Base by default
* When you move a chat to a different group, it adopts the new group's Knowledge Bases
* Individual chats can still have their own attached files in addition to group-level knowledge
* You can connect unlimited Knowledge Bases to a single Chat Group

This creates a flexible knowledge inheritance system where knowledge scales across the workspace instead of being locked inside individual conversations.

* Storage limits
* Each Knowledge Base can now hold up to 500 MB of files, giving your AI enough depth to reference extensive company knowledge.
* Manage a Chat Group
* Reorder chats in a group
* Drag and drop chats within the group to reorder them.
* Rename a group
* Right-click on the group name and select Rename.
* Remove a chat from a group

Right-click on a chat and select Move to group → choose a different group or select No group to remove it.

#### Who can use Knowledge Bases?

* Individual users can create their own Knowledge Bases for personal organization
* Teams can create shared Knowledge Bases managed at the team level

### FAQ

**Can I share a Knowledge Base with my team?**\
Yes. Knowledge Bases can be shared with specific team members or made available at the team or workspace level.

**What types of files can I add to a Knowledge Base?**\
You can add documents, PDFs, markdown files, spreadsheets, and more.&#x20;

**What happens to a chat's knowledge if I move it to a different group?**\
When you move a chat to a different group, it drops the source group's Knowledge Bases and adopts the target group's Knowledge Bases. Any individual files attached to that specific chat remain.

**Can I connect multiple Knowledge Bases to a single Chat Group?**\
Yes. You can connect unlimited Knowledge Bases to a Chat Group. All chats in the group inherit access to all connected Knowledge Bases.

**What happens if I delete a Knowledge Base?**\
Deleting a Knowledge Base removes it from all Chat Groups it was connected to. Chats in those groups will no longer have access to that knowledge.

**How do I organize a large Knowledge Base?**\
You can organize files using categories, folders, or naming conventions. Choose an organization system that works for your team (by team, topic, document type, or project).

**Can an agent use a Knowledge Base?**\
Yes. When you create or edit an agent, you can connect it to specific Knowledge Bases. The agent will use those Knowledge Bases as grounding context when answering questions.


# Chat Groups

Chat Groups organize your conversations by team or topic, so your team can find conversations easily.

### What is a Chat Group? <a href="#what-is-a-chat-group" id="what-is-a-chat-group"></a>

A Chat Group is a way to organize related conversations together. Instead of a cluttered sidebar with dozens of individual chats, Chat Groups let you group conversations by team, topic, or project, making it easier to find and manage conversations.

Each Chat Group can be connected to one or more Knowledge Bases, so all conversations in the group have access to the same knowledge by default.

### Where to find it?

Chat Groups are in the left sidebar under Workspace.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FCUhcDTpaP0euwFxkJxzZ%2Fimage.png?alt=media&amp;token=c1e499ce-60bd-4109-866a-aa0a695289dc" alt="" width="241"><figcaption></figcaption></figure>

### Create a Chat Group <a href="#create-a-chat-group" id="create-a-chat-group"></a>

1. In the left sidebar, select Chat Groups.
2. Select + New group or the + icon.
3. Name your group (e.g., "Marketing Team", "Product Updates", "Client Research").
4. Select Create.

Your Chat Group is now ready for conversations.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FONEnsfPeWKyOBithEdH2%2Fimage.gif?alt=media&amp;token=e4a39961-1171-4c84-aa9e-3aa3ab64a933" alt=""><figcaption></figcaption></figure>

### **Add chats to a Chat Group**

**You can add chats to a Chat Group in two ways:**

**Method 1: Move an existing chat**

1. Right-click on a chat in the sidebar.
2. Select Move to group.
3. Choose the Chat Group you want to move it to.
4. The chat now belongs to that group.

**Method 2: Create a new chat in a group**

1. Open the Chat Group.
2. Select Start a new chat.
3. Have your conversation. The chat automatically belongs to this group.

### **Connect Knowledge Bases to a Chat Group**

Once you have a Chat Group with conversations, you can connect Knowledge Bases to give all chats in the group access to that knowledge.

1. Open the Chat Group.
2. In the right panel, select Group knowledge.
3. Select + Add knowledge base.
4. Choose the Knowledge Base(s) you want to connect.
5. Select Connect.

Now every chat in this group can reference the connected Knowledge Bases automatically.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FVIjl6k0ptJSwtmWgMlno%2Fimage.webp?alt=media&amp;token=e4fb5e90-674c-4a75-a93d-af07feea3d6f" alt=""><figcaption></figcaption></figure>

### How Knowledge Bases and Chat Groups work together <a href="#how-knowledge-bases-and-chat-groups-work-together" id="how-knowledge-bases-and-chat-groups-work-together"></a>

**When you connect a Knowledge Base to a Chat Group:**

* All chats in the group have access to that Knowledge Base by default
* When you move a chat to a different group, it adopts the new group's Knowledge Bases
* Individual chats can still have their own attached files in addition to group-level knowledge
* You can connect unlimited Knowledge Bases to a single Chat Group

This creates a flexible knowledge inheritance system where knowledge scales across the workspace instead of being locked inside individual conversations.

* Storage limits
* Each Knowledge Base can now hold up to 500 MB of files, giving your AI enough depth to reference extensive company knowledge.
* Manage a Chat Group
* Reorder chats in a group
* Drag and drop chats within the group to reorder them.
* Rename a group
* Right-click on the group name and select Rename.
* Remove a chat from a group

Right-click on a chat and select Move to group → choose a different group or select No group to remove it.

### **Who can use Knowledge Bases and Chat Groups?**

Individual users can create Chat Groups for personal organization

### FAQ <a href="#faq" id="faq"></a>

**Can a chat belong to multiple groups?** No. Each chat belongs to one Chat Group. If you move a chat to a different group, it leaves the original group and joins the new one.

**What happens to a chat's knowledge if I move it to a different group?** When you move a chat to a different group, it drops the source group's Knowledge Bases and adopts the target group's Knowledge Bases. Any individual files attached to that specific chat remain.

**Can I connect multiple Knowledge Bases to a single Chat Group?** Yes. You can connect unlimited Knowledge Bases to a Chat Group. All chats in the group inherit access to all connected Knowledge Bases.


# Troubleshooting

| Issue                                                     | Troubleshooting                                                                                                                                                           |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Some models I'd like to use are missing.                  | <p>Contact your workspace admin. <br>Depending on organization, your admin customizes the list of models the company uses. </p>                                           |
| Models are giving outdated information.                   | Some models have knowledge cut off at a specific date (not controlled by nexos.ai). We recommend enriching the input command with "web search" or choosing a newer model. |
| I get "Model unavailable. Please try again later." error. | In most cases - downtime from service providers, in this case we recommend switching models and coming back later.                                                        |
| File does not upload. I get an error.                     | Although we support nearly all file types, some files, like TIFF, may not be supported.                                                                                   |


# Settings

<table data-view="cards"><thead><tr><th align="center"></th><th align="center"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><strong>User settings</strong></td><td align="center">Manage your account, integrations, and preferences.</td><td><a href="/workspace/settings/user-settings">User Settings</a></td></tr><tr><td align="center"><strong>Organization</strong></td><td align="center">Allows you to set budget, choose models, manage teams. </td><td><a href="broken://pages/8bphb9SAafbJQgmrsa9M">Broken link</a></td></tr><tr><td align="center"><strong>Observability</strong></td><td align="center">Includes detailed metrics and logs across organization. </td><td><a href="/workspace/settings/observability">Observability</a></td></tr></tbody></table>


# User Settings

User settings let you manage your personal workspace experience, like account security, integrations, and preferences. Select an option below to open its page and learn what it does and how to use it.

<table data-view="cards"><thead><tr><th data-type="content-ref"></th><th data-hidden data-type="content-ref"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/workspace/settings/user-settings/preferences">Preferences</a></td><td><a href="/workspace/settings/user-settings/preferences">Preferences</a></td><td><a href="/workspace/settings/user-settings/preferences">Preferences</a></td></tr><tr><td><a href="/workspace/settings/user-settings/account">Account</a></td><td></td><td><a href="/workspace/settings/user-settings/account">Account</a></td></tr><tr><td><a href="/workspace/settings/user-settings/my-apps">My Apps</a></td><td></td><td><a href="/workspace/settings/user-settings/my-integrations">My Integrations</a></td></tr><tr><td><a href="/workspace/settings/user-settings/my-integrations">My Integrations</a></td><td></td><td><a href="/workspace/chat/memory-and-personalization">Memory and Personalization</a></td></tr><tr><td><a href="/workspace/chat/memory-and-personalization">Memory and Personalization</a></td><td></td><td></td></tr></tbody></table>


# Preferences

Use Preferences to personalize how nexos.ai looks and behaves for your account.

### **How to access**

1\. Open Settings from the left sidebar by clicking on your email.

2\. Select Preferences.

### **App Preferences**

These settings affect your experience across the app:

#### **Theme**

Choose how the interface is displayed:

* System: Match your device appearance setting.
* Light: Always use a light theme.
* Dark: Always use a dark theme.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fz1uR0s2aAIKM3E6adMRX%2FPreferences%20.gif?alt=media&amp;token=bb9c059f-7ef1-4ba8-8211-e47adaacf819" alt=""><figcaption></figcaption></figure>

#### **Auto expand reasoning**

Turn this on to automatically expand reasoning details (where available), so you see more context without extra clicks.

#### **Management onboarding tasks**

Use **Restart** to reset the management onboarding tasks checklist (helpful if you want to go through setup again).

#### **Cookie preferences**

Select **Edit** to review and update cookie choices for this app in your browser.

### Note

Some changes apply immediately. If you do not see an update, refresh the page or sign out and back in.

<br>


# nexos.ai Account

Explore your nexos.ai account settings to better understand your preferences, or to change your password and security options.

The nexos.ai Account page lets you manage your personal details and basic sign-in security options.

## Open nexos.ai Account settings

* From the workspace, select your email/profile at the bottom of the left sidebar.
* Select Settings.
* Select Account.
* If the left sidebar is collapsed, expand it first so you can see your email/profile.

## User preferences

Use this section to review your account email and choose whether you want to receive product news.

### Email address

Shows the email currently associated with your nexos.ai user. This field may be read-only depending on how your workspace is managed (for example, SSO-managed accounts).

### Receive email notifications

* Turn this on to receive emails about new features, platform updates, and tips.
* Turn this off to stop product emails. Important service or security emails may still be sent.
* The **Privacy Policy** link explains how email preferences and related data are handled.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FlJEHsxTiUZ8TiaFbeT5V%2FAccount%201.gif?alt=media&amp;token=f248013b-dd34-43e8-925f-2c493d396281" alt="Changing the option to receive email notifications." width="375"><figcaption></figcaption></figure>

## Password and security

This section is for managing your password and sign-in methods. For security, you may be asked to verify your identity before you can view or change these settings.

### Verify identity

If you see “**Verification required**”, select Verify Identity and complete the on-screen check. Once verified, the password and sign-in options become available.

### Security

Use the security section to keep your account protected:

* Change password: Set a new password and save your changes.
* Linked sign-in methods: Connect or disconnect SSO providers (availability depends on your workspace).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fv6qzGllZEJWYXSGyAoRR%2FAccount%202.png?alt=media&amp;token=18b81352-b738-4b6a-9aba-8adec7b8533b" alt="Showing the menu where you can enable SSO or change your password." width="375"><figcaption></figcaption></figure>

## Troubleshooting

* Can’t change your email address: Your organization may control it through your identity provider (SSO).
* Verify Identity doesn’t work: Try signing out and back in, then retry. If it still fails, contact your workspace admin.
* Not receiving notifications: Check your email notifications toggle and your inbox spam/junk folder.

## Tips

* If you do not see your email/profile at the bottom of the left sidebar, expand the sidebar first.
* If you change your sign-in method (password or SSO), make sure you can still access the email address associated with your account.


# My Apps

Connect nexos.ai to your favorite messaging app via "My Apps".

My Apps lets you use nexos.ai from Slack, Microsoft Teams, Telegram, and WhatsApp. In this guide, you'll find where to locate My apps in Settings, and step-by-step instructions for connecting these apps.

## Access nexos.ai directly from Slack, MS Teams, Telegram, and WhatsApp

[Messaging apps](https://nexos.ai/features/messaging-apps/) let you use nexos.ai directly from the tools your team already communicates in, so you can ask questions, get answers, and get work done without switching back to the workspace.

You can find available messaging apps in **Settings → My apps**. In the **My Apps** section, you’ll see the apps currently available, such as **Slack, MS Teams, Telegram,** and **WhatsApp**.

{% stepper %}
{% step %}

## How to find it

1. Open **Settings** from the left sidebar.
2. Select **My apps**.
3. In the **My apps** section, choose the app you want to use.
4. Select **Try it** (or the available action) to connect the app and start using nexos.ai.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FMFogiNy7GwJh29Lg6w53%2FScreenRecording2026-06-11at16.43.13-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=20da3507-acb9-4270-8875-d4b2a3e0a151" alt="Navigating to &#x22;My Apps&#x22; in your nexos.ai account." width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## Slack

Slack lets you use nexos.ai directly in your workspace, so you can ask questions, get answers, complete tasks, and take action without leaving Slack. For example, nexos.ai can create Jira tickets, draft emails, and deliver results back in the conversation

### How to connect Slack

1. Go to **Settings → My apps**.
2. In **My apps**, find **Slack** and select **Try it**.
3. Add the **nexos.ai** app to your Slack workspace.
4. In Slack, go to **More → Tools → Apps**.
5. Open the **nexos.ai** app.
6. Send a message to start the authorization flow.
7. Follow the prompts to connect your Slack account.
8. After authorization is complete, send your first message.

Once connected, nexos.ai will appear in your Slack apps and can be pinned for easier access.

<a href="https://comms.nexos.ai/slack/install" class="button primary">Connect Slack</a>
{% endstep %}

{% step %}

## Microsoft Teams

WhatsApp lets you use nexos.ai from your phone in a familiar chat experience. You can message nexos.ai directly, send voice notes, and continue work while away from your computer.

### How to connect MS Teams

**Option 1 — via nexos.ai Workspace**

1. Go to **Settings → My apps**.
2. In **My apps**, find **MS Teams** and select **Try it**.
3. You'll be redirected to the app listing on [Microsoft Marketplace](https://marketplace.microsoft.com/en-us/product/WA200011540)
4. Click Get it now to install

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FZjJYdutYkMEBCEfcezpO%2Fimage.png?alt=media&amp;token=b604527a-33b2-4e08-8307-956c8d8df5de" alt="Connecting nexos.ai to MS teams via nexos.ai workspace."><figcaption></figcaption></figure>

**Option 2 — directly in Microsoft Teams**

1. Open Apps in Teams
2. Search for **nexos.ai**
3. Open the nexos.ai app and click Add.
4. **nexos.ai** is ready to use in your chats

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FumpuieJ3u934YrBfsEVa%2Fimage.png?alt=media&amp;token=9d28708b-eee4-404b-9b22-a0cd89d3264a" alt="Connecting nexos.ai to MS teams directly via MS teams."><figcaption></figcaption></figure>

<a href="https://marketplace.microsoft.com/en-us/product/WA200011540" class="button primary">Connect MS Teams</a>
{% endstep %}

{% step %}

## Telegram

Telegram lets you use nexos.ai directly in your conversations, so you can ask questions, get answers directly and complete tasks without leaving Telegram.

### How to connect Telegram

1. Go to **Settings → My apps**.
2. In **My apps**, find **Telegram** and select **Try it**.
3. Open Telegram and search for **nexos.ai**.
4. Open the chat and send **/start**.
5. Send **/auth**.
6. Complete the authorization process to connect your Telegram account with your nexos.ai account.
7. Once connected, send your first prompt.

<a href="https://t.me/ai_nexos_bot" class="button primary">Connect Telegram</a>
{% endstep %}

{% step %}

## WhatsApp

WhatsApp lets you use nexos.ai from your phone in a familiar chat experience. You can message nexos.ai directly, send voice notes, and continue work while away from your computer.

### How to connect WhatsApp

1. Go to **Settings → My apps**.
2. In **My apps**, find **WhatsApp** and select **Try it**.
3. Open WhatsApp. A chat with nexos.ai will open automatically.
4. Send `/start`.
5. Then send `/auth` and follow the instructions to connect your account.
6. Once connected, start chatting with nexos.ai the same way you would message a colleague.&#x20;

<a href="https://wa.me/13855781441" class="button primary">Connect Whatsapp</a>
{% endstep %}
{% endstepper %}

## Check our video on how to connect your messaging apps to nexos.ai

{% embed url="<https://www.youtube.com/watch?feature=youtu.be&v=VANfdLVAPEY>" %}

## Notes

* Available messaging apps depend on what is enabled in your workspace.
* Some apps require authorization the first time you use them.
* Messaging apps are managed from **My apps**, where you can view and connect the apps available to you.
* Some capabilities may depend on your connected integrations and permissions in nexos.ai.

{% hint style="info" %}
An active nexos.ai subscription is required to use nexos.ai in supported messaging apps.
{% endhint %}


# My Integrations

Use the **My Integrations** page to connect third‑party tools to your nexos.ai workspace. Connected integrations can be used in supported workflows across the product.

### Open My integrations

1. In the workspace, select your email/profile at the bottom of the left sidebar.
2. Select Settings.
3. In the Settings menu, select My Integrations.

### What you can do here

* Find an integration you want to use.
* Connect an integration by signing in to the provider and approving access.
* Disconnect an integration to stop using that connection in this workspace.
* Reconnect an integration if permissions change or the connection expires.

### Find the right integration

Use the tools at the top of the list to quickly narrow down results:

* Search integrations to find an integration by name.
* Category to filter by integration type.
* Status to filter by connection state.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F5qgIq6KSmNB1M7PqiOoU%2FMy%20integrations%201.gif?alt=media&amp;token=c93080ea-67f0-47d3-8087-905070c92813" alt=""><figcaption></figcaption></figure>

### Connect or manage an integration

Select an integration in the list to open its details. From there you can typically connect it, disconnect it, or update its configuration (the available actions depend on the integration).

**Connect an integration**

1. On My Integrations, find the integration you want to connect.
2. Select Connect.
3. Follow the provider’s sign‑in and authorization steps.
4. Return to nexos.ai and confirm the integration shows as connected.

**Tip:** If you have multiple accounts with the provider, make sure you sign in to the correct one before approving access.

### Disconnect an integration

1. On My Integrations, open the integration you previously connected.
2. Select Disconnect.
3. Confirm the disconnection when prompted.

Disconnecting removes the active connection for this workspace. It does not delete your account with the provider.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FGI7b6769GdaNYPRMF2bm%2FMy%20integrations%202.gif?alt=media&amp;token=4a9b9f27-bde8-48ba-9e5d-b59ace1a74fa" alt="" width="375"><figcaption></figcaption></figure>

### Permissions and approvals

* Some integrations may require workspace or organization admin approval (depending on your organization’s policies).
* You may also need the right permissions in the third‑party tool to authorize the connection.
* If you can’t connect, check whether your organization restricts integrations or specific providers.

### Troubleshooting

**Connection fails after signing in**

Try reconnecting. If the provider prompts for permissions, approve access and complete the flow in the same browser window.

**Integration shows connected but doesn’t work**

Permissions may have changed or the connection may have expired. Disconnect and reconnect to refresh access.

**You connected the wrong provider account**

Disconnect, sign out of the provider in your browser, then connect again using the correct account.

<br>


# Organization

Access management to control organization settings, budget monitoring, and model configuration.

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Guardrails</td><td><a href="broken://pages/vpWxAPRXo9uieEfI0Hw8">Broken link</a></td></tr><tr><td>Models</td><td><a href="/workspace/settings/organization/models">Models</a></td></tr><tr><td>API credits add-on</td><td><a href="/workspace/settings/organization/billing/api-credits-add-on">API credits add-on</a></td></tr><tr><td>Teams</td><td><a href="/workspace/settings/organization/teams">Teams</a></td></tr><tr><td>Users</td><td><a href="/workspace/settings/organization/users">Users</a></td></tr><tr><td>Billing</td><td><a href="/workspace/settings/organization/billing">Billing</a></td></tr></tbody></table>


# Roles and permissions

Roles define what users can access and manage within your organization. Each role comes with different permissions, from managing the entire organization to accessing specific teams and features.

### Owner&#x20;

Has full access to the organization and can manage company-wide settings, users, teams, models, apps, billing, and other organization-level configurations.

### Team Owner

Manages their assigned team and the users within it. Team Owners can choose which models are available to their team, overriding the company-wide model settings for that team. Apps remain managed at the company level.

### User&#x20;

Has access to the models, apps, and other resources made available to them through their organization and team. Users cannot manage organization- or team-level settings.


# Models

### Models

{% stepper %}
{% step %}

### Pick your model

Click "add a model" to start setting up&#x20;
{% endstep %}

{% step %}

### Model configurations

Select the model you want to work with (have guardrails, trusted badge, etc), and give it a name.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FOgSA2rmklTt5Dx0T3nc1%2FModels.gif?alt=media&amp;token=d456a998-c408-437a-a1c2-ecc94fc9cd33" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Set timeouts

In short - how long should the model try before giving up.&#x20;

{% hint style="info" %}
**Timeout** - milliseconds for model to timeout with no stream functionality. If field is left empty, default will be used. Default is 60 000ms.\
**Stream timeout** - milliseconds for model to timeout with stream functionality. If field is left empty, default will be used. Default is 300 000ms.
{% endhint %}
{% endstep %}

{% step %}

### Fallback models

Add backup models in order of preference. If your main model fails, it automatically switches to the next best option.
{% endstep %}

{% step %}

### Trusted models

These are organization-wide approved models that follow your company's policies.

As an admin, you have the power to showcase which models are the safest to use with sensitive information.&#x20;
{% endstep %}

{% step %}

### Save and add more models

Repeat the process with all needed models, and edit or delete them anytime from "models" tab.&#x20;
{% endstep %}
{% endstepper %}


# Teams

Teams help you organize people inside your nexos.ai workspace so you can manage access and settings more easily across groups.

Use teams to keep administration tidy as your workspace grows, and to make it easier to apply organization-level decisions to the right set of users.

## How to use it

{% stepper %}
{% step %}

### Open Teams settings

* In the left sidebar, select your email/profile at the bottom, then select Settings.
* Go to Organization, then open Teams.

{% hint style="info" %}
You may need an organization admin role to manage teams.
{% endhint %}
{% endstep %}

{% step %}

### Create a team

* Select Create team (or Add team).
* Enter a team name that matches how your organization works (for example, Marketing, Support, or Platform).
* Save your changes.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F7nr8vApnapc7rG4qLaxJ%2FTeams%201.gif?alt=media&amp;token=f3d37396-462c-45e6-87c6-3121d11f3732" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Keep names consistent so teams are easy to scan and reuse across your organization.
{% endhint %}
{% endstep %}

{% step %}

### Add or remove members

* Open the team you want to manage.
* Add members by selecting users from your organization.
* Remove members by selecting Remove next to their name.
* Save your changes if prompted.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FF4Nt2cxk8yXKjqhFqQDT%2FTeams2.gif?alt=media&amp;token=4c868124-8d2a-4475-ba54-fd5364ed3b24" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Edit a team

* Open the team.
* Edit the team details (for example, the team name or set a default model).
* Save your changes.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FSRmPSUG32EazkXllvsbg%2Fteam3.gif?alt=media&amp;token=e48ed41a-5712-49a7-9f4b-d8ce1c7ab010" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Enable or disable models for the team**

In the team details window, you can turn specific models on or off to control which models team members can use.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FaZBMQg4snIvVwciyaW7f%2Fimage.png?alt=media&amp;token=c7409122-40fb-4648-b161-5137859398dd" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Create team API keys**

You can create API keys that are tied to the team, which is useful for team-level access in scripts and services. For step-by-step instructions, see the **API Keys** page [here](broken://pages/MBHmOZutK6AsQNxE3tkS).
{% endstep %}

{% step %}

### Delete a team

* Open the team you want to delete.
* Select Delete team.
* Confirm the deletion.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FUsqP4d3BSWSGHaq3Dz0w%2Fteams4.gif?alt=media&amp;token=ff713634-3d46-4bcf-aa4f-24c0d987fb3d" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## When to use it

Use Teams when you want to keep access management organized across groups (for example, departments, regions, or project squads).

Teams are especially useful when your organization is growing and you need repeatable structure instead of one-off user-by-user changes.


# Users

Users is where organization admins manage who can access your nexos.ai workspace. From here, you can invite people, update access, and remove users who no longer need access.

At the top of the Users page, you can see the total number of users in your organization and how many seats are still available. You can also use the search bar and filters (such as Teams, Role, and Status) to quickly narrow down the list and find specific users faster.

## How to use it

{% stepper %}
{% step %}

### Open Users

Open Settings, then go to Organization > Users.
{% endstep %}

{% step %}

### Invite users

On the Users page, select Invite users.

Enter one or more email addresses, then send the invite.

If your organization uses teams or roles, choose the correct access options before sending.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F41sRsrrdysT9PGYPbAre%2FUsers1.gif?alt=media&amp;token=46bc615d-22a4-47c4-8fad-e788a7e12a5a" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Update a user’s access

Find the user you want to update.

Select the user’s **Role** or **Team** next to their name, then choose the new value from the menu that opens.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FGBZB0XZ8vdiKINcPvKss%2Fusers2.gif?alt=media&amp;token=ae065d38-6bf1-4b98-a716-eb38997afa67" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Remove a user

Find the user you want to remove.

Open the user actions menu and select Remove.

Confirm to revoke access to your organization.
{% endstep %}
{% endstepper %}

Use Users when you are onboarding teammates, changing responsibilities, or offboarding people who should no longer have access.


# Workspace credit management

## Workspace credits management

[nexos.ai](http://nexos.ai) uses credits to track AI usage across your workspace and give owners a clear way to manage consumption across the team. Owners can review usage, set limits, and control how members access org shared credits from Settings → Workspace Credit Management.

### What is a credit?

A credit is the unit nexos.ai uses to measure and pay for model usage across every provider in the workspace. One credit represents the same amount of value whether a request is routed to OpenAI, Anthropic, Mistral, Kimi K3 or any other supported model, so credits give owners and members one consistent way to track usage instead of comparing separate provider-specific pricing.

***

### How workspace credits work

Your workspace uses two types of credits:

1. Seat credits, included with each member's seat.
2. Org credits pool, drawn from company-wide pool

#### Seat credits

Seat credits are included with each member’s seat and refresh at the start of each billing period. If they are not used during that period, they do not carry over.

<table data-header-hidden><thead><tr><th width="177.015625"></th><th></th></tr></thead><tbody><tr><td><strong>Included with</strong></td><td>Every member seat</td></tr><tr><td><strong>Renewal</strong></td><td>Start of every billing period</td></tr><tr><td><strong>Carry over</strong></td><td>No – unused seat credits expire at renewal</td></tr></tbody></table>

#### Organization credits pool (shared credits)

Org credits come from one company-wide shared pool. Members use seat credits first. Once those are exhausted, they can draw from the org credits pool up to their assigned usage limit. Organization admins control access by setting per-member limits.

<table data-header-hidden><thead><tr><th width="169.14453125"></th><th></th></tr></thead><tbody><tr><td><strong>Shared across</strong></td><td>Entire organization</td></tr><tr><td><strong>Used when</strong></td><td>A member has no seat credits remaining</td></tr><tr><td><strong>Carry over</strong></td><td>Yes – unused credits remain in the company's shared pool for future billing periods.</td></tr></tbody></table>

***

### Workspace Credit Management dashboard

Owners manage workspace credits from Settings → Workspace Credit Management. The dashboard displays the current billing period, three summary cards, and a per-member usage table. It also shows when the next renewal occurs and when seat credits and org credits limits reset.

#### Member limits and usage table

The Member limits and usage table lets owners monitor credit usage and manage org credits limit for individual workspace members. Owners can search for members, filter by team, select multiple members to update their limits in bulk, or configure a custom limit for an individual member from the menu.

#### How org credits limits work

* Limits don't reserve credits. Members draw from the org credits pool only after they exhaust their seat credits, and only up to their assigned org credit limit. Credits leave the pool only when they're actually used.
* When the org credits pool is empty, shared credit usage stops for everyone, regardless of individual limits.
* Per-member custom limits override the org credits limiy. Any manual per-member limit takes precedence and stays in place even when the org credits limit is later updated.

***

### What owners can do

#### Set an org credits limit

The org credits limit is a limit applied to every member who doesn't have a custom limit. When you set it, it applies to:

* Current members without a custom limit.
* New members who join the workspace.
* Automatic updates – updating the Org credits limit automatically updates all members using the default limit.

#### Set a per-member org credit limit

A custom limit overrides the org credit limit for that member. Once set, future changes to the org credit limit no longer affect them.

#### Bulk-edit limits across members

Owners can select multiple members from the table - including across filtered lists spanning multiple pages - and set an org credit limit for the whole selection in one pass, instead of editing rows one at a time.

#### Lower a member's limit

If you lower a member's limit below the amount of org credits they've already used during the current billing period, they immediately lose access to new AI requests and enter read-only mode for the rest of the billing period.

<br>

***

<details>

<summary>FAQ</summary>

**What's the difference between a limit and an allocation?**

A limit is a spending cap on org credits pool. An allocation would set aside credits just for one member. nexos.ai uses limits, so nothing leaves the pool and nothing is charged until the member actually spends.

**Can the total of member limits exceed the org credits pool available?**

Yes. Limits are ceilings, not reservations, so assigned limits can exceed the purchased org credits pool. When the pool empties, org credits usage stops.

**What happens to unused seat credits at the end of the billing period?**

They don't carry over. Seat credits refresh at the start of the next billing period.

**How does the org credits limit interact with per-member custom limits?**

The org credits limit applies to every member without a manual override, including new members who join later. Once an owner sets a custom limit for a specific member, that member is treated as an override and stops being affected by future changes to the org credits limit.

**What happens if I lower a member's custom limit below what they've already used this period?**

The member is cut off immediately and moved to read-only mode for the rest of the billing period – they can view existing content but can't send new requests. A confirmation dialog appears before the change is saved.

**How do we get more org credits?**

Org credits are purchased through nexos.ai sales. Contact your account manager to top up the pool.

</details>


# Workspace Billing

Learn how nexos.ai workspace billing works. View your current plan, track seat usage, manage team access, and compare available subscription options.

The Billing page gives you a complete view of your workspace’s subscription plan, seat usage, and available plan options. From here you can confirm what plan you’re on, understand how many seats are in use, access user management to update who has access, and compare plans if you ever need to change your subscription.

## Current plan

At the top of the page, you’ll see your current plan (for example, 1-month plan, 12-month plan, or Enterprise). This is the fastest way to confirm your subscription tier and current billing status.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FRRPD6whjx1Ck2oWr2Qha%2Fimage.png?alt=media&amp;token=b8298d20-5b42-48aa-be41-a1e415f5f1b2" alt="nexos.ai billing page showing 12-month plan overview with yearly seats and API credit options." width="563"><figcaption></figcaption></figure>

## If you're on a paid plan

Once your workspace is on a paid plan, the Billing page shows your active plan and available billing options. You can review seat usage and manage access for your team through user management.

### Overview

The Overview section shows your seat allocation and usage:

* **Monthly seats** — displays the number of seats currently occupied out of your total allowance (for example, 8/10).
* **Seats remaining** — the number of unused seats still available to assign.
* **Usage percentage** — a progress bar and percentage label (e.g., 51% of seats used) so you can quickly gauge how close you are to your limit.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F426S1uiRjsGe2AK9Flfy%2FScreenshot%202026-04-08%20at%2011.55.47.png?alt=media&amp;token=bdc3b97a-0b53-42ce-9d11-589fb722874d" alt="nexos.ai billing overview showing monthly seats usage." width="563"><figcaption></figcaption></figure>

On the right side of this section, select Manage users to go directly to user management, where you can add or remove users and adjust your seat count.

Select **Manage users** to go to user management, where you can manage seats by updating users:

* **Add users** (uses a seat)
* **Remove users** (frees a seat)
* **Change role** by selecting the user’s role next to their name and choosing a new value
* **Change team** by selecting the team next to their name and choosing a new value
* **Filter users** by **team**, **role**, and **status** to find people faster

## Billing options

The Billing options section lets you compare the available subscription plans.

* **Plan cards** — Plan cards are displayed side by side and summarize what’s included in each available plan. If your workspace is already on a given plan, that plan’s card shows Current plan. Plans that cannot be selected from your current workspace may show Not available.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FlqpDUcpIV8rNcpx6Ben2%2Fimage.png?alt=media&amp;token=ca4acacf-e506-4215-b1f8-1fc01d0e6192" alt="nexos.ai billing options comparing 1-month, 12-month, and Enterprise custom plans with pricing and features." width="563"><figcaption></figcaption></figure>

## Who can access this page

The Billing page is available at the organization/workspace level and is typically restricted to **Workspace Owners**.

<br>


# Workspace API credits add-on

Prepay for API usage with nexos.ai API credits. See pricing, how to purchase and track your balance, and how to generate or rotate your API key.

API credits let you prepay for API usage in nexos.ai. Your API requests will work as long as you have [nexos.ai credits](https://nexos.ai/blog/nexos-ai-credits/) in your balance.

## Before you start

To use the API, you need to meet these requirements:

* To use the API, you must be on a paid plan and have API credits available in your balance.&#x20;
* API credits are purchased separately.

## How pricing works

* API credits are prepaid.
* 1€ = 1 credit.
* There are no hard limits. Usage continues until your credit balance reaches zero.

## How to purchase API credits

{% stepper %}
{% step %}

### Open Billing

Go to your workspace Billing area.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FbNQdSHi7payUyxBtqpOt%2FScreenshot%202026-02-26%20at%2015.37.22.png?alt=media&amp;token=690c97c8-d261-473f-b7fb-7eb957bb6270" alt="nexos.ai billing page showing Pro plan overview, monthly seats, API add-on credits, and plan comparison options."><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Choose “Purchase API credits”

In Billing, find the “API add-on & credits” section and select the option to purchase credits.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FF4IbCPhe9V5MXrBoPd2q%2F5-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=72bd13e0-3827-47a0-ad28-71bbc5f65c7a" alt="Purchase API add-on and credits modal with preset amounts and custom credit input field."><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Select how many credits to buy

Choose the number of credits you want to purchase. The total cost will match the number of credits (1€ per credit).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FjB2KkW9POcMRtVEDDtb5%2F3-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=3101a4f0-baa7-416a-b29c-a87f2d4d99be" alt="Purchase API add-on and credits modal with amount of money selected and Continue to checkout button." width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Complete payment

Follow the checkout steps to complete your purchase.
{% endstep %}

{% step %}

### Confirm your updated balance

After payment, your API credit balance will be updated in Billing, and you will be able to see your remaining balance there.

The API works as long as your balance has credits.&#x20;

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FOGtQ1CJq8BF6iMM4nAK2%2FScreenshot%202026-02-27%20at%2015.43.52.png?alt=media&amp;token=d2b8061a-bfd2-410f-ac46-9efa6fee625a" alt="nexos.ai billing overview with API add-on and credits section highlighted, showing 14.7 credits remaining." width="563"><figcaption></figcaption></figure>

{% endstep %}
{% endstepper %}

## How to generate your API key

You need an API key to make API requests from your own tool or app.

{% stepper %}
{% step %}

### Create your API key

Open **Settings**, then go to the **API Keys** sections.
{% endstep %}

{% step %}

### Generate a key

Click **Generate API key**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FNOog5NUMVqMIqJCIYLVd%2F2.png?alt=media&amp;token=1129d68f-5400-4e2c-8ee6-41ba3c12dbfd" alt="nexos.ai Settings API Keys tab with Generate API Key dialog and empty name field."><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Name the key and generate

Enter a name so you can recognize it later (for example, “Production” or “My app”), then click **Generate**.
{% endstep %}

{% step %}

### Save your API Key

After you click **Generate**, a pop up will appear showing your API key. Copy it and save it somewhere secure right away. You will not be able to see the full key again after you close the pop up.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F2uzmJq42cM5IpBLmwLBZ%2FScreenshot%202026-02-27%20at%2014.01.17.png?alt=media&amp;token=af7906f0-2423-41f4-a961-8d4a82b72c6a" alt="Generate API Key dialog showing newly created Production API key with copy and view options."><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Rotate API key

If you think your API key was shared by mistake, or you just want to replace it for security reasons, you can **rotate** the key. Rotating means the old key will stop working and a new key will be created in its place.

To rotate a key, go to the **API Keys** tab in Settings, find the key you want to change, and choose **Rotate**. A confirmation window will appear explaining that the current key will be permanently disabled and replaced with a new one.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FIpaLERkrHlnSkzBUOgKG%2F1-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=9c3ad776-3099-4e94-8dd2-42db9358b035" alt="Rotate API Key dialog showing masked new key value with Close button."><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

## FAQs

### 1. Do I get API access as soon as I’m on a paid plan?

Not yet. You must separately purchase API credits before the API works.

### 2. What happens when I run out of credits?

API usage stops when your balance reaches zero. Add more credits to continue.

### 3. **Can I see my full API key again later?**

No. For security, the full key is only shown once when you generate it. Make sure you copy and save it.

### 4. **What should I do if I think my API key is leaked?**

Rotate the key right away, then update any apps or scripts to use the new key.

### 5. **Will rotating an API key break my integrations?**

Yes, anything using the old key will stop working until you replace it with the new one.

### 6. **Can I have more than one API key?**

If your workspace supports multiple keys, you can create separate keys for different tools (for example, one for production and one for testing).

## Tips

* If you plan to run large jobs, purchase enough credits to avoid interruptions.
* Keep an eye on your credit balance in Billing so your API workflows do not stop unexpectedly.


# nexos.ai

Discover how to use nexos.ai observability to monitor model performance, track costs, and review detailed API call logs for troubleshooting and auditing.

nexos.ai Observability provides visibility into AI model usage across the organization. Metrics display performance and cost data, while Logs record details of individual API requests.

## Metrics

The Metrics dashboard gives you a real-time view of how your AI models are performing. Think of it as your control center for understanding usage patterns, costs, and system health.\
\
Filter by date, users, teams, etc. For exports or deeper analysis, contact us.

## Logs

**See every API call in detail.** The logs show you exactly what happened with each request - which model was used, how long it took, what it cost, and whether it succeeded or failed.

**Filter by time, model, user, or team** to find what you're looking for. Each log entry shows the full request details, response times, token usage, and any errors.

**Use this to troubleshoot issues, track usage patterns, or audit who's using what.** You can drill down into specific calls to see the exact messages and responses.

{% hint style="info" %}
Currently, logs are retained and available for the last 7 days only.
{% endhint %}

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F7QXZTibVqgDzKsjAMGUJ%2Fimage.png?alt=media&amp;token=e3e3d37a-1d80-41d4-bf58-63c774f112d2" alt="nexos.ai logs dashboard showing completion requests with model, cost, and duration columns."><figcaption></figcaption></figure>


# Workspace Integrations

Connect nexos.ai with external tools to streamline workflows and access knowledge bases directly.

The **Workspace Integrations** page is where you connect third‑party tools to your team’s workflow. It brings your external systems into nexos.ai so your team or you can use them where integrations are supported.

You can connect:

* **Standard integrations** – pre-built connectors like Slack, Google Drive, Jira, and more
* **Custom MCP servers** – your own tools and workflows via the "Add custom MCP" button

## What you will find on this page

* **Popular integrations**\
  A set of commonly used [AI integrations](https://nexos.ai/features/ai-integrations/) (based on what other teams use) so you can quickly start with the most popular options.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FwNeomoSRfWL1187nsLgw%2Fimage.png?alt=media&amp;token=4206b35a-c93c-4836-8f47-e3b7a8030507" alt="" width="563"><figcaption></figcaption></figure>

* **Active and All views**\
  Use **Active** to see only integrations currently enabled for your organization, or **All** to browse everything available.
* **Search and Category filter**\
  Use **Search** to find an integration by name, or **Category** to filter the list (for example, Collaboration, Productivity, Developer Tools, DevOps).
* **Integration list with status**\
  Each integration shows its **status** (Active or Inactive) and when it was **last modified**, so you can track recent changes.
* **Available integrations:** Atlassian MCP server, GitHub MCP server, GitLab MCP server, Google Calendar, Google Drive, Google Mail, HiBob, Looker, Microsoft Calendar, Microsoft OneDrive, Microsoft Outlook, Microsoft SharePoint, Microsoft Teams, Slack, Google Ads, BigQuery and others.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FRoDg6ThVNLACLRZW2FOI%2FIntegrations.gif?alt=media&amp;token=464bdde0-5b50-4c40-a734-959b582c85fc" alt="nexos.ai Integrations page listing active and available connectors including Atlassian, GitHub, and GitLab MCP servers." width="563"><figcaption></figcaption></figure>

* **Apps**: section shows where you can access nexos.ai beyond the main workspace, including:
  * **Messaging apps** – use nexos.ai in Slack, Telegram, Microsoft Teams, and other messaging platforms. [Learn more in Messaging apps set up](https://docs.nexos.ai/workspace/settings/user-settings/my-apps).
  * **Mobile apps** – access nexos.ai anytime from iOS and Android
  * **Browser extension** – research, write, and get AI answers directly from your browser

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FS1vACxpz2TExaEXDoFpL%2Fimage.png?alt=media&amp;token=43848d31-1a0c-461e-a7b6-482cb9cf91fb" alt="" width="563"><figcaption></figcaption></figure>

***

## Activate or deactivate an integration

1. Open **Settings** and go to **Organization → Integrations**.
2. Find the integration you want (use **Search** or **Category** if needed).
3. Change its status to **Active** (enable) or **Inactive** (disable).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F2CxQ9c47mFolKYF6lQXY%2FScreenRecording2026-09-29at11.50.00-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=6c0c40ae-aac3-4b1c-b9b3-807851c44247" alt="" width="563"><figcaption></figcaption></figure>

## Configure a specific integration

To enable and set up an integration end-to-end, follow the dedicated setup page for that integration (for example **Google Calendar**, **Google Mail**, **Slack**, and others).

***

## Custom MCP servers

You can add your own MCP servers to extend nexos.ai with custom tools and workflows. Custom MCP servers are useful when you need to connect internal tools, proprietary systems, or specialized workflows that are not available as pre-built integrations.

## Add a custom MCP server

1. Open **Management**.
2. Go to **Apps**.
3. Select **Add custom MCP** next to the list of the integrations.
4. Enter your MCP server details (URL, authentication, configuration).
5. Test the connection and save.

Once added, your custom MCP server appears in the integrations list and can be used like any other integration.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FvsEIzOkLxGiyGC8Razba%2FScreenRecording2026-09-25at16.56.55-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=1c08cf9c-3c02-4a8e-bafd-3da0bdbb1110" alt="" width="563"><figcaption></figcaption></figure>

***

## Where you can use integrations

Once an integration is enabled for your organization, you can use it anywhere your workspace supports tools, such as:

* **Chat**
* **Agents**&#x20;

### In Chat

1. Open **Chat.**
2. Select the **Tools** icon.
3. Turn on the integration you want to use for that conversation.

{% hint style="info" %}
If you see **Connect** instead of a toggle, it means you do not have a valid sign-in token for that tool yet. Select **Connect** to sign in and approve access, then return to nexos.ai and enable the integration from **Tools**.
{% endhint %}

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FKzbkrAEiTMkXcjOypNqS%2Fintegrations%202.gif?alt=media&amp;token=520830f6-6288-4682-b27a-f92f005c6098" alt="Tutorial how to turn on integrations from the Tools panel in nexos.ai chat." width="563"><figcaption></figcaption></figure>

### In Agents

Add integration actions to give your agents access to external tools:

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon, then open **Settings**.
3. Scroll down to **Integrations**, then enable the integration you want the agent to use.
4. **Save** your changes, then test the agent by asking it to pull context from the connected source (for example, “Summarize the latest updates from Slack” or “Find the relevant Confluence page and summarize it”).


# Custom MCP

Custom MCP servers let you extend nexos.ai with your own tools, APIs, and workflows. Instead of waiting for pre-built integrations, you can connect internal systems, proprietary tools, or specialized workflows directly to nexos.ai.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FkUQkwYdAg8NHeRbQvx5w%2FScreenRecording2026-09-25at16.56.55-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=05f44a55-66f9-4aa7-8efe-660afbf67cda" alt="" width="563"><figcaption></figcaption></figure>

### What is Custom MCP?

Custom MCP stands for Model Context Protocol. It is a standardized way to connect external tools and data sources to AI models. By adding a custom MCP server, you give nexos.ai access to your tools without needing a pre-built connector.

### When to use Custom MCP

Use Custom MCP when you need to:

* connect internal tools or proprietary systems
* integrate specialized workflows not available as standard integrations
* connect legacy systems or custom databases
* build integrations specific to your team's workflow
* extend nexos.ai with custom logic or actions

### How it works

1. You set up or provide a custom MCP server (either hosted by you or by a third party).
2. You add the server details to nexos.ai from the Apps page.
3. nexos.ai connects to your MCP server and gains access to the tools it exposes.
4. You can then use those tools in Chat and Agents just like standard integrations.

### How to add a custom MCP server

{% stepper %}
{% step %}

### Get your MCP server details

First, you need a running MCP server. This could be:

* a server you or your team built
* a third-party MCP server hosted externally
* a managed MCP service

You will need:

* the **server URL** (where the MCP server is running)
* **authentication details** if required (API key, credentials, etc.)
* any **configuration parameters** the server needs
  {% endstep %}

{% step %}

### Add the custom MCP to nexos.ai

* Open **Management**.
* Go to **Apps**.
* Select **Add custom MCP** (next to the list of the integrations.).
* Fill in the server details:
  * **Server name** — a name for this custom MCP (e.g., "Internal CRM")
  * **Server URL** — the URL where your MCP server is running
  * **Authentication** — API keys, credentials, or other auth details if required. Each user will be able to provide their own API key individually once the server is connected
  * **Configuration** — any additional settings the server needs
* Select **Test connection** to verify the server is reachable.
* Select **Save** to add the custom MCP.
  {% endstep %}

{% step %}

### Use the custom MCP

Once added, your custom MCP appears in the integrations list with a status of **Active**. You can now:

* enable it in Chat from the **Tools** panel
* add it to Agents in **Agent Settings → Integrations**
* use it like any other integration in your workflows
  {% endstep %}
  {% endstepper %}

{% hint style="info" %}
**Important notes**

* **Authentication** – make sure your MCP server is secure and your nexos.ai workspace has the correct credentials to access it
* **Server availability** – your MCP server must be running and reachable from nexos.ai at all times
* **Whitelisting** – if you need to whitelist nexos.ai IPs to allow access to your server, contact us.
* **Testing** – always test your custom MCP connection before relying on it in production
* **Support** – if your custom MCP stops working, check that the server is running and the connection details are still valid
* **Updates** – if you update your MCP server, you may need to update the configuration in nexos.ai
* **Connection type** – nexos.ai currently supports only streamable HTTP. This means your MCP server must be hosted at a URL reachable over the internet, rather than running as a local file or process.
  {% endhint %}

### Troubleshooting

#### Connection failed

* Verify the server URL is correct and reachable
* Check that any required authentication credentials are valid
* Make sure your firewall or network allows nexos.ai to connect to the server

#### Tools not appearing

* Verify the MCP server is running and responding
* Check that the server is properly configured to expose tools
* Try testing the connection again from the integrations page

#### Errors when using the custom MCP

* Check the error message for details about what failed
* Verify the server has the required data or permissions to complete the action
* Contact your MCP server administrator if the issue persists

### FAQ

**Can I add multiple custom MCP servers?**\
Yes. You can add as many custom MCP servers as you need. Each one appears in the integrations list.

**What happens if my MCP server goes down?**\
nexos.ai will show an error when you try to use that integration. Once the server is back online, the integration will work again.

**Can I edit a custom MCP after adding it?**\
Yes. You can update the server URL, authentication, and configuration from the integrations list. Select the custom MCP and choose **Edit**.

**Can I share a custom MCP with other teams?**\
Custom MCP servers are added at the organization level, so all teams and members in your workspace can use them once enabled.

**What if I want to remove a custom MCP?**\
You can deactivate it from the integrations list or delete it entirely. Deactivating keeps the configuration saved in case you want to re-enable it later.


# Jira & Confluence (Atlassian)

### Overview

The Atlassian integration connects nexos.ai with **Jira** and **Confluence** so you can search for and reference tickets and pages directly in your workspace. It helps you answer questions faster, summarize project context, and keep responses grounded in the same source of truth your team already uses.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Jira & Confluence** in the list.
4. Set the integration to **Active** (enabled).

After it’s enabled here, team members can connect their own **Jira & Confluence** accounts.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FCNggowL1t8Y9YOceEUJ8%2FScreenRecording2026-09-15at17.20.30-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=e7192046-4c43-4008-bc3a-c873ff14cb47" alt="" width="563"><figcaption></figcaption></figure>

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Jira & Confluence** and select **Connect**.
4. You will be redirected to Atlassian. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Jira** and **Confluence**) and select **Accept** to approve.
6. Return to nexos.ai. **Jira & Confluence** should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FakEQj6nAKji8uCBq2J9A%2FScreenRecording2026-09-15at17.24.45-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=3a5974a5-269c-498c-8727-8a5e02cb0ccf" alt="" width="563"><figcaption></figcaption></figure>

### Use Jira & Confluence in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Jira & Confluence** to use it in that conversation.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FvPIR14peOon8iEwcJqxU%2FScreenRecording2026-09-15at17.29.31-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=f3c0fa91-65d9-448c-a644-81810fb67da2" alt="" width="563"><figcaption></figcaption></figure>

### Use Jira & Confluence in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Jira & Confluence** **on**.
4. **Save** your changes, then test the agent by asking it to pull context from Jira or Confluence (for example, “Summarize this Jira ticket” or “Find and summarize the Confluence page about X”).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FmRDhtRf5SAnXU7crUsmS%2FScreenRecording2026-09-15at17.32.21-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=bc5d7796-10a3-4877-b243-3b8d2d364676" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Jira & Confluence integration (for example, “Add the Atlassian integration for this agent”), and it will enable Atlassian for itself automatically so you can continue without leaving the conversation.
{% endhint %}

### Managing permissions&#x20;

* Your access in nexos.ai matches what your Atlassian account can access in Jira and Confluence. If you cannot find a project, issue, or space, you likely do not have permission for it in Atlassian.
* If the integration stops working or content disappears, reconnect your account (select **Connect** again) to refresh access.


# GitHub

### Overview

The GitHub integration connects nexos.ai with your GitHub account so you can search for and reference repositories, issues, pull requests, and other GitHub content directly in your workspace. It helps you summarize changes, review context, and answer questions using the same source your team works in every day.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **GitHub** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FsqPpyUepEokQCUcJr5e5%2FScreenRecording2026-03-31at11.30.03-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=7f9ced45-02f9-4150-9060-c750a63d32ee" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own GitHub accounts.
{% endhint %}

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Settings** -> **My apps.**
3. Find **GitHub** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FUzvBiwnUXD1BJGiaDir1%2FScreenRecording2026-04-07at16.41.34-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=28eb6c67-6e1a-4ed8-ba60-95079b23cea1" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to GitHub. Sign in if prompted.
5. Review the access request screen and select **Authorize** (or **Allow**) to approve.
6. Return to nexos.ai. **GitHub** should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F1DemfTNxHtNckYgbFdbY%2Fimage.png?alt=media&amp;token=890d6ab3-80ec-4bef-b3c7-0c7c35e05670" alt=""><figcaption></figcaption></figure>

### Use GitHub in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations**.
3. **Toggle on** **GitHub** to use it in that conversation.

### Use GitHub in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **GitHub** **on**.
4. **Save** your changes, then test the agent by asking it to pull context (for example, “Summarize PR #123” or “List the open issues related to X”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the GitHub integration (for example, “Add the GitHub integration for this agent”), and it will enable GitHub for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Google Calendar

### Overview

The Google Calendar integration connects nexos.ai with your Google Calendar so you can reference events and schedules directly in your workspace. It helps you quickly answer questions like what is coming up, what was discussed recently, and how your time is allocated across meetings.

### Setting up the integration (as an admin)

1. Click on your **profile icon**.
2. Go to **Management** -> **Apps.**
3. Find **Google Calendar** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FSkjP0HNGAZwM6wmGDixb%2FScreenRecording2026-03-31at11.38.07-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=2954579f-ce41-407b-9094-4eb7ab6873a9" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Google accounts.
{% endhint %}

### Connecting your account (as a member)

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Google Calendar** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fecx5D5oUDE6xnwKDLcm8%2FScreenRecording2026-03-31at11.40.54-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=003e0b74-1169-47b2-8ef4-2ebe00b5ecd9" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Google. Sign in if prompted.
5. Review the access request screen and select **Allow** to approve access.
6. Return to nexos.ai. **Google Calendar** should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FkZ3Wzm0fJGOmfn0DhXwv%2Fimage.png?alt=media&amp;token=16e65364-8b75-491e-9fb8-74867bd37c42" alt="" width="563"><figcaption></figcaption></figure>

### Use Google Calendar in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations**.
3. Toggle **Google Calendar on** to use it in that conversation.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FVqhHzXwHi8Ie0jsE48Qw%2FRecording%202026-09-23%20140637.gif?alt=media&amp;token=1d9d5759-bb3c-4e02-bed1-2dced056ad0d" alt="" width="375"><figcaption></figcaption></figure>

### Use Google Calendar in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Google Calendar** **on**.
4. **Save** your changes, then test the agent (for example, “Summarize my meetings tomorrow” or “What’s on my calendar this afternoon?”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Google Calendar integration (for example, “Add the Google Calendar integration for this agent”), and it will enable Google Calendar for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Google Drive

### Overview

The Google Drive integration connects nexos.ai with your Google Drive so you can find and reference files directly in your workspace. It helps you answer questions faster, summarize documents, and work from the same source of truth your team keeps in Drive.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Google Drive** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FZGdv1OpFC6vimzZx6Gzn%2FScreenRecording2026-03-31at12.08.31-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=d52a9f92-cd97-4ad6-bc4d-422a9687f7bc" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Google accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Google Drive** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FGliVgEvbpuUqKeLWF1sK%2FScreenRecording2026-03-31at12.10.47-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=bdee23b8-0196-4c3d-b2ab-3a045a96d426" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Google. Sign in if prompted.
5. Review the access request screen and select **Allow** to approve access.
6. Return to nexos.ai. **Google Drive** should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FRerGqivcnEeQWbJQiKas%2Fimage.png?alt=media&amp;token=f9dc7783-dd75-43dc-9a45-afbd526544d6" alt="" width="563"><figcaption></figcaption></figure>

### Use Google Drive in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations**.
3. Toggle **Google Drive** **on** to use it in that conversation.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F7TP4MOwwmp1gIC7nDgeQ%2FRecording%202026-09-23%20141537.gif?alt=media&amp;token=5c44f5cd-91e5-44a2-9a33-c74a1f7f7ceb" alt="" width="375"><figcaption></figcaption></figure>

### Use Google Drive in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Google Drive** **on**.
4. **Save** your changes, then test the agent (for example, “Find the Q4 roadmap in Drive and summarize it” or “Pull the latest deck and list key decisions”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Google Drive integration (for example, “Add the Google Drive integration for this agent”), and it will enable Google Drive for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Gmail

### Overview

The Google Mail integration connects nexos.ai with your Gmail so you can reference email content directly in your workspace. It helps you quickly summarize threads, pull context from past conversations, and draft clearer replies using the information already in your inbox.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Gmail** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FJ7PrxNrNO7qfg2fv6dDs%2FScreenRecording2026-03-31at12.17.52-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=97398630-a0d0-48de-82cd-d90342ae6006" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Google accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Gmail** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F46K17AYQLHRPjpOiBFKJ%2FScreenRecording2026-03-31at12.19.33-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=562d5cc8-6eb1-4414-bf20-306cf9a27721" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Google. Sign in if prompted.
5. Review the access request screen and select **Allow** to approve access.
6. Return to nexos.ai. Google Mail should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fy7m7daDNIMnOJWUiUYMo%2Fimage.png?alt=media&amp;token=b40a5156-5a85-4f87-9fc6-e10f81f68fce" alt=""><figcaption></figcaption></figure>

### Use Google Mail in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations**.
3. Toggle **Gmail** **on** to use it in that conversation.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F4RdAu25fQ2yKCMg6mA5P%2Fgmail%20rec.gif?alt=media&amp;token=8109711f-5078-4fd6-ae92-5b4275f7a6e1" alt="" width="375"><figcaption></figcaption></figure>

### Use Google Mail in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Google Mail** **on**.
4. **Save** your changes, then test the agent (for example, “Summarize the latest email thread with Acme” or “Find the last invoice email and pull the due date”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Google Mail integration (for example, “Add the Google Mail integration for this agent”), and it will enable Google Mail for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# HiBob

### Overview

The HiBob integration connects nexos.ai with your HiBob workspace so you can reference HR information and people context from HiBob directly in nexos.ai. It helps you answer routine questions faster and keep work aligned with the data stored in your HR system.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **HiBob** in the list.
4. Set the integration to **Active** (enabled).

{% hint style="info" %}
After it’s enabled here, team members can connect their own HiBob accounts (depending on your organization’s HiBob access rules).
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **HiBob** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FJ4iW9XaO3OVJGX5qQ9RB%2FScreenRecording2026-03-31at12.24.14-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=3196e993-8181-43b3-8261-69ec8495fe9a" alt="" width="563"><figcaption></figcaption></figure>

4. In **Configuration**, enter the required details:
   * **Service User ID**
   * **Token**
5. Select **Enable** to save and activate the integration.

### Use HiBob in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations**.
3. Toggle **HiBob** **on** to use it in that conversation.

### Use HiBob in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **HiBob** **on**.
4. **Save** your changes, then test the agent (for example, “Find the policy for PTO” or “Summarize the details from the employee profile for onboarding”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the HiBob integration (for example, “Add the HiBob integration for this agent”), and it will enable HiBob for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Looker

### Overview

The Looker integration connects nexos.ai with your Looker environment so you can reference BI content and reporting context directly in your workspace. It helps you answer questions faster by pulling in the same analytics source your team uses for dashboards and insights.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Looker** in the list.
4. In **Configuration**, fill in the required fields:
   * **Base URL**
   * **Client ID**
   * **Client Secret**

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FRvsyUqG2J0rRDqJRfq10%2FScreenRecording2026-04-07at13.02.04-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=92fe851e-e261-4ed2-be39-1778ce26cfe7" alt="" width="563"><figcaption></figcaption></figure>

5. Select **Enable** to save the configuration and **activate** the integration.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FTQeVArii6soSoAaDZyuQ%2Fimage.png?alt=media&amp;token=bd7615d1-31ab-4330-b654-3718d001baf4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own accounts (depending on your organization’s Looker access rules).
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Looker** and select **Connect**.
4. You will be redirected to Looker (or your SSO provider). Sign in if prompted.
5. Review the access request screen and approve access.
6. Return to nexos.ai. Looker should now show as connected in **My Apps**.

### Use Looker in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations**.
3. Toggle **Looker** **on** to use it in that conversation.

### Use Looker in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Looker** **on**.
4. **Save** your changes, then test the agent (for example, “Summarize the key metrics from the sales dashboard” or “Find the dashboard for churn and pull the latest trend”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Looker integration (for example, “Add the Looker integration for this agent”), and it will enable Looker for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Microsoft Calendar

### Overview

The Microsoft Calendar integration connects nexos.ai with your Microsoft calendar so you can reference upcoming and past events directly in your workspace. It helps you quickly understand schedules, meeting context, and what’s next without switching tools.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Microsoft Calendar** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FtU1cTu5U53emLhNScD7h%2Fmicrosoft%20calendar.gif?alt=media&amp;token=ac5f121d-f12d-498c-be70-1b2bf573182a" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Microsoft accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Microsoft Calendar** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FikspGOUAZZf7IdZeJNUo%2Fmicrosoft%20calendar%20my%20integrations.gif?alt=media&amp;token=bd1627a7-3c31-4d4e-aab4-f91097583c5e" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Microsoft. Sign in if prompted.
5. Review the access request screen and select **Accept** to approve access.
6. Return to nexos.ai. Microsoft Calendar should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FRZQ5cXbdXstEeez2hoj8%2Fimage.png?alt=media&amp;token=047bc8b6-1650-4d8c-8e33-51360c1fe7eb" alt=""><figcaption></figcaption></figure>

### Use Microsoft Calendar in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations.**
3. Turn **Microsoft Calendar** **on** to use it in that conversation.

### Use Microsoft Calendar in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Microsoft Calendar** **on**.
4. **Save** your changes, then test the agent (for example, “What meetings do I have tomorrow?” or “Summarize my schedule this afternoon”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Microsoft Calendar integration (for example, “Add the Microsoft Calendar integration for this agent”), and it will enable Microsoft Calendar for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Microsoft OneDrive

### Overview

The Microsoft OneDrive integration connects nexos.ai with your OneDrive so you can find and reference files directly in your workspace. It helps you summarize documents, answer questions using shared files, and keep work connected to the same source of truth your team stores in OneDrive.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Microsoft OneDrive** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FzmacZyxqsZqNQEy2J2yi%2FMicrosoft%20onedrive.gif?alt=media&amp;token=dfe0a532-be62-4b4a-b45c-0621cabc879a" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Microsoft accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Microsoft OneDrive** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fy5p2lSG0bboxUCCp8PsI%2FScreenRecording2026-04-07at15.31.21-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=daa6ed66-7bb1-479e-9aea-708a68b56fce" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Microsoft. Sign in if prompted.
5. Review the access request screen and select **Accept** to approve access.
6. Return to nexos.ai. Microsoft OneDrive should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F9E1WwqZfDN5YP57RUXxx%2Fimage.png?alt=media&amp;token=54c54cf4-ab83-4ff1-afe1-dbc5b8639271" alt=""><figcaption></figcaption></figure>

### Use Microsoft OneDrive in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations**.
3. Turn **Microsoft OneDrive** **on** to use it in that conversation.

### Use Microsoft OneDrive in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Microsoft OneDrive** **on**.
4. **Save** your changes, then test the agent (for example, “Find the latest QBR deck in OneDrive and summarize it” or “Pull the project brief and list the key requirements”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Microsoft OneDrive integration (for example, “Add the Microsoft OneDrive integration for this agent”), and it will enable Microsoft OneDrive for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Microsoft Outlook

### Overview

The Microsoft Outlook integration connects nexos.ai with your Outlook so you can reference email content directly in your workspace. It helps you summarize threads, pull context from past conversations, and draft clearer replies using the information already in your inbox.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Microsoft Outlook** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FVw58Mxve62E84Pn2OWEu%2FOutlook.gif?alt=media&amp;token=f44c9275-6368-4044-ac33-be0cef2e3973" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Microsoft accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Microsoft Outlook** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FtjwqKRcW3IznkyUHYWbh%2FScreenRecording2026-04-07at15.42.16-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=1824beb3-5f16-4ea3-8645-432cb9440451" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Microsoft. Sign in if prompted.
5. Review the access request screen and select **Accept** to approve access.
6. Return to nexos.ai. Microsoft Outlook should now show as connected in **My Apps.**

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FU3NqqTQ0mVCGNF6Jb4RY%2Fimage.png?alt=media&amp;token=dd2b2c34-2a2f-4c54-b23e-1fe46ae88323" alt=""><figcaption></figcaption></figure>

### Use Microsoft Outlook in Chat (turn it on for a conversation)

1. Open **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations.**
3. Turn **Microsoft Outlook** **on** to use it in that conversation.

### Use Microsoft Outlook in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Microsoft Outlook** **on**.
4. **Save** your changes, then test the agent (for example, “Summarize the latest email thread with Acme” or “Find the last email about the contract renewal and pull the key dates”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Microsoft Outlook integration (for example, “Add the Microsoft Outlook integration for this agent”), and it will enable Microsoft Outlook for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Microsoft SharePoint

### Overview

The Microsoft SharePoint integration connects nexos.ai with your SharePoint sites so you can find and reference SharePoint documents and pages directly in your workspace. It helps you summarize internal documentation, answer questions using shared knowledge, and stay aligned with the latest content stored in SharePoint.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Microsoft SharePoint** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fb4f5evMQCMhxfXuQfm5E%2Fsharepoint.gif?alt=media&amp;token=958249c5-cdcb-40fe-92c3-531fd8009352" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Microsoft accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Microsoft SharePoint** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F3PuoWZvF5Tq4JXt1Lck0%2FScreenRecording2026-04-07at15.55.08-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=db2dd63f-41d5-4e9b-9c98-82a79dac4d7b" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Microsoft. Sign in if prompted.
5. Review the access request screen and select **Accept** to approve access.
6. Return to nexos.ai. Microsoft SharePoint should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FfAxx430p2dosnxzW5QTe%2Fimage.png?alt=media&amp;token=7fcfd8ec-68e5-4187-bd52-8b050bd1e77c" alt=""><figcaption></figcaption></figure>

### Use Microsoft SharePoint in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations.**
3. Turn **Microsoft SharePoint** **on** to use it in that conversation.

### Use Microsoft SharePoint in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Microsoft SharePoint** **on**.
4. **Save** your changes, then test the agent (for example, “Find the onboarding doc in SharePoint and summarize it” or “Pull the latest policy page and list the key changes”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Microsoft SharePoint integration (for example, “Add the Microsoft SharePoint integration for this agent”), and it will enable Microsoft SharePoint for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Microsoft Teams

### Overview

The Microsoft Teams integration connects nexos.ai with Teams so you can reference conversations and shared context from Teams directly in your workspace. It helps you catch up faster, summarize discussion threads, and answer questions using the same collaboration history your team already relies on.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Microsoft Teams** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FcCC9xeBBW9CFQ7bNGIuh%2Fteams.gif?alt=media&amp;token=d4a8d1b3-8475-41ef-babb-d5b642e2fd92" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Microsoft accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Microsoft Teams** and select **Connect.**

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Ffux6Hq3NlTGf3G5Yv2Sa%2FScreenRecording2026-04-07at16.00.25-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=d1f3fea0-2911-4ce0-9c82-f2e7e2b2779d" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Microsoft. Sign in if prompted.
5. Review the access request screen and select **Accept** to approve access.
6. Return to nexos.ai. Microsoft Teams should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FGFnJsxbY1w9VU4l7Vc7z%2Fimage.png?alt=media&amp;token=5e13ecdc-0856-4435-bb5d-58fb5d12b1ad" alt=""><figcaption></figcaption></figure>

### Use Microsoft Teams in Chat (turn it on for a conversation)

1. Open **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations**.
3. Turn **Microsoft Teams** **on** to use it in that conversation.

### Use Microsoft Teams in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Microsoft Teams** **on**.
4. **Save** your changes, then test the agent (for example, “Summarize the latest updates from the Marketing channel” or “Pull the decisions from the last project thread”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Microsoft Teams integration (for example, “Add the Microsoft Teams integration for this agent”), and it will enable Microsoft Teams for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Slack Integration

Follow our guide to integrate nexos.ai to your Slack, with few simple steps.

The Slack integration connects nexos.ai with your Slack workspace so you can reference channel conversations and shared context directly in nexos.ai. It helps you catch up on updates, summarize threads, and answer questions using the same discussions your team already has in Slack.

## Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Slack** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FGHFvSg7fHlKeWQL0IQKb%2Fslack.gif?alt=media&amp;token=35e13782-e5c1-4685-a422-236fef0d9d48" alt="Enabling the Slack integration as a network admin." width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Slack accounts.
{% endhint %}

## Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Slack** and select **Connect**.
4. You will be redirected to Slack. Sign in if prompted.
5. Review the access request screen and select **Allow** to approve access.
6. Return to nexos.ai. Slack should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FCbriu7qQrvXlnj8dQfGn%2FScreenRecording2026-04-07at16.10.48-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=835bff66-2406-41b6-83b6-10ca1dca8ca5" alt="Connecting your account as an individual user." width="563"><figcaption></figcaption></figure>

## Use Slack in Chat (turn it on for a conversation)

1. Open **New Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations.**
3. Turn **Slack** **on** to use it in that conversation.

## Use Slack in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Slack** **on**.
4. **Save** your changes, then test the agent (for example, “Summarize the latest updates from #general” or “Pull the key decisions from the last thread about Project X”).

## FAQ

### Which other integrations are available in nexos.ai Workspace?

nexos.ai Workspace supports integrations with the following third-party tools:

* [Atlassian](https://docs.nexos.ai/workspace/integrations/atlassian)
* [GitHub](https://docs.nexos.ai/workspace/integrations/github)
* [Google Calendar](https://docs.nexos.ai/workspace/integrations/google-calendar)
* [Google Drive](https://docs.nexos.ai/workspace/integrations/google-drive)
* [Google Mail](https://docs.nexos.ai/workspace/integrations/google-mail)
* [HiBob](https://docs.nexos.ai/workspace/integrations/hibob)
* [Looker](https://docs.nexos.ai/workspace/integrations/looker)
* [Microsoft Calendar](https://docs.nexos.ai/workspace/integrations/microsoft-calendar)
* [Microsoft OneDrive](https://docs.nexos.ai/workspace/integrations/microsoft-onedrive)
* [Microsoft Outlook](https://docs.nexos.ai/workspace/integrations/microsoft-outlook)
* [Microsoft SharePoint](https://docs.nexos.ai/workspace/integrations/microsoft-sharepoint)
* [Microsoft Teams](https://docs.nexos.ai/workspace/integrations/microsoft-teams)
* [Google Ads](https://docs.nexos.ai/workspace/integrations/google-ads)
* [Google BigQuery](https://docs.nexos.ai/workspace/integrations/google-bigquery)
* [GitLab](https://docs.nexos.ai/workspace/integrations/gitlab)

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Slack integration (for example, “Add the Slack integration for this agent”), and it will enable Slack for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Google Ads

### Overview

The Google Ads integration connects nexos.ai with your Google Ads account so you can reference campaign and performance information directly in your workspace. It helps you summarize results, answer reporting questions faster, and keep analysis tied to the same data your team uses for advertising decisions.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Google Ads** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F0ruWQksQ9ciMxEVeZkB9%2Fads.gif?alt=media&amp;token=fdb8a669-01f8-46b8-9bdc-eb19bf6d0152" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Google accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps**.
3. Find **Google Ads** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FDvDyNq0zEV9KN7ymJVZb%2FScreenRecording2026-04-07at16.18.52-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=6b778685-9404-4a66-8c73-53f043035039" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Google. Sign in if prompted.
5. Review the access request screen and select **Allow** to approve access.
6. Return to nexos.ai. **Google Ads** should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FY1kyYNrTHAdnEjDAy6HT%2Fimage.png?alt=media&amp;token=8b28ee79-4b3e-4df5-b395-5888eddbe8d4" alt=""><figcaption></figcaption></figure>

### Use Google Ads in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations.**
3. Turn **Google Ads** **on** to use it in that conversation.

### Use Google Ads in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Google Ads** **on**.
4. **Save** your changes, then test the agent (for example, “Summarize campaign performance last week” or “Which campaigns had the highest CPA yesterday?”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Google Ads integration (for example, “Add the Google Ads integration for this agent”), and it will enable Google Ads for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Google BigQuery

### Overview

The Google BigQuery integration connects nexos.ai with BigQuery so you can reference datasets and query results directly in your workspace. It helps you answer data questions faster, summarize findings, and work from the same analytics source your team uses.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Google BigQuery** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FzkwhBab87xG6FnD3A8gA%2FQuery.gif?alt=media&amp;token=0f011dd6-e4e7-408c-9ead-d868ce21196a" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own Google accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps.**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps.**
3. Find **Google BigQuery** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fmo0TTrUdvFTCRfVXXjdf%2FScreenRecording2026-04-07at16.24.24-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=02ab988f-3b61-463f-9148-67f6b3ab7d50" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to Google. Sign in if prompted.
5. Review the access request screen and select **Allow** to approve access.
6. Return to nexos.ai. Google BigQuery should now show as connected in **My Apps.**

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F3cw7JKhGSYcPDLAbBdDg%2Fimage.png?alt=media&amp;token=b73be754-cc15-47d1-b61d-b7c838af7301" alt=""><figcaption></figcaption></figure>

### Use Google BigQuery in Chat (turn it on for a conversation)

1. Open **New Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations.**
3. Turn **Google BigQuery** **on** to use it in that conversation.

### Use Google BigQuery in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Google BigQuery** **on**.
4. **Save** your changes, then test the agent (for example, “Pull weekly signups from BigQuery and summarize the trend” or “Compare revenue by channel for the last 30 days”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Google BigQuery integration (for example, “Add the Google BigQuery integration for this agent”), and it will enable Google BigQuery for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# GitLab

### Overview

The GitLab integration connects nexos.ai with your GitLab account so you can reference repositories, issues, merge requests, and other GitLab content directly in your workspace. It helps you summarize changes, review context, and answer questions using the same source your team works in every day.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **GitLab** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F6HcgbRk2v3hDezB9u96S%2FScreenRecording2026-04-07at16.31.39-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=d86af9df-80dc-438e-ab6a-71a13a413a4f" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
After it’s enabled here, team members can connect their own GitLab accounts.
{% endhint %}

### Connecting your account (as a member) from **My Apps**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Apps.**
3. Find **GitLab** and select **Connect**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FRiy9G8jSwt8G8qTZvCMX%2FScreenRecording2026-04-07at16.33.22-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=0fabd62b-2299-4fd6-b487-239c8b5dd610" alt="" width="563"><figcaption></figcaption></figure>

4. You will be redirected to GitLab. Sign in if prompted.
5. Review the access request screen and select **Authorize** (or **Allow**) to approve.
6. Return to nexos.ai. GitLab should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FseyUB3C9fKWTozHAHlsS%2Fimage.png?alt=media&amp;token=c1a5b7fb-a824-4f55-9ac1-69749e0e8505" alt=""><figcaption></figcaption></figure>

### Use GitLab in Chat (turn it on for a conversation)

1. Open **New** **Chat** (or an Agent chat).
2. Click on a "**+**" -> **Integrations.**
3. Turn **GitLab** **on** to use it in that conversation.

### Use GitLab in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **GitLab** **on**.
4. **Save** your changes, then test the agent (for example, “Summarize MR !42” or “List the open issues related to X”).

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the GitLab integration (for example, “Add the GitLab integration for this agent”), and it will enable GitLab for itself automatically so you can continue without leaving the conversation.
{% endhint %}


# Google Sheets

### Overview

The Google Sheets integration connects nexos.ai with your **Google Sheets** so you can reference spreadsheet data directly in your workspace. It helps you quickly answer questions about reports, metrics, project tracking, budgets, and shared datasets without manually searching through spreadsheets. You can use it to review updates, summarize information, analyze trends, and keep your team aligned using the latest data stored in Google Sheets.

### What you can do with Google Sheets

With the Google Sheets integration enabled, you can work with spreadsheet data directly in nexos.ai. For example, you can:

* read and reference data from existing sheets
* summarize reports, trackers, budgets, and datasets
* review updates and spot changes in shared spreadsheets
* analyze trends, metrics, and project data
* add or update rows and columns
* create new sheets or remove existing content
* pull spreadsheet data into your workflows and answers

Google Sheets works best for reviewing and updating structured data, such as rows, columns, and tabular information. It is especially useful for keeping reports, trackers, and shared datasets up to date.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Google Sheets** in the list.
4. Set the integration to **Active** (enabled).

After it’s enabled here, team members can connect their own **Google Sheets** accounts.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FSV3tcJr59HBBUKo2mEQ4%2Fg%20sheets%202.gif?alt=media&amp;token=ead11ea9-3bb0-44cd-8744-4c7c7cd95f6e" alt="" width="563"><figcaption></figcaption></figure>

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Google Sheets** and select **Connect**.
4. You will be redirected to Google Sheets. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Google Sheets**) and select **Accept** to approve.
6. Return to nexos.ai. **Google Sheets** should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F6vemKJ8MB0n7rS2DJr2c%2Fimage.png?alt=media&amp;token=10465f68-7b3e-46e2-ab88-12d478ecb3e1" alt=""><figcaption></figcaption></figure>

### Use Google Sheets in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Google Sheets** to use it in that conversation.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FK7Vvz4fnRGdO8Hkp8uTP%2Fg%20sheets%20.gif?alt=media&amp;token=bc941eae-ea04-4bc0-9042-5289902d30a9" alt="" width="375"><figcaption></figcaption></figure>

### Use Google Sheets in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Google Sheets** **on**.
4. **Save** your changes, then test the agent.


# Google Slides

### Overview

The Google Slides integration links nexos.ai with your Google Slides presentations, making slide content accessible directly within your workspace. It allows you to quickly find information from presentations, review project updates, revisit meeting materials, and understand key discussion points without opening individual decks. With this integration, teams can stay informed and work more efficiently using the latest presentation content stored in Google Slides.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Google Slides** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FEnsReo5CisfGxhQ8xB7K%2Frecording_2157.gif?alt=media&amp;token=ed726125-c8a3-4752-8319-cfd6b0b178b0" alt="" width="563"><figcaption></figcaption></figure>

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Google Slides** and select **Connect**.
4. You will be redirected to Google Slides. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Google Slides**) and select **Accept** to approve.
6. Return to nexos.ai. **Google Slides** should now show as connected in **My Apps**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FvsinEWcQPoNmEl4mh81W%2Fimage.png?alt=media&amp;token=88c27f20-127b-40b8-829e-535e3d2674ea" alt="" width="563"><figcaption></figcaption></figure>

### Use Google Slides in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Google Slides** to use it in that conversation.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FT882N5gnrkZbhxOOfAmS%2Frecording_2202.gif?alt=media&amp;token=6998a45e-40ed-4d75-9828-d5daf1e539b4" alt="" width="563"><figcaption></figcaption></figure>

### Use Google Slides in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Google Slides** **on**.
4. **Save** your changes, then test the agent.


# Excel

### Overview

The Excel integration connects nexos.ai with your Excel files so you can work with spreadsheet data directly in your workspace. It enables you to quickly access reports, analyze tables, review financial data, and track project information without manually searching through files. With this integration, you can summarize data, identify trends, and keep your team aligned using the latest information stored in Excel spreadsheets.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Excel** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Excel** and select **Connect**.
4. You will be redirected to Excel. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Excel**) and select **Accept** to approve.
6. Return to nexos.ai. **Excel** should now show as connected in **My Apps**.

### Use Excel in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Excel** to use it in that conversation.

### Use Excel in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Excel** **on**.
4. **Save** your changes, then test the agent.


# Google Docs

### Overview

The Google Docs integration links nexos.ai with your Google Docs, allowing document content to be available directly inside your workspace. It makes it easier to locate key information, review shared notes, access project documentation, and stay updated on collaborative content without opening multiple files. This integration helps teams work more efficiently by keeping important documents and knowledge easily accessible.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Google Docs** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Google Docs** and select **Connect**.
4. You will be redirected to Google Docs. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Google Docs**) and select **Accept** to approve.
6. Return to nexos.ai. **Google Docs** should now show as connected in **My Apps**.

### Use Google Docs in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Google Docs** to use it in that conversation.

### Use Google Docs in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Google Docs** **on**.
4. **Save** your changes, then test the agent.


# Notion

### Overview

The Notion integration connects nexos.ai with your Notion workspace so you can access pages, notes, databases, and documentation directly within your workspace. It helps you quickly find important information, review project updates, track tasks, and reference team knowledge without switching between tools. With this integration, teams can stay organized and collaborate more effectively using the latest content stored in Notion.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Notion** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Notion** and select **Connect**.
4. You will be redirected to Notion. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Notion**) and select **Accept** to approve.
6. Return to nexos.ai. **Google Docs** should now show as connected in **My Apps**.

### Use Notion in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Notion** to use it in that conversation.

### Use Notion in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Notion** **on**.
4. **Save** your changes, then test the agent.


# LinkedIn

### Overview

The LinkedIn integration connects nexos.ai with LinkedIn so you can reference professional profiles, company information, and network activity directly within your workspace. It helps you quickly review professional backgrounds, track company updates, and access relevant business information without switching between platforms. With this integration, teams can stay informed and work more efficiently using the latest data available through LinkedIn.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **LinkedIn** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **LinkedIn** and select **Connect**.
4. You will be redirected to **LinkedIn**. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access on **LinkedIn**) and select **Accept** to approve.
6. Return to nexos.ai. **LinkedIn** should now show as connected in **My Apps**.

### Use LinkedIn in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **LinkedIn** to use it in that conversation.

### Use LinkedIn in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **LinkedIn** **on**.
4. **Save** your changes, then test the agent.


# Canva

### Overview

The Canva integration connects nexos.ai with your Canva workspace so you can access designs, presentations, folders, and creative assets directly within your workspace. It helps you manage and organize Canva content more efficiently by allowing you to create folders, retrieve folder and design IDs, and move items between folders without switching platforms. This integration is focused on operational and workspace management tasks and does not provide creative design capabilities such as generating new designs, visuals, or editable creative content from scratch.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Canva** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Canva** and select **Connect**.
4. You will be redirected to Canva. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Canva**) and select **Accept** to approve.
6. Return to nexos.ai. **Canva** should now show as connected in **My Apps**.

### Use Canva in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Canva** to use it in that conversation.

### Use Canva in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Canva** **on**.
4. **Save** your changes, then test the agent.


# Google Analytics

### Overview

The Google Analytics integration connects nexos.ai with your Google Analytics account so you can access website and traffic data directly within your workspace. It allows you to review metrics, analyze performance trends, monitor audience activity, and reference reporting data without switching between platforms. The integration supports access to a broad range of analytics data and reporting capabilities.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Google Analytics** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Analytics** and select **Connect**.
4. You will be redirected to Google Analytics. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Analytics**) and select **Accept** to approve.
6. Return to nexos.ai. **Google Slides** should now show as connected in **My Apps**.

### Use Google Analytics in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Google Analytics** to use it in that conversation.

### Use Analytics in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Analytics** **on**.
4. **Save** your changes, then test the agent.


# Meta Ads

### Overview

The Meta Ads integration connects nexos.ai with your Meta Ads account so you can access campaign performance data directly within your workspace. It helps you review ad metrics, monitor campaign results, analyze audience performance, and track advertising activity without switching between platforms. With this integration, teams can work more efficiently using the latest campaign and reporting data available from Meta Ads.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Meta Ads** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Meta Ads** and select **Connect**.
4. You will be redirected to Meta Ads. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Meta Ads**) and select **Accept** to approve.
6. Return to nexos.ai. **Meta Ads** should now show as connected in **My Apps**.

### Use **Meta Ads** in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Meta Ads** to use it in that conversation.

### Use **Meta Ads** in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Meta Ads** **on**.
4. **Save** your changes, then test the agent.


# Ahrefs

### Overview

The Ahrefs integration connects nexos.ai with your Ahrefs account so you can access SEO and website performance data directly within your workspace. It helps you review backlink profiles, analyze keyword rankings, monitor organic traffic trends, and track competitor performance without switching between platforms. With this integration, teams can work more efficiently using the latest SEO insights and reporting data available through Ahrefs.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Ahrefs** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Ahrefs** and select **Connect**.
4. You will be redirected to Ahrefs. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Ahrefs**) and select **Accept** to approve.
6. Return to nexos.ai. **Ahrefs** should now show as connected in **My Apps**.

### Use Ahrefs in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Ahrefs** to use it in that conversation.

### Use Ahrefs in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Ahrefs** **on**.
4. **Save** your changes, then test the agent.


# Instagram

### Overview

The Instagram integration connects nexos.ai with your Instagram account so you can access profile, content, and engagement data directly within your workspace. It helps you review post performance, monitor audience engagement, track account activity, and reference social media insights without switching between platforms. With this integration, teams can stay informed and manage Instagram-related workflows more efficiently using the latest available account data.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Instagram** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Instagram** and select **Connect**.
4. You will be redirected to **Instagram**. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Instagram**) and select **Accept** to approve.
6. Return to nexos.ai. **Instagram** should now show as connected in **My Apps**.

### Use Instagram in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Instagram** to use it in that conversation.

### Use Instagram in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Instagram** **on**.
4. **Save** your changes, then test the agent.


# YouTube

### Overview

The YouTube integration connects nexos.ai with your YouTube account so you can access channel, video, and performance data directly within your workspace. It helps you review video metrics, monitor audience engagement, track channel activity, and reference content performance without switching between platforms. The integration is also useful for retrieving metadata from videos across public YouTube channels, including content from other creators. With this integration, teams can manage and analyze YouTube content more efficiently using the latest available channel data.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **YouTube** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **YouTube** and select **Connect**.
4. You will be redirected to YouTube. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **YouTube**) and select **Accept** to approve.
6. Return to nexos.ai.**YouTube** should now show as connected in **My Apps**.

### Use YouTube in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **YouTube** to use it in that conversation.

### Use YouTube in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **YouTube** **on**.
4. **Save** your changes, then test the agent.


# HubSpot

### Overview

The HubSpot integration connects nexos.ai with your HubSpot workspace so you can access CRM data, contacts, companies, deals, and marketing information directly within your workspace. It helps you review sales activity, track customer relationships, monitor pipeline updates, and reference business data without switching between platforms. With this integration, teams can stay aligned and work more efficiently using the latest information stored in HubSpot.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **HubSpot** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **HubSpot** and select **Connect**.
4. You will be redirected to HubSpot. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **HubSpot**) and select **Accept** to approve.
6. Return to nexos.ai. **HubSpot** should now show as connected in **My Apps**.

### Use HubSpot in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **HubSpot** to use it in that conversation.

### Use HubSpot in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **HubSpot** **on**.
4. **Save** your changes, then test the agent.


# Stripe

### Overview

The Stripe integration connects nexos.ai with your Stripe account so you can access payment, customer, subscription, and transaction data directly within your workspace. It helps you review revenue activity, monitor payments, track subscriptions, and reference billing information without switching between platforms. With this integration, teams can manage financial operations more efficiently using the latest data available in Stripe.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Stripe** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Stripe** and select **Connect**.
4. You will be redirected to **Stripe**. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Stripe**) and select **Accept** to approve.
6. Return to nexos.ai. **Stripe** should now show as connected in **My Apps**.

### Use Stripe in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Stripe** to use it in that conversation.

### Use Stripe in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Stripe** **on**.
4. **Save** your changes, then test the agent.


# QuickBooks

### Overview

The QuickBooks integration connects nexos.ai with your QuickBooks account so you can access accounting, invoice, expense, and financial data directly within your workspace. It helps you review transactions, monitor cash flow, track invoices, and reference financial records without switching between platforms. With this integration, teams can manage accounting workflows more efficiently using the latest information stored in QuickBooks.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **QuickBooks** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **QuickBooks** and select **Connect**.
4. You will be redirected to **QuickBooks**. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **QuickBooks**) and select **Accept** to approve.
6. Return to nexos.ai. **QuickBooks** should now show as connected in **My Apps**.

### Use QuickBooks in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **QuickBooks** to use it in that conversation.

### Use QuickBooks in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **QuickBooks** **on**.
4. **Save** your changes, then test the agent.


# Trello

### Overview

The Trello integration connects nexos.ai with your Trello account so you can search for and reference boards, lists, cards, and other Trello content directly in your workspace. It helps you summarize tasks, track progress, review project context, and answer questions using the same source your team works in every day.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Trello** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Trello** and select **Connect**.
4. You will be redirected to **Trello**. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Trello**) and select **Accept** to approve.
6. Return to nexos.ai. **Trello** should now show as connected in **My Apps**.

### Use Trello in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Trello** to use it in that conversation.

### Use Trello in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Trello** **on**.
4. **Save** your changes, then test the agent.


# Google Tasks

### Overview

The Google Tasks integration connects nexos.ai with your Google Tasks account so you can search for and reference task lists, tasks, due dates, and other task details directly in your workspace. It helps you summarize tasks, track priorities and deadlines, and answer questions using the same source you rely on to organize your work.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Google Tasks** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Google Tasks** and select **Connect**.
4. You will be redirected to **Google Tasks**. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Google Tasks**) and select **Accept** to approve.
6. Return to nexos.ai. **Google Tasks** should now show as connected in **My Apps**.

### Use Google Tasks in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Google Tasks** to use it in that conversation.

### Use Google Tasks in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Google Tasks** **on**.
4. **Save** your changes, then test the agent.


# Webflow

### Overview

The Webflow integration connects nexos.ai with your Webflow account so you can search for and reference sites, pages, CMS collections, and other Webflow content directly in your workspace. It helps you review website content, summarize CMS data, and answer questions using the same source your team uses to build and manage websites.

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Webflow** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Webflow** and select **Connect**.
4. You will be redirected to **Webflow**. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Webflow**) and select **Accept** to approve.
6. Return to nexos.ai. **Webflow** should now show as connected in **My Apps**.

### Use Webflow in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Webflow** to use it in that conversation.

### Use Webflow in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Webflow** **on**.
4. **Save** your changes, then test the agent.


# Figma

### Overview

### Setting up the integration (as an admin)

1. Click on your **Profile icon.**
2. Go to **Management** -> **Apps.**
3. Find **Figma** in the list.
4. Set the integration to **Active** (enabled).

### Connecting your account (as a member)

1. Click on your profile icon.
2. Go to **Get apps** -> **My apps.**
3. Find **Figma** and select **Connect**.
4. You will be redirected to **Trello**. Sign in if prompted.
5. Review the access request screen (it will list what nexos.ai can access in **Figma**) and select **Accept** to approve.
6. Return to nexos.ai. **Figma** should now show as connected in **My Apps**.

### Use Figma in Chat (turn it on for a conversation)

1. Open **New Chat.**
2. Click on a "**+**" -> **Integrations.**
3. **Toggle on** **Figma** to use it in that conversation.

### Use Figma in Agents (turn it on for an agent)

1. Open **Agents** and select the agent you want to update.
2. Select the **Studio** icon (top-right), then open **Settings**.
3. Scroll to **Integrations** and turn **Trello** **on**.
4. **Save** your changes, then test the agent.


# Gateway API


# QuickStart with nexos.ai Gateway API

Learn how to quickstart using nexos.ai 's Gateway API in this step by step guide.

The nexos.ai Gateway provides an **OpenAI-compatible API**, so you can use existing OpenAI-compatible SDKs and tools by changing only the API key and base URL.

## Three steps to your first request

{% stepper %}
{% step %}

### Generate an API key

Go to [**Gateway → API keys**](https://workspace.nexos.ai/gateway/api-keys) and click **Generate API Key**.

We recommend storing your API key as an environment variable.

```
export NEXOS_API_KEY="nexos-..."
```

{% hint style="info" %}
Keep your API key secure. Never commit it to source control or expose it in client-side applications.
{% endhint %}
{% endstep %}

{% step %}

### Make your first call

Send a basic chat completion - just a `model` and a `messages` array, where each message has a `role` and `content`.

```bash
curl https://api.nexos.ai/v1/chat/completions \
  -H "Authorization: Bearer $NEXOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "GPT 5.6 Sol",
    "messages": [
      { "role": "user", "content": "Hello, world!" }
    ]
  }'
```

You can get list of available models here: [Gateway API Models](https://docs.nexos.ai/gateway-api/models)
{% endstep %}

{% step %}

### Use the Python SDK

Because the Gateway is OpenAI-compatible, you can use the official OpenAI SDK. Simply set your nexos.ai API key and Gateway base URL.

Install the SDK

```bash
pip install openai
```

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.nexos.ai/v1",
    api_key="YOUR_NEXOS_API_KEY",
)

response = client.chat.completions.create(
    model="GPT 5.6 Sol",
    messages=[
        {"role": "user", "content": "Hello, world!"},
    ],
)

print(response.choices[0].message.content)
```

{% endstep %}
{% endstepper %}

That's it — swap the `model` value to route the same request to any model in your Gateway.


# API Keys

Use an API key to authenticate requests to the Gateway API.

### How to generate an API Key

Within Gateway:

1. Open the **API Keys tab**.
2. Select **Generate API Key**.
3. Enter the name of the key and click Generate.
4. Copy and save the key immediately.&#x20;

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FhSrxeh1QPMDBopvqOXfA%2FScreenRecording2026-09-15at12.49.26-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=fdb32ec3-451a-4f62-9908-71a954fd4df0" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Make sure you save this API Key - you won't be able to access it again after closing the dialog.
{% endhint %}

If needed, you can rotate the API Key within the API Keys tab settings. This will rotate the API Key so the old one is deprecated, and you can change it to a new one.

### Managing your API key

From the API Keys tab, click the actions menu next to any key to:

* Edit: update the key's name.
* Rotate: deprecate the old key and generate a new one in its place.
* Delete: permanently remove the key.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FbV2PCRdEhs29okwoOBru%2Fimage.png?alt=media&amp;token=f255e865-8582-443c-b9dc-7d63cf5b593f" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
Your API Key is set with custom settings: models enabled, fallbacks, etc., based on the settings (set by the org owner).
{% endhint %}

{% hint style="info" %}
API usage requires purchased API credits.
{% endhint %}

### API Key budget limits for members

To change the user's API Key budget limit, an **owner** of the organization has to:

1. Go to the Profile icon -> Management -> API Key management;
2. Search the user's email address;
3. Click the three dots -> Change Limits;
4. Set the maximum monthly spend -> Save.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FSH2RQyNtR5mHlNDIwhRH%2Fimage.png?alt=media&amp;token=d1b766ab-c32b-4976-bb8f-8911835bd6fa" alt=""><figcaption></figcaption></figure>

### API Key budget limits for company

To set controls for the company's API usage, an **owner** of the organization has to:

1. Go to the Profile icon -> Management -> Settings;
2. Change Limits -> Set the maximum monthly spend -> Save.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FNQHJ4CVKeJrTLI03FBfU%2Fhttps___files.gitbook.com_v0_b_gitbook-x-prod.appspot.com_o_spaces%252FDcOhapgXnoeDvgGQ8Jm4%252Fuploads%252FeRuIhiwtdiPhNDwwH42u%252FRecording%25202026-10-14%2520152020.gif?alt=media&amp;token=2e53f5a7-7230-410c-96b5-49677c6d9130" alt=""><figcaption></figcaption></figure>


# Models list

The **Models** section provides a centralized view of the AI models available through nexos.ai. It helps you discover models, understand their capabilities and costs, and keep track of upcoming model retirements.

### Where to find it

You can access the Models section from your Gateway platform:

1. Open **nexos.ai Gateway**.
2. In the left sidebar, select **Models**.

You'll see a searchable catalog of all available models with pricing, capabilities, and availability information.

### Two ways to view models

The Models page displays models in two views using tabs at the top of the page:

{% stepper %}
{% step %}

### Company models

Shows the models enabled for your organization. Your company admins manage which models are available. If you need a model that is not currently enabled, contact your company admin to request access.
{% endstep %}

{% step %}

### All nexos.ai models

Shows the full catalog of models available through nexos.ai. The same underlying model may appear multiple times when it's available through different providers or regions. Pricing and other properties may differ between variants.
{% endstep %}
{% endstepper %}

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FxKYwWYXIJyDFQooL073j%2Fnexos_tabs_clickable.gif?alt=media&amp;token=48fdd5f6-6f0e-4b93-a5bf-2f245da9d482" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** A model appearing in All nexos.ai models does not mean it's enabled for your organization.&#x20;

Check the Company models tab to see what's available to you.
{% endhint %}

### Finding the right model

Use **Search models** to find a model by name. For more specific requirements, filters at the top of the page let you narrow the catalog by:

* **Modalities** – filter by supported input and output types (text, images, PDFs, audio, video)
* **Capabilities** – find models that support specific functionality (tools, structured outputs, streaming, reasoning)
* **Context** – select the context-window range required for your workload
* **Input pricing** and **Output pricing** – set a price range to find models within your budget
* **More filters** – filter by provider, developer, deployment region, or data-retention requirements (e.g., zero-day retention for privacy-sensitive workloads)

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FjKkIALMBQK5Ccgu6j5Mt%2FRecording%202026-10-28%20105959.gif?alt=media&amp;token=bae74357-827e-43ea-8358-a2aaf5d5084e" alt=""><figcaption></figcaption></figure>

### Understanding the model table

Each row represents a particular model offering. The same model may appear multiple times if available through different providers or regions.

The table can show information such as **Model**, **Provider**, **Region**, **Input price**, **Output price**, **Context**, and **Release date**. Pricing shown in the table represents token pricing for that particular model offering, while **Context** indicates how much information the model can process within a request.

Use **Columns** to choose which information is displayed in the table. Supported columns can also be sorted where applicable, making it easier to compare models by properties such as price, context size, or release date.

### Model status

Each model displays a status indicator to show its availability:

* **Green checkmark** – model is currently available and active for use
* **Other indicators** – show deprecated, retiring soon, or coming soon status

Status helps you identify which models you can use immediately and which may need migration planning.

### Model details page

Click on any model to open its detailed page. This provides additional information about the specific model.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FJABGYOHK8vjguGHa3nJB%2FRecording%202026-10-28%20110315.gif?alt=media&amp;token=07ad6c8e-16ff-4aa9-99c1-9804d6a67bf7" alt=""><figcaption></figcaption></figure>

At the top, you can see the model's **developer**, **deployment region**, supported **input and output modalities**, available **API endpoints**, and **release date**, together with a short description of the model.

The summary cards provide important operational information:

* **Price In / Out** – The cost of input and output tokens, typically shown per 1 million tokens.
* **Price cache write / read** – Cache-related pricing when it is supported by the model.
* **Context** – The model's maximum context window.
* **Data retention** – How request data is retained for that model offering. For example, **Zero day retention** indicates that the offering is configured without data retention.

### Model Performance

Model performance metrics show how fast the model responds, measured over the last 24 hours:

* **Time to first token** — How long before the model begins responding (P50 is median, P95 is the slow tail)
* **Output speed** — How many tokens per second the model generates (P50 and P95)
* **End-to-end** — Total time from request to complete response (P50 and P95)

These metrics help you understand latency and speed tradeoffs. A model shows metrics once it has enough traffic; new or rarely-used models may not display performance data yet.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FcL2W6B91eRZPi2GpouV7%2Fimage.png?alt=media&amp;token=55ef4047-056f-4ad1-ab76-c3deae9d44a1" alt=""><figcaption></figcaption></figure>

### Model variants

The **Model variants** section shows models that your team has pre-configured for use within the organization.

A variant can provide a company-specific configuration while still being used like other models. Where configured, **Fallback models** indicate alternative models that can be used as part of that setup.

### Manage model access

#### Requesting a model

If a model you need is not available under **Company models**, contact your company admin or owner to request it be enabled.

#### Permission levels

* **Organization owners** can enable/disable models and contact support to enable locked models
* **Organization members** can view enabled models but cannot change availability

Because model access is managed at the organization level, you can only use models that appear in your **Company models** tab.

### FAQ

**Why do I see the same model multiple times in All nexos.ai models?**\
The same model may be available through different providers, regions, or configurations. Each offering may have different pricing or latency characteristics. Check the Provider and Region columns to understand the differences.

**Can I use a model that's in All nexos.ai models but not in Company models?**\
No. You can only use models enabled in your Company models tab. Contact your organization owner to request access to additional models.

**What does data retention mean?**\
Data retention indicates how your request data is stored. For example, "Zero day retention" means the request data is not retained; your data is processed and discarded immediately. Check this setting if you have privacy requirements.

**What's the difference between a model and a model variant?**\
A model is the base AI offering (e.g., GPT-4). A variant is a company-specific configuration of that model set up by your admins, with custom settings or fallback routing.

**How do I know if a model is about to be retired?**\
Check the Release date and look for retirement date information in the model's detail page. If you see an upcoming retirement date, plan your migration early.

**Can I customize which columns appear in the table?**\
Yes. Click **Columns** to show or hide columns like Input price, Context, Region, or Release date.

**What does the green checkmark status mean?**\
A green checkmark indicates the model is currently available and active. You can use it immediately in your applications and conversations.


# Playground

### Overview

A playground is an environment where you can test your API key and our models. The playground calls the nexos.ai public API directly, so it runs on a key of your own rather than your workspace session.

### How to use it?

1. **Generate an API key**\
   If you haven’t already, generate an API key. Copy it and store it somewhere safe, as you won’t be able to retrieve it later.
2. **Open the Playground**\
   Click **Start Using the Playground** to get started.
3. **Add models**\
   Select one or more models you’d like to test and compare.
4. **Send a prompt**\
   Enter your prompt and send it to all selected models at once.
5. **Compare the responses**\
   Review the models’ answers side by side to see how they differ in quality, style, reasoning, or other aspects relevant to your use case.
6. **Follow the instructions**\
   Continue the conversation, refine your prompts, or adjust the models to find the best fit for your needs.

{% hint style="info" %}
This feature uses tokens from your token pool.
{% endhint %}

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FepAVpc4NSc1AIQlewzHV%2FRecording%202026-10-20%20103940.gif?alt=media&amp;token=55a7fa1d-c881-4e49-9107-9f2e737b3274" alt=""><figcaption></figcaption></figure>

### Model parameters

Use model parameters to control how models generate their responses. You can adjust these settings globally or override them for individual models.

* **System prompt** - Set instructions that define how the model should behave, respond, or format its answers.
* **Temperature** - Controls how predictable or creative responses are. Lower values produce more consistent responses, while higher values introduce more variation.
* **Top P** - Controls the range of tokens the model considers when generating a response. Lower values make responses more focused, while higher values allow for more variety.
* **Frequency penalty** - Reduces repetition in responses. Higher values make the model less likely to repeat words or phrases it has already used.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F68Nweq7VZ3p72tslgLUA%2FRecording%202026-10-20%20105650.gif?alt=media&amp;token=18e92a8e-77b0-44c4-81e9-2387199d703f" alt=""><figcaption></figcaption></figure>

* **Override** - Use custom parameters for a specific model.
* **Reset to global** - Restore the model’s parameters to the global settings.
* **Apply to all** - Apply the current parameter settings to all selected models.

#### **How does it look?**

**Change it in global parameters:**&#x20;

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F3w0TbVhcNo6leN223829%2FRecording%202026-10-20%20111529.gif?alt=media&amp;token=5fb63ae7-c6e0-48bf-ad3a-3d33daddb4a3" alt=""><figcaption></figcaption></figure>

**Override and Apply to all:**&#x20;

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F0gHJR0EtKJmeK23WaeSj%2FRecording%202026-10-20%20111824.gif?alt=media&amp;token=04a2b895-5b52-465e-a69a-bff1becd345b" alt=""><figcaption></figcaption></figure>


# Cost Optimization

### Overview

The **Cost Optimization** dashboard shows how nexos.ai optimization features impact your AI gateway costs. Use it to track savings from caching and understand the performance trade-offs of optimization.

### How does it look?

At the top of the dashboard, you can see the key metrics that summarize the impact of cost optimization:

* **Estimated cost without caching** - what your usage would have cost without caching.
* **Actual cost with caching** - the actual cost after caching is applied.
* **Total savings** - the amount saved through caching.
* **Added latency** - the additional response time introduced by the optimization.

The dashboard also includes a **Cumulative cost** chart, which lets you compare costs with and without caching over time.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FrhbVAFJjosarbTZfzhHW%2Fimage.png?alt=media&amp;token=118e9a52-9fda-46a9-a8d1-e017f22297d6" alt=""><figcaption></figcaption></figure>

### How to use it?

Use the filters at the top of the page to analyze cost optimization for a specific period, user, team, or model. This helps you understand where optimization has the greatest impact.

1. Select a **time range**.
2. Filter by **users, teams, or models** if needed.
3. Review your **actual cost and estimated savings**.
4. Use the chart to compare how costs change over time.

### Optimization measures

The **Optimization measures** section shows the features nexos.ai uses or plans to use to help reduce AI costs.

**Cache optimization** reduces costs by taking advantage of cached prompt content when supported by the model provider. This can be especially useful when requests repeatedly contain the same instructions or context.

**Smart Router** and **Context Compression** will appear as **Coming soon** until they become available.


# Gateway Metrics

### Overview

The **Gateway Metrics** section gives you visibility into API Gateway usage, costs, and performance. Use it to monitor spending, analyze request and token usage, identify errors, and understand how your organization uses different AI models over time.

### Filter your data

Use the filters at the top of the page to focus the dashboard on the data that matters to you.

* **Time range** - Select the period you want to analyze.
* **Teams** - View metrics for specific teams.
* **Users** - Filter activity by user.
* **Models** - Analyze usage for selected AI models.
* **Team API Keys** - View activity associated with specific team API keys.
* **Key source** - Filter metrics based on the source of the API key.

The selected filters are applied across the Gateway Metrics dashboard.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FCZKZjw3dgPOaiStIf9oc%2Fimage.png?alt=media&amp;token=52a8a387-4cea-48f6-9a65-2d4a71ff1200" alt=""><figcaption></figcaption></figure>

### Monitor costs

The **Costs** section shows how your API Gateway spending changes over time.

Use it to review:

* **Billed cost** - Cost associated with usage billed through nexos.ai.
* **BYOK cost** - Cost associated with usage through your own provider API keys.
* **Cost trends** - Track how costs change over the selected period.
* **Top usage contributors** - See which teams, users, or models account for the highest costs.

You can switch between different views to analyze costs by model, user, or team.

### Monitor usage

The **Usage** section helps you understand how requests are processed through the Gateway.

At a glance, you can monitor **total completions, token usage, and completion errors**. The charts below show how these metrics change over time.

You can also analyze:

* **Completions** - Track the number of completed requests.
* **Token usage** - Monitor token consumption over time.
* **Completion rate** - See the rate of completion requests.
* **Completion errors** - Identify periods with increased request errors.

Where available, switch between **Total**, **Model**, or **Type** views to explore the data from different perspectives.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FIrQWLNwPjbd4xBOFFTxY%2FRecording%202026-10-20%20131433.gif?alt=media&amp;token=18b848bb-dd6c-419a-ac27-11a0ac191a29" alt="" width="438"><figcaption></figcaption></figure>

### Monitor image and audio usage

The **Images & Audio Statistics** section provides usage and error metrics for image and audio requests processed through the Gateway.

You can monitor:

* **Image completions** and **audio completions**.
* **Image requests** and **audio requests** over time.
* **Image errors** and **audio errors**.
* Usage by **model**, where applicable.

If there was no image or audio activity during the selected period, the corresponding charts will display **No data available**.


# How to use Smart Router

Smart Router is a nexos.ai feature that automatically routes each request to a suitable model. You can use it in the Claude Code terminal and the Claude Desktop app or Claude code IDe extension by pointing them at the nexos.ai API.

#### Quick reference

| **Setting**    | **Value**                                                               |
| -------------- | ----------------------------------------------------------------------- |
| API base URL   | <https://api.nexos.ai> (some tools need <https://api.nexos.ai/v1/>)     |
| Authentication | Your nexos.ai API key                                                   |
| Model          | auto-code (use auto-code\[1m] in Claude Code for the 1M context window) |

### Claude Code

Choose one of three setup options.

{% stepper %}
{% step %}

### Option 1: Global settings file

Applies to all projects.

1. Open \~/.claude/settings.json (macOS/Linux) **or** %USERPROFILE%\\.claude\settings.json (Windows).
2. Paste the following JSON content:

{% code lineNumbers="true" %}

```json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.nexos.ai",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_NEXOS_API_KEY>",
    "ANTHROPIC_API_KEY": "",
    "ANTHROPIC_MODEL": "auto-code[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "auto-code[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "auto-code[1m]",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "auto-code[1m]",
    "ANTHROPIC_DEFAULT_FABLE_MODEL": "auto-code[1m]",
    "CLAUDE_CODE_SUBAGENT_MODEL": "auto-code[1m]",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "DISABLE_TELEMETRY": "1",
    "DISABLE_ERROR_REPORTING": "1",
    "CLAUDE_CODE_PROMPT_CACHE_TTL": "1h",
    "ENABLE_TOOL_SEARCH":"true",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS":"1",
    "CLAUDE_CODE_AUTO_MODE_SERVER":"0"
  },
  "model": "auto-code[1m]",
  "theme": "auto"
}
```

{% endcode %}

{% hint style="info" %}
These parameters are optional but suggested to be used. They tell anthropic model to store cache for 1h instead of default 5 min. If smart router routes not to anthropic models, these params have no effect:

"CLAUDE\_CODE\_PROMPT\_CACHE\_TTL": "1h"

\
This param applicable with Claude Code >=2.1.280 :

"CLAUDE\_CODE\_AUTO\_MODE\_SERVER":"0"
{% endhint %}

3. Replace \<YOUR\_NEXOS\_API\_KEY> with your actual API key.
   {% endstep %}

{% step %}

### Option 2: Project-specific settings

Keeps the configuration inside one project.

1. In the project root, create a .claude folder if it doesn't exist. Add this folder to .gitignore so your key is not committed.
2. Inside it, create settings.json. Use settings.local.json if the folder is not in .gitignore.
3. Paste the same JSON shown below:

{% code lineNumbers="true" %}

```json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.nexos.ai",
    "ANTHROPIC_AUTH_TOKEN": "<YOUR_NEXOS_API_KEY>",
    "ANTHROPIC_API_KEY": "",
    "ANTHROPIC_MODEL": "auto-code[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "auto-code[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "auto-code[1m]",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "auto-code[1m]",
    "ANTHROPIC_DEFAULT_FABLE_MODEL": "auto-code[1m]",
    "CLAUDE_CODE_SUBAGENT_MODEL": "auto-code[1m]",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "DISABLE_TELEMETRY": "1",
    "DISABLE_ERROR_REPORTING": "1",
    "CLAUDE_CODE_PROMPT_CACHE_TTL": "1h",
    "ENABLE_TOOL_SEARCH":"true",
    "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS":"1",
    "CLAUDE_CODE_AUTO_MODE_SERVER":"0"
  },
  "model": "auto-code[1m]",
  "theme": "auto"
}
```

{% endcode %}

{% hint style="info" %}
These parameters are optional but suggested to be used. They tell anthropic model to store cache for 1h instead of default 5 min. If smart router routes not to anthropic models, these params have no effect:

"CLAUDE\_CODE\_PROMPT\_CACHE\_TTL": "1h"

\
This param applicable with Claude Code >=2.1.280 :

"CLAUDE\_CODE\_AUTO\_MODE\_SERVER":"0"
{% endhint %}

4. Replace \<YOUR\_NEXOS\_API\_KEY> with your actual API key.
   {% endstep %}

{% step %}

### Option 3: Shell environment variables (macOS/Linux)

Claude Code uses nexos.ai every time you run it in your terminal.

1. Open your shell configuration file, for example nano \~/.zshrc (macOS) or \~/.bashrc (Linux).

{% code lineNumbers="true" %}

```
nano ~/.zshrc
```

{% endcode %}

2. Add the following configuration at the end of the file:

{% code lineNumbers="true" %}

```
# Nexos AI Configuration for Claude Code
export ANTHROPIC_BASE_URL=https://api.nexos.ai
export ANTHROPIC_AUTH_TOKEN=<YOUR_NEXOS_API_KEY>
export ANTHROPIC_API_KEY=
export ANTHROPIC_MODEL=auto-code[1m]
export ANTHROPIC_DEFAULT_OPUS_MODEL=auto-code[1m]
export ANTHROPIC_DEFAULT_SONNET_MODEL=auto-code[1m]
export ANTHROPIC_DEFAULT_HAIKU_MODEL=auto-code[1m]
export ANTHROPIC_DEFAULT_FABLE_MODEL=auto-code[1m]
export CLAUDE_CODE_SUBAGENT_MODEL=auto-code[1m]
# Privacy and Performance Settings
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
export DISABLE_TELEMETRY=1
export DISABLE_ERROR_REPORTING=1
# This one parameter is optional but suggested to be used. It tells anthropic model to store cache for 1h instead of default 5 min. If auto-code routes not to anthropic models, this param has no effect
export CLAUDE_CODE_PROMPT_CACHE_TTL=1h
export ENABLE_TOOL_SEARCH=true
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1
# param if claude code version >=2.1.280
export CLAUDE_CODE_AUTO_MODE_SERVER=0
# leave commented or remove comment to allow auto updater on startup
```

{% endcode %}

3. Replace \<YOUR\_NEXOS\_API\_KEY> with your actual API key.
4. Save and exit. In nano, press Ctrl+O, Enter, then Ctrl+X.
5. Refresh to apply the changes:

<pre data-line-numbers><code><strong>source ~/.zshrc
</strong></code></pre>

{% hint style="info" %}

#### Notes on optional parameters:

* CLAUDE\_CODE\_PROMPT\_CACHE\_TTL is optional but recommended. It makes Anthropic models keep the prompt cache for 1 hour instead of the default 5 minutes. It has no effect when Smart Router routes to non-Anthropic models.
* CLAUDE\_CODE\_AUTO\_MODE\_SERVER applies only to Claude Code 2.1.280 or later.
  {% endhint %}
  {% endstep %}
  {% endstepper %}

### Claude Desktop app

To access custom model settings, you must first unlock the developer tools within the application.

{% stepper %}
{% step %}

### Step 1: Enable Developer Mode

* Open the Claude Desktop app.
* Navigate to the troubleshooting menu:
  * macOS: Help, then Troubleshooting.
  * Windows: Menu icon (three horizontal lines), then Help, then Troubleshooting.
* Click Enable Developer Mode and confirm. The app restarts in gateway mode.
* Open the troubleshooting menu again and repeat the enable step if prompted. A Developer item then appears in the top menu bar.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F8Gc2DTG8C8r3F7EVfT5e%2Fimage.png?alt=media&amp;token=e2e198c5-0d59-48b0-8be1-dbdec1f48a85" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Step 2: Open developer settings

* Click the Developer menu item at the top of the app.
* Select Configure third-party inference from the dropdown list.
  {% endstep %}

{% step %}

### Step 3: Configure nexos.ai connection

In the configuration window that appears, you will set up the link to the Nexos gateway.<br>

* Under the Connection section, create a new configuration.
* Enter the following details:
  * Type: Gateway
  * URL: <https://api.nexos.ai>
  * API Key: your nexos.ai API key
  * Auth Schema: select Bearer
* Save the connection.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F7CgjVXwn6tWeaHUzzCyw%2Fimage.png?alt=media&amp;token=434b2a5b-7576-4c4f-8cd8-24cb684464d5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FHRw8UHvIr6QAWvjNH9vU%2Fimage.png?alt=media&amp;token=58a1e199-9dd3-489c-a4fe-e134efba09de" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Step 4: Configure the Model

* Scroll to the Models section.&#x20;
* Model Discovery can be turned on, but manual entry is recommended for Smart Router.
* Click Add and enter:
  * Model ID: anthropic/auto-code
  * Display Name: Nexos Smart Router (or any name you prefer)
  * Parameters: turn on the 1M context window setting, or the one that fits your needs
* Set the model as Default to 1M to ensure this model is used for your new conversations.
* Restart the Claude app.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FfzEycgqudz4iBsJLucNP%2Fimage.png?alt=media&amp;token=0e0de018-0bf3-47ef-8289-f964ce5a169f" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Verify the setup

* Claude Desktop: Start a new chat. Your custom model name appears at the top of the chat window, which confirms requests go through api.nexos.ai.
* Claude Code: Start a session and check that the active model is auto-code\[1m].

### Security tips

* Never commit your API key. Keep project-level settings files in .gitignore.
* Use a separate API key for each tool or team so you can revoke one without affecting the others.


# Request types dashboard

The Request types dashboard gives you detailed visibility into your Gateway API usage by request type. See what your team is building, how much it costs, and which models are being used most.

### Where to find it

You can access the Request types dashboard from your Gateway platform:

{% stepper %}
{% step %}
Open nexos.ai **Gateway**.
{% endstep %}

{% step %}
In the left sidebar, select **Request types**.
{% endstep %}

{% step %}
You'll see all metrics and usage data.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Note**: You can only see request type data for teams, users, and API keys you have access to. Request type metrics respect your permissions.
{% endhint %}

### Filter and refine your view

At the top of the dashboard, use the filters to customize what you see:

* **Time range** - Select a date range to analyze usage over a specific period (e.g., last 7 days, last month).
* **Teams** - Filter to see usage from specific teams only.
* **Users** - Filter to see usage from specific users only.
* **Team API Keys** - Filter by which API key was used to make the requests.

Apply multiple filters at once to get very specific views of your usage.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F6uhFNhF55Wg0wrNKTjX6%2Fnexos_filter_buttons_clickable.gif?alt=media&amp;token=8a19a4e8-434d-4bf4-9eb8-6ed2c05adf0f" alt=""><figcaption></figcaption></figure>

### What you can see

The Request types dashboard shows several views of your API usage:

#### Summary cards

At the top, you'll see four key metrics:

* **Largest by spend** – which request type costs the most overall
* **Most requests** – which request type has the highest volume
* **Highest cost per request** – which request type is most expensive per call
* **Most popular agent** – the agent generating the most requests

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F5pVWujwP34cbHtet1r7E%2Fnexos_request_cards_clickable.gif?alt=media&amp;token=64a47cba-56ce-4a58-bf9f-d101cd0e84c3" alt=""><figcaption></figcaption></figure>

#### Requests by type (pie chart)

A breakdown of all requests by type, showing volume and percentage of total requests.

You can see:

* total requests in the period
* each request type as a colored segment
* the number of requests for each type
* what percentage each type represents

#### Requests by agent (pie chart)

Shows which agents are generating the most requests, helping you understand which AI agents are being used most heavily.

This includes:

* agents detected in your requests
* request count per agent
* percentage of total agent requests

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F85Z90PqYnRxeEh0OPC0X%2Fnexos_requests_by_agent.gif?alt=media&amp;token=fdc0dfc4-00b9-437d-a868-8b6bf4e3c9ed" alt=""><figcaption></figcaption></figure>

#### Share of requests vs share of spend

A comparison view showing how requests and spending align across request types.

This helps you identify:

* request types that are high-volume but low-cost
* request types that are low-volume but high-cost
* types that are more or less expensive than average

Each row shows:

* Request type
* Share of requests (light bar)
* Share of spend (dark bar)
* Cost (dollar amount)

If the spend bar is longer than the request bar, that type costs more than average per request.

#### Spend mix over time

A stacked area chart showing how your spending breaks down across request types over the selected time period.

This shows:

* 100% stacked share of spend
* changes in spending composition day by day
* which types are growing or shrinking

#### Request types detailed table

A comprehensive table listing each request type with detailed metrics:

* Request type – the name and category
* Requests – total number of requests (with trend indicator)
* Cost per 1K requests – the price per thousand requests
* Input tokens – total tokens sent to the model
* Output tokens – total tokens received from the model
* Top model by spend – which model used most for this type
* Share of spend – percentage of total spending

You can sort by any column and click into a request type for more details.

### Dive deeper into request types

Click on any request type row to see more detailed information:

* request sub-types (if applicable)
* which teams or users are using it most
* which models are preferred for that type
* cost trends over time

### View usage by team

Scroll down to see a Request types by team heatmap. This shows:

* each team as a row
* each request type as a column
* the percentage of that team's requests that are each type
* darker cells indicate a larger share

This helps you understand which teams are using which request types.

### Common use cases

* **Monitor cost drivers –** Use the Share of requests vs share of spend view to identify request types that cost more than you'd expect and optimize accordingly.
* **Track agent adoption –** Use the Requests by agent view to see which agents are in heavy use and which are underutilized.
* **Understand team usage patterns** – Use the Request types by team view to see if usage patterns differ across teams and identify opportunities for standardization.
* **Analyze spending trends** – Use the Spend mix over time chart to see if spending composition is changing over time and what's driving the change.
* **Optimize costs** – Use the Cost per 1K requests column to identify expensive request types and consider optimization opportunities.

### FAQ

**What counts as a request?**\
A request is counted each time an API call is made to the Gateway. Only completions, messages, and responses requests are classified into specific types. Everything else shows as Unclassified.

**Why is my request type showing as Unclassified?**\
Unclassified requests don't fit into standard request type categories, typically health checks, metadata calls, or requests too ambiguous to classify. A small percentage is normal.

**How often is the data updated?**\
Dashboard data updates in real time as requests are processed through the Gateway.

**Can I compare request types across different time periods?**\
Yes. You can change the time range filter to see how usage and spending have changed over time.

**What's the difference between input and output tokens?**\
Input tokens are the tokens in your prompt or request. Output tokens are the tokens in the model's response. The sum of both determines the cost of the request.

**Can I export this data?**\
Yes. Look for an export button on the dashboard to download usage data for further analysis.

<br>

<br>


# Gateway Logs

### Overview

The **Gateway Logs** section provides a detailed view of requests processed through the nexos.ai API Gateway. Use it to inspect individual requests, troubleshoot issues, monitor performance, and understand how models and API keys are being used.

Each log entry contains information about a specific request, such as the model used, request status, cost, duration, and API key source.

### Filter gateway logs

Use the filters at the top of the page to find specific requests or narrow down the logs you want to investigate.

You can filter logs by:

* **Time range** - Show requests from a specific period.
* **Models** - View requests sent to selected models.
* **Users** - Filter requests by user.
* **Teams** - View requests associated with specific teams.
* **Team API Keys** - Filter by the API key used to make a request.
* **Key source** - Filter requests based on where the API key comes from.

Use **Clear filters** to return to the default view.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FSmLZvlXk56x0STksVsG8%2Fimage.png?alt=media&amp;token=fcc19f3d-c832-4cec-bc48-a02216a10bb4" alt=""><figcaption></figcaption></figure>

### Explore request details

The logs table gives you an overview of individual Gateway requests. Use it to identify requests you want to investigate further.

Depending on the available data and selected columns, you can review information such as:

* **ID** - A unique identifier for the request.
* **Start time** - When the request was initiated.
* **Operation name** - The type of operation performed.
* **Status** - The current or final request status.
* **Model** - The model used to process the request.
* **Cost** - The cost associated with the request.
* **Duration** - How long the request took to complete.
* **API key name** - The API key associated with the request.
* **Key source** - Where the API key originated.

This information can help you investigate failed or slow requests and understand usage at the individual request level.

### Customize columns

Click **Columns** to choose which information is displayed in the Gateway Logs table. This lets you focus on the fields that are most relevant to your current task.

For example, when investigating performance, you can focus on **Status, Model, and Duration**. For usage analysis, you may want to include **API key name** and **Key source**.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FXCdlpWD8HP8W6dE1UDG6%2FRecording%202026-10-20%20134221.gif?alt=media&amp;token=3df517d6-8a8d-4863-8c47-10e03f8c7762" alt=""><figcaption></figcaption></figure>


# Chat

Generate a response from conversation messages.

## Create chat completion

> Generate a response from conversation messages.\
> \
> Parameter support varies by model: requests are validated by the upstream provider,\
> and parameters a given model does not support (for example \`temperature\` values other\
> than the default, \`top\_p\`, \`stop\`, \`logprobs\`, \`logit\_bias\`, or the penalty parameters\
> on reasoning models) are rejected with a \`400\` error. \`stream\_options\` is only allowed\
> together with \`stream: true\`.\
> \
> \`store: true\` is only honored if storing is enabled for the company - a company-level\
> setting that is off by default. When the setting is off, responses are not stored\
> regardless of the \`store\` value sent.<br>

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Chat","description":"Generate a response from conversation messages."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"ChatCompletionsRequest":{"type":"object","properties":{"messages":{"description":"A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, images, and audio.\n","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessage"}},"model":{"type":"string","description":"Model name, UUID, or agent UUID."},"store":{"type":"boolean","description":"Whether or not to store the output of this chat completion request\n\n`store: true` is only honored if storing is enabled for the company - a company-level setting that is off by default. When the setting is off, the output is not stored regardless of the `store` value sent.\n"},"metadata":{"type":"object","description":"Developer-defined tags and values used for filtering completions\nin the dashboard.\n","additionalProperties":{"type":"string"}},"frequency_penalty":{"type":"number","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n"},"logit_bias":{"type":"object","additionalProperties":{"type":"integer"},"description":"Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n"},"logprobs":{"description":"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.","type":"boolean"},"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.","type":"integer","minimum":0,"maximum":20},"max_tokens":{"description":"The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is not compatible with o1 series models.\n","type":"integer","nullable":true,"deprecated":true},"max_completion_tokens":{"description":"An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.\n","type":"integer","nullable":true},"n":{"type":"integer","minimum":1,"maximum":128,"default":1,"description":"How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs."},"modalities":{"$ref":"#/components/schemas/ChatCompletionModalities"},"prediction":{"description":"Configuration for a Predicted Output,\nwhich can greatly improve response times when large parts of the model\nresponse are known ahead of time. This is most common when you are\nregenerating a file with only minor changes to most of the content.\n","oneOf":[{"$ref":"#/components/schemas/PredictionContent"}]},"audio":{"type":"object","description":"Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`.\n","required":["voice","format"],"properties":{"voice":{"type":"string","enum":["alloy","ash","ballad","coral","echo","sage","shimmer","verse"],"description":"The voice the model uses to respond. Supported voices are `alloy`,\n`ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.\n"},"format":{"type":"string","enum":["wav","mp3","flac","opus","pcm16"],"description":"Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.\n"}}},"presence_penalty":{"type":"number","default":0,"minimum":-2,"maximum":2,"description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n"},"response_format":{"description":"An object specifying the format that the model must output. Compatible with GPT-4o, GPT-4o mini, GPT-4 Turbo and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema.\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n","oneOf":[{"$ref":"#/components/schemas/ResponseFormatText"},{"$ref":"#/components/schemas/ResponseFormatJsonObject"},{"$ref":"#/components/schemas/ResponseFormatJsonSchema"}]},"seed":{"type":"integer","minimum":-9223372036854776000,"maximum":9223372036854776000,"description":"This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n"},"service_tier":{"description":"Specifies the processing type used for serving the request.\nIf set to 'default' or 'auto', then the request will be processed with the standard pricing and performance for the selected model.\nIf set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.\nWhen not set, the default behavior is 'auto'.\nWhen the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.\n","type":"string","enum":["auto","default","flex","scale","priority"],"default":"auto"},"stop":{"description":"Up to 4 sequences where the API will stop generating further tokens.\n","oneOf":[{"type":"string"},{"type":"array","minItems":1,"maxItems":4,"items":{"type":"string"}}]},"stream":{"description":"If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. Chunks follow the OpenAI `chat.completion.chunk` format; the final chunk additionally carries `usage` (with `nexos_credits_cost`), and some providers include a nexos `latency_checkpoint` object with detailed timing metrics. Note: Gemini-backed streams currently end without the `data: [DONE]` terminator.\n","type":"boolean"},"stream_options":{"$ref":"#/components/schemas/ChatCompletionStreamOptions"},"temperature":{"type":"number","minimum":0,"maximum":2,"default":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.\n"},"top_p":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.\n"},"tools":{"type":"array","description":"A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.\n","items":{"$ref":"#/components/schemas/ChatCompletionTool"}},"tool_choice":{"$ref":"#/components/schemas/ChatCompletionToolChoiceOption"},"parallel_tool_calls":{"$ref":"#/components/schemas/ParallelToolCalls"},"function_call":{"deprecated":true,"description":"Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.\n","oneOf":[{"type":"string","description":"`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.\n","enum":["none","auto"]},{"$ref":"#/components/schemas/ChatCompletionFunctionCallOption"}]},"functions":{"deprecated":true,"description":"Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n","type":"array","minItems":1,"maxItems":128,"items":{"$ref":"#/components/schemas/ChatCompletionFunctions"}},"thinking":{"type":"object","properties":{"type":{"type":"string","description":"The type of thinking configuration"},"budget_tokens":{"type":"integer","description":"The token budget allocation for thinking operations"}}},"reasoning_effort":{"type":"string","description":"Reasoning effort for models that support reasoning.","enum":["none","minimal","low","medium","high","xhigh","max"]},"verbosity":{"type":"string","description":"Constrains the verbosity of the model's response.","enum":["low","medium","high"]},"cached_content":{"type":"string","description":"(Google Gemini only) The resource name of a previously created cached content to use as context for this request (e.g. \"cachedContents/abc123\").\n"}},"required":["model","messages"]},"chat_completions_messages_ChatCompletionRequestMessage":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionRequestDeveloperMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestSystemMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestUserMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestAssistantMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestToolMessage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestFunctionMessage"}]},"ChatCompletionRequestDeveloperMessage":{"type":"object","title":"Developer message","description":"Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, `developer` messages\nreplace the previous `system` messages.\n","properties":{"content":{"description":"The contents of the developer message.","oneOf":[{"type":"string","description":"The contents of the developer message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. For developer messages, only type `text` is supported.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"},"minItems":1}]},"role":{"type":"string","enum":["developer"],"description":"The role of the messages author, in this case `developer`."},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role."}},"required":["content","role"]},"chat_completions_messages_ChatCompletionRequestMessageContentPartText":{"type":"object","title":"Text content part","description":"Learn about [text inputs](/docs/guides/text-generation).\n","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part."},"text":{"type":"string","description":"The text content."}},"required":["type","text"]},"chat_completions_messages_ChatCompletionRequestSystemMessage":{"type":"object","title":"System message","description":"Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, use `developer` messages\nfor this purpose instead.\n","properties":{"content":{"description":"The contents of the system message.","oneOf":[{"type":"string","description":"The contents of the system message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. For system messages, only type `text` is supported.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestSystemMessageContentPart"},"minItems":1}]},"role":{"type":"string","enum":["system"],"description":"The role of the messages author, in this case `system`."},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role."}},"required":["content","role"]},"chat_completions_messages_ChatCompletionRequestSystemMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"}]},"chat_completions_messages_ChatCompletionRequestUserMessage":{"type":"object","title":"User message","description":"Messages sent by an end user, containing prompts or additional context\ninformation.\n","properties":{"content":{"description":"The contents of the user message.\n","oneOf":[{"type":"string","description":"The text contents of the message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. Supported options differ based on the [model](/docs/models) being used to generate the response. Can contain text, image, or audio inputs.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestUserMessageContentPart"},"minItems":1}]},"role":{"type":"string","enum":["user"],"description":"The role of the messages author, in this case `user`."},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role."}},"required":["content","role"]},"chat_completions_messages_ChatCompletionRequestUserMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartImage"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartAudio"}]},"chat_completions_messages_ChatCompletionRequestMessageContentPartImage":{"type":"object","title":"Image content part","description":"Learn about [image inputs](/docs/guides/vision).\n","properties":{"type":{"type":"string","enum":["image_url"],"description":"The type of the content part."},"image_url":{"type":"object","properties":{"url":{"type":"string","description":"Either a URL of the image or the base64 encoded image data.","format":"uri"},"detail":{"type":"string","description":"Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision#low-or-high-fidelity-image-understanding).","enum":["auto","low","high"],"default":"auto"}},"required":["url"]}},"required":["type","image_url"]},"chat_completions_messages_ChatCompletionRequestMessageContentPartAudio":{"type":"object","title":"Audio content part","description":"Learn about [audio inputs](/docs/guides/audio).\n","properties":{"type":{"type":"string","enum":["input_audio"],"description":"The type of the content part. Always `input_audio`."},"input_audio":{"type":"object","properties":{"data":{"type":"string","description":"Base64 encoded audio data."},"format":{"type":"string","enum":["wav","mp3"],"description":"The format of the encoded audio data. Currently supports \"wav\" and \"mp3\".\n"}},"required":["data","format"]}},"required":["type","input_audio"]},"chat_completions_messages_ChatCompletionRequestAssistantMessage":{"type":"object","title":"Assistant message","description":"Messages sent by the model in response to user messages.\n","properties":{"content":{"nullable":true,"oneOf":[{"type":"string","description":"The contents of the assistant message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestAssistantMessageContentPart"},"minItems":1}],"description":"The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n"},"refusal":{"nullable":true,"type":"string","description":"The refusal message by the assistant."},"role":{"type":"string","enum":["assistant"],"description":"The role of the messages author, in this case `assistant`."},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role."},"audio":{"type":"object","nullable":true,"description":"Data about a previous audio response from the model. \n[Learn more](/docs/guides/audio).\n","required":["id"],"properties":{"id":{"type":"string","description":"Unique identifier for a previous audio response from the model.\n"}}},"tool_calls":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionMessageToolCalls"},"function_call":{"type":"object","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","nullable":true,"properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."},"name":{"type":"string","description":"The name of the function to call."}},"required":["arguments","name"]}},"required":["role"]},"chat_completions_messages_ChatCompletionRequestAssistantMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"},{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartRefusal"}]},"chat_completions_messages_ChatCompletionRequestMessageContentPartRefusal":{"type":"object","title":"Refusal content part","properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the content part."},"refusal":{"type":"string","description":"The refusal message generated by the model."}},"required":["type","refusal"]},"chat_completions_messages_ChatCompletionMessageToolCalls":{"type":"array","description":"The tool calls generated by the model, such as function calls.","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionMessageToolCall"}},"chat_completions_messages_ChatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."}},"required":["name","arguments"]}},"required":["id","type","function"]},"chat_completions_messages_ChatCompletionRequestToolMessage":{"type":"object","title":"Tool message","properties":{"role":{"type":"string","enum":["tool"],"description":"The role of the messages author, in this case `tool`."},"content":{"oneOf":[{"type":"string","description":"The contents of the tool message.","title":"Text content"},{"type":"array","description":"An array of content parts with a defined type. For tool messages, only type `text` is supported.","title":"Array of content parts","items":{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestToolMessageContentPart"},"minItems":1}],"description":"The contents of the tool message."},"tool_call_id":{"type":"string","description":"Tool call that this message is responding to."}},"required":["role","content","tool_call_id"]},"chat_completions_messages_ChatCompletionRequestToolMessageContentPart":{"oneOf":[{"$ref":"#/components/schemas/chat_completions_messages_ChatCompletionRequestMessageContentPartText"}]},"chat_completions_messages_ChatCompletionRequestFunctionMessage":{"type":"object","title":"Function message","deprecated":true,"properties":{"role":{"type":"string","enum":["function"],"description":"The role of the messages author, in this case `function`."},"content":{"nullable":true,"type":"string","description":"The contents of the function message."},"name":{"type":"string","description":"The name of the function to call."}},"required":["role","content","name"]},"ChatCompletionModalities":{"type":"array","description":"Output types that you would like the model to generate for this request.\nMost models are capable of generating text, which is the default:\n\n`[\"text\"]`\n\nTo request that this model generate both text and audio responses, you can use:\n\n`[\"text\", \"audio\"]`\n","items":{"type":"string","enum":["text","audio"]}},"PredictionContent":{"type":"object","title":"Static Content","description":"Static predicted output content, such as the content of a text file that is being regenerated.\n","required":["type","content"],"properties":{"type":{"type":"string","enum":["content"],"description":"The type of the predicted content you want to provide. This type is\ncurrently always `content`.\n"},"content":{"description":"The content that should be matched when generating a model response.\nIf generated tokens would match this content, the entire model response\ncan be returned much more quickly.\n","oneOf":[{"type":"string","title":"Text content","description":"The content used for a Predicted Output. This is often the\ntext of a file you are regenerating with minor changes.\n"},{"type":"array","description":"An array of content parts with a defined type. Supported options differ based on the [model](/docs/models) being used to generate the response. Can contain text inputs.","title":"Array of content parts","items":{"$ref":"#/components/schemas/ChatCompletionRequestMessageContentPartText"},"minItems":1}]}}},"ChatCompletionRequestMessageContentPartText":{"type":"object","title":"Text content part","properties":{"type":{"type":"string","enum":["text"],"description":"The type of the content part."},"text":{"type":"string","description":"The text content."}},"required":["type","text"]},"ResponseFormatText":{"type":"object","properties":{"type":{"type":"string","description":"The type of response format being defined: `text`","enum":["text"]}},"required":["type"]},"ResponseFormatJsonObject":{"type":"object","properties":{"type":{"type":"string","description":"The type of response format being defined: `json_object`","enum":["json_object"]}},"required":["type"]},"ResponseFormatJsonSchema":{"type":"object","properties":{"type":{"type":"string","description":"The type of response format being defined: `json_schema`","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the response format is for, used by the model to determine how to respond in the format."},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"schema":{"$ref":"#/components/schemas/ResponseFormatJsonSchemaSchema"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](/docs/guides/structured-outputs)."}},"required":["type","name"]}},"required":["type","json_schema"]},"ResponseFormatJsonSchemaSchema":{"type":"object","description":"The schema for the response format, described as a JSON Schema object.","additionalProperties":true},"ChatCompletionStreamOptions":{"description":"Options for streaming response. Only set this when you set `stream: true`.\n","type":"object","properties":{"include_usage":{"type":"boolean","description":"If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value\n"}}},"ChatCompletionTool":{"type":"object","properties":{"type":{"type":"string","enum":["function","web_search","rag","tika_ocr"],"description":"The type of the tool. Supports `function`, `web_search`, `rag` and `tika_ocr`."},"function":{"$ref":"#/components/schemas/FunctionObject"},"web_search":{"$ref":"#/components/schemas/ChatCompletionWebSearch"},"rag":{"$ref":"#/components/schemas/ChatCompletionRAG"},"tika_ocr":{"$ref":"#/components/schemas/ChatCompletionTikaOCR"}},"required":["type"]},"FunctionObject":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function."},"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"parameters":{"$ref":"#/components/schemas/FunctionParameters"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`."}},"required":["name"]},"FunctionParameters":{"type":"object","description":"The parameters the functions accepts, described as a JSON Schema object.\nOmitting `parameters` defines a function with an empty parameter list.","additionalProperties":true},"ChatCompletionWebSearch":{"type":"object","description":"The web search that the model called.","properties":{"search_context_size":{"type":"string","description":"High level guidance for the amount of context window space to use for the search.","enum":["low","medium","high"]},"user_location":{"$ref":"#/components/schemas/UserLocation"},"mcp":{"$ref":"#/components/schemas/WebSearchMCP"}}},"UserLocation":{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"The type of location approximation.","enum":["approximate"]},"city":{"type":"string","description":"The city to use for the location approximation."},"country":{"type":"string","description":"The two-letter ISO country code of the user."},"region":{"type":"string","description":"Free text input for the region of the user."},"timezone":{"type":"string","description":"The IANA timezone of the user."}}},"WebSearchMCP":{"type":"object","description":"Custom MCP web_search","required":["type","options`"],"properties":{"type":{"type":"string","description":"The type of the web search.","enum":["url","query"]},"options":{"oneOf":[{"$ref":"#/components/schemas/QuerySearch"},{"$ref":"#/components/schemas/URLSearch"}]}}},"QuerySearch":{"type":"object","required":["tool","query"],"properties":{"tool":{"type":"string","description":"The type of tool used for web search.","enum":["google_search","bing_search","amazon_search"]},"query":{"type":"string","description":"The query to search for."},"geo_location":{"type":"string","description":"The geographic location to use for the search."},"parse":{"type":"boolean","description":"Whether to parse the search results.","default":false}}},"URLSearch":{"type":"object","required":["tool","url"],"properties":{"tool":{"type":"string","description":"The type of the web search.","enum":["universal"]},"url":{"type":"string","description":"The URL to search for."},"geo_location":{"type":"string","description":"The geographic location to use for the search."},"parse":{"type":"boolean","description":"Whether to parse the search results.","default":false}}},"ChatCompletionRAG":{"type":"object","description":"RAG tool call","properties":{"mcp":{"$ref":"#/components/schemas/RagMCP"}}},"RagMCP":{"type":"object","description":"RAG MCP tool call","required":["collection_uuid"],"properties":{"collection_uuid":{"type":"string","description":"The UUID of the collection to search."},"query":{"type":"string","description":"The query to search for."},"threshold":{"type":"number","format":"float","description":"The threshold for the search results."},"top_n":{"type":"integer","description":"The number of top results to return."},"model_uuid":{"type":"string","description":"The UUID of the model to use for the search."}}},"ChatCompletionTikaOCR":{"type":"object","description":"Tika OCR that the model called.","properties":{"file_id":{"type":"string"}},"required":["file_id"]},"ChatCompletionToolChoiceOption":{"description":"Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or more tools.\n`required` means the model must call one or more tools.\nSpecifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n\n`none` is the default when no tools are present. `auto` is the default if tools are present.\n","oneOf":[{"type":"string","description":"`none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools.\n","enum":["none","auto","required"]},{"$ref":"#/components/schemas/ChatCompletionNamedToolChoice"}]},"ChatCompletionNamedToolChoice":{"type":"object","description":"Specifies a tool the model should use. Use to force the model to call a specific function.","properties":{"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","properties":{"name":{"type":"string","description":"The name of the function to call."}},"required":["name"]}},"required":["type","function"]},"ParallelToolCalls":{"description":"Whether to enable parallel function calling during tool use.","type":"boolean","default":true},"ChatCompletionFunctionCallOption":{"type":"object","description":"Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n","properties":{"name":{"type":"string","description":"The name of the function to call."}},"required":["name"]},"ChatCompletionFunctions":{"type":"object","properties":{"description":{"type":"string","description":"A description of what the function does, used by the model to choose when and how to call the function."},"name":{"type":"string","description":"The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."},"parameters":{"$ref":"#/components/schemas/FunctionParameters"}},"required":["name"]},"ChatCompletionFinishReason":{"type":"string","description":"The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n\nWhen extended thinking is requested (`thinking` parameter) for an Anthropic-backed model, the response is returned in Anthropic-native form and this field carries Anthropic stop reasons instead: `end_turn`, `max_tokens`, `stop_sequence`, `tool_use`, `pause_turn`, or `refusal`. Without `thinking`, Anthropic-backed responses are translated to the standard values above.\n","enum":["stop","length","tool_calls","content_filter","function_call","end_turn","max_tokens","stop_sequence","tool_use","pause_turn","refusal"]},"ChatCompletionResponseMessage":{"type":"object","description":"A chat completion message generated by the model.","properties":{"content":{"description":"The contents of the message. When extended thinking is requested (`thinking` parameter) for an Anthropic-backed model, this is an array of Anthropic-native content blocks (`thinking` and `text`) instead of a string, since thinking blocks cannot be represented in the standard shape.\n","oneOf":[{"type":"string","nullable":true,"title":"Text content","description":"The contents of the message."},{"type":"array","title":"Anthropic-native content blocks","description":"Returned when extended thinking is requested for an Anthropic-backed model, e.g. `{\"type\": \"thinking\", \"thinking\": \"...\"}` followed by `{\"type\": \"text\", \"text\": \"...\"}`.\n","items":{"type":"object"}}]},"refusal":{"type":"string","description":"The refusal message generated by the model.","nullable":true},"tool_calls":{"$ref":"#/components/schemas/ChatCompletionMessageToolCalls"},"role":{"type":"string","enum":["assistant"],"description":"The role of the author of this message."},"function_call":{"type":"object","deprecated":true,"description":"Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.","properties":{"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."},"name":{"type":"string","description":"The name of the function to call."}},"required":["name","arguments"]},"audio":{"type":"object","nullable":true,"description":"If the audio output modality is requested, this object contains data\nabout the audio response from the model. [Learn more](/docs/guides/audio).\n","required":["id","expires_at","data","transcript"],"properties":{"id":{"type":"string","description":"Unique identifier for this audio response."},"expires_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.\n"},"data":{"type":"string","description":"Base64 encoded audio bytes generated by the model, in the format\nspecified in the request.\n"},"transcript":{"type":"string","description":"Transcript of the audio generated by the model."}}},"annotations":{"type":"array","description":"Annotations for the message, when applicable, as when using the web search tool.","items":{"$ref":"#/components/schemas/Annotation"}}},"required":["role","content","refusal"]},"ChatCompletionMessageToolCalls":{"type":"array","description":"The tool calls generated by the model, such as function calls.","items":{"$ref":"#/components/schemas/ChatCompletionMessageToolCall"}},"ChatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the tool call."},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","description":"The function that the model called.","properties":{"name":{"type":"string","description":"The name of the function to call."},"arguments":{"type":"string","description":"The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."}},"required":["name","arguments"]}},"required":["id","type","function"]},"Annotation":{"type":"object","properties":{"type":{"type":"string","description":"The type of the URL citation. Always url_citation."},"url_citation":{"$ref":"#/components/schemas/URLCitation"}}},"URLCitation":{"type":"object","description":"A URL citation when using web search.","properties":{"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."},"url":{"type":"string","description":"The URL of the web resource."}}},"ChatCompletionTokenLogprob":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.\n","type":"number"},"bytes":{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.\n","type":"array","items":{"type":"integer"},"nullable":true},"top_logprobs":{"description":"List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.\n","type":"array","items":{"type":"object","properties":{"token":{"description":"The token.","type":"string"},"logprob":{"description":"The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.\n","type":"number"},"bytes":{"description":"A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.\n","type":"array","items":{"type":"integer"},"nullable":true}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]},"NexosFallback":{"type":"object","description":"Present only when the originally requested model failed and configured fallback models were tried. On a successful response the fallback model identified by `served_model_id` served it; on streaming responses it appears on the chunk carrying the first non-null `finish_reason`. When every fallback also failed, the error body carries it too, with `served_model_id` set to the last fallback model that was tried. Nexos extension.\n","properties":{"reason":{"type":"string","description":"Why the originally requested model did not answer. One of the fixed values `timeout`, `canceled` or `error` for non-HTTP failures, or `http_<status>` where `<status>` is the HTTP status code returned by the requested model (e.g. `http_400`, `http_429`). Always describes the failure that started the fallback chain, never the failure of a later fallback model.\n"},"requested_model_id":{"type":"string","description":"The company model UUID that was originally requested."},"served_model_id":{"type":"string","description":"The company model UUID that served this response (on an error body, the last fallback model that was tried). Same value as the `X-Nexos-Model-Id` response header and `nexos_model_uuid`.\n"},"attempts":{"type":"integer","description":"Number of models tried, including the originally requested one. Retries across providers within one model are not counted.\n"},"provider_error":{"description":"The provider error body returned by the originally requested model. Present only when `reason` is `http_400`. Embedded as an object when the body was JSON, otherwise as a string.\n","oneOf":[{"type":"object"},{"type":"string"}]}}},"CostSavings":{"type":"object","description":"Cost savings for this request, in the same unit as `usage.nexos_credits_cost`.\n`baseline_cost` is what the request would have cost without nexos optimizations; it equals\n`charged_cost` plus every non-null saving. A saving is `null` when its optimization did not\napply to the request, and `0` when it applied but saved nothing. Nexos extension.\n","properties":{"baseline_cost":{"type":"number","format":"double","description":"Cost the request would have had without nexos optimizations."},"charged_cost":{"type":"number","format":"double","description":"Cost actually charged for the request. Same value as `usage.nexos_credits_cost`."},"cache_optimization":{"type":"number","format":"double","nullable":true,"description":"Saving from prompt cache breakpoints injected by the nexos optimizer. Negative when writing the cache cost more than it saved on this request (cache writes are billed above the normal input rate); later cache reads recover it. `null` when the optimizer did not inject cache control."},"nexos_cache":{"type":"number","format":"double","nullable":true,"description":"Saving from serving the response from the nexos response cache. `null` when the response was not served from cache."}},"required":["baseline_cost","charged_cost","cache_optimization","nexos_cache"]},"ChatCompletionServiceTier":{"description":"The service tier used for processing the request. This field is only included if the `service_tier` parameter is specified in the request. The value may differ from the `service_tier` parameter sent in the request. For example, if 'auto' is specified, the response will return 'default' as they are equivalent.\n","type":"string","enum":["auto","default","flex","scale","priority"],"nullable":true},"ChatCompletionObject":{"type":"string","description":"The object type, which is always `chat.completion`.","enum":["chat.completion"]},"CompletionUsage":{"type":"object","description":"Usage statistics for the completion request.","properties":{"completion_tokens":{"type":"integer","description":"Number of tokens in the generated completion."},"prompt_tokens":{"type":"integer","description":"Number of tokens in the prompt."},"total_tokens":{"type":"integer","description":"Total number of tokens used in the request (prompt + completion)."},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."},"completion_tokens_details":{"type":"object","description":"Breakdown of tokens used in a completion.","properties":{"accepted_prediction_tokens":{"type":"integer","description":"When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n"},"audio_tokens":{"type":"integer","description":"Audio input tokens generated by the model."},"reasoning_tokens":{"type":"integer","description":"Tokens generated by the model for reasoning."},"rejected_prediction_tokens":{"type":"integer","description":"When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits.\n"},"image_tokens":{"type":"integer","description":"Image output tokens generated by the model. Returned by some providers."}}},"prompt_tokens_details":{"type":"object","description":"Breakdown of tokens used in the prompt.","properties":{"audio_tokens":{"type":"integer","description":"Audio input tokens present in the prompt."},"cached_tokens":{"type":"integer","description":"Cached tokens present in the prompt."},"cache_write_tokens":{"type":"integer","description":"Tokens written to the prompt cache. Nexos extension."},"image_tokens":{"type":"integer","description":"Image input tokens present in the prompt. Returned by some providers."}}},"cache_creation_input_tokens":{"type":"integer","nullable":true,"description":"Input tokens stored into the prompt cache during this request. Returned for Anthropic-backed models (provider passthrough).\n"},"cache_read_input_tokens":{"type":"integer","nullable":true,"description":"Input tokens read back from the prompt cache. Returned for Anthropic-backed models (provider passthrough).\n"},"cache_creation":{"type":"object","nullable":true,"description":"Breakdown of cache-write tokens split by cache lifetime tier. Returned for Anthropic-backed models (provider passthrough).\n","properties":{"ephemeral_5m_input_tokens":{"type":"integer"},"ephemeral_1h_input_tokens":{"type":"integer"}}}},"required":["prompt_tokens","completion_tokens","total_tokens"]}},"responses":{"ChatCompletionsResponse":{"description":"Represents a chat completion response returned by model, based on the provided input.\n","headers":{"X-Nexos-Completion-Time-Ms":{"schema":{"type":"integer"},"description":"Time in milliseconds that server took for completion"},"X-Nexos-Model-Id":{"schema":{"type":"string"},"description":"Model ID that was user to perform the completion"},"X-Session-Id":{"schema":{"type":"string"},"description":"Session identifier the request was grouped under, resolved from the first usable of: the `X-Session-Id`, `X-Claude-Code-Session-Id`, `session-id`, or `thread-id` request header; otherwise a fingerprint (`fp1_...`) derived from the authenticated company, user, and team identity and the first user message. Send it back as `X-Session-Id` to keep later requests in the same session. Omitted when no session can be determined."}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat completion."},"choices":{"type":"array","description":"A list of chat completion choices. Can be more than one if `n` is greater than 1.\n","items":{"type":"object","required":["finish_reason","index","message","logprobs"],"properties":{"finish_reason":{"$ref":"#/components/schemas/ChatCompletionFinishReason"},"index":{"type":"integer","description":"The index of the choice in the list of choices."},"message":{"$ref":"#/components/schemas/ChatCompletionResponseMessage"},"content_filter_results":{"type":"object","description":"Content-filter annotations for this choice, passed through from the upstream provider (returned by Azure-hosted models).\n"},"logprobs":{"description":"Log probability information for the choice.","type":"object","properties":{"content":{"description":"A list of message content tokens with log probability information.","type":"array","items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"nullable":true},"refusal":{"description":"A list of message refusal tokens with log probability information.","type":"array","items":{"$ref":"#/components/schemas/ChatCompletionTokenLogprob"},"nullable":true}},"required":["content","refusal"]}}}},"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the chat completion was created."},"model":{"type":"string","description":"The model used for the chat completion."},"nexos_model_uuid":{"type":"string","description":"The nexos model identifier (company model UUID) used for the chat completion. Same value as the `X-Nexos-Model-Id` response header; can be passed as `model` in subsequent requests. Nexos extension."},"nexos_model_name":{"type":"string","description":"The nexos model name used for the chat completion (the value accepted as `model` in subsequent requests). Nexos extension."},"nexos_fallback":{"$ref":"#/components/schemas/NexosFallback"},"cost_savings":{"$ref":"#/components/schemas/CostSavings"},"service_tier":{"$ref":"#/components/schemas/ChatCompletionServiceTier"},"system_fingerprint":{"type":"string","description":"This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n"},"object":{"$ref":"#/components/schemas/ChatCompletionObject"},"usage":{"$ref":"#/components/schemas/CompletionUsage"},"provider":{"type":"string","description":"The upstream provider that served the request (e.g. `vertex-ai`). Returned for provider-passthrough responses.\n"},"prompt_filter_results":{"type":"array","description":"Prompt content-filter annotations passed through from the upstream provider (returned by Azure-hosted models).\n","items":{"type":"object","properties":{"prompt_index":{"type":"integer"},"content_filter_results":{"type":"object"}}}}},"required":["choices","created","id","model","object"]}}}},"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/chat/completions":{"post":{"tags":["Chat"],"operationId":"post-chat-completions-v1","summary":"Create chat completion","description":"Generate a response from conversation messages.\n\nParameter support varies by model: requests are validated by the upstream provider,\nand parameters a given model does not support (for example `temperature` values other\nthan the default, `top_p`, `stop`, `logprobs`, `logit_bias`, or the penalty parameters\non reasoning models) are rejected with a `400` error. `stream_options` is only allowed\ntogether with `stream: true`.\n\n`store: true` is only honored if storing is enabled for the company - a company-level\nsetting that is off by default. When the setting is off, responses are not stored\nregardless of the `store` value sent.\n","parameters":[{"in":"header","name":"X-Session-Id","required":false,"schema":{"type":"string","maxLength":256},"description":"Optional client-provided identifier for grouping requests into a session. Leading and\ntrailing whitespace is trimmed; blank values, values longer than 256 bytes, and values\nwith non-printable or non-ASCII characters are ignored. Takes precedence over\n`X-Claude-Code-Session-Id`, `session-id`, and `thread-id`. When none of these headers has\na usable value, a session fingerprint is derived from the first message and the\nauthenticated company, user, and team identity, if usable message text is available. This\nheader does not load conversation history.\n"},{"in":"header","name":"X-Claude-Code-Session-Id","required":false,"schema":{"type":"string","maxLength":256},"description":"Alternative client-provided session identifier, supported for Claude Code clients. Used\nonly when `X-Session-Id` has no usable value. Takes precedence over `session-id` and\n`thread-id`. Leading and trailing whitespace is trimmed; blank values, values longer than\n256 bytes, and values with non-printable or non-ASCII characters are ignored. This header\ndoes not load conversation history.\n"},{"in":"header","name":"thread-id","required":false,"schema":{"type":"string","maxLength":256},"description":"Alternative client-provided session identifier, supported for Codex clients. Used only\nwhen none of `X-Session-Id`, `X-Claude-Code-Session-Id`, and `session-id` has a usable\nvalue. Leading and trailing whitespace is trimmed; blank values, values longer than 256\nbytes, and values with non-printable or non-ASCII characters are ignored. This header does\nnot load conversation history.\n"},{"in":"header","name":"session-id","required":false,"schema":{"type":"string","maxLength":256},"description":"Alternative client-provided session identifier, supported for Codex clients, which send\none value for a root thread and all of its subagents. Used only when neither\n`X-Session-Id` nor `X-Claude-Code-Session-Id` has a usable value. Takes precedence over\n`thread-id`. Leading and trailing whitespace is trimmed; blank values, values longer than\n256 bytes, and values with non-printable or non-ASCII characters are ignored. This header\ndoes not load conversation history.\n"},{"in":"query","name":"fallbacks","schema":{"type":"string","enum":["true","false"]},"required":false,"description":"To use or not fallbacks in chat completion request"},{"in":"query","name":"nexos_cache_enabled","schema":{"type":"string","enum":["true","false"],"default":"true"},"required":false,"description":"Use the nexos.ai response cache for this request. Set to `false` to bypass it: a fresh response is generated and replaces the cached entry. Defaults to `true`. Does not affect provider-side prompt caching."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionsRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/ChatCompletionsResponse"},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```


# Messages

Anthropic-native Messages API for prompt-cache-preserving passthrough.

## Create a message (Anthropic-native)

> Anthropic-native Messages API. Accepts requests in Anthropic's wire format and forwards\
> them to the upstream Anthropic provider byte-for-byte, preserving native features such as\
> \`cache\_control\` for prompt caching. Use this endpoint when the client already speaks\
> Anthropic — it avoids the OpenAI translation layer that silently strips \`cache\_control\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Messages","description":"Anthropic-native Messages API for prompt-cache-preserving passthrough."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"CreateMessageRequest":{"type":"object","description":"Anthropic-native Messages API request body. Forwarded byte-for-byte to the upstream\nprovider — `cache_control` markers are preserved exactly where the client placed them\n(system blocks, message content blocks, tool definitions, top-level).\n","properties":{"model":{"type":"string","description":"Model identifier or alias resolved against the company's configured models. Must resolve to an Anthropic-provider model."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/InputMessage"}},"system":{"description":"System prompt as a single string or as an array of text blocks (each may carry `cache_control`).","oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/SystemBlock"}}]},"max_tokens":{"type":"integer","minimum":0,"description":"Maximum output tokens. Set to `0` to warm the prompt cache without generating output."},"temperature":{"type":"number","minimum":0,"maximum":1,"nullable":true,"description":"Sampling temperature. Note: the newest Claude models (Sonnet 4.6+/5) reject `temperature`, `top_p`, and `top_k` as deprecated.\n"},"top_p":{"type":"number","nullable":true,"description":"Nucleus sampling. Rejected as deprecated by the newest Claude models."},"top_k":{"type":"integer","nullable":true,"description":"Top-k sampling. Rejected as deprecated by the newest Claude models."},"stop_sequences":{"type":"array","nullable":true,"items":{"type":"string"}},"stream":{"type":"boolean","default":false,"nullable":true},"metadata":{"$ref":"#/components/schemas/Metadata","nullable":true},"tools":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Tool"}},"tool_choice":{"$ref":"#/components/schemas/ToolChoice","nullable":true},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true},"thinking":{"$ref":"#/components/schemas/ThinkingConfig","nullable":true},"output_config":{"$ref":"#/components/schemas/OutputConfig","nullable":true},"service_tier":{"type":"string","enum":["auto","standard_only"],"nullable":true,"description":"Anthropic API service tier. Note: models hosted on Vertex AI (currently all Claude models on the platform) reject this parameter.\n"},"container":{"type":"string","nullable":true,"description":"Container reference for code-execution tools. Note: models hosted on Vertex AI (currently all Claude models on the platform) reject this parameter.\n"}},"required":["model","messages","max_tokens"]},"InputMessage":{"type":"object","description":"A single input message in the `messages` array.","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"description":"Either a plain string or an array of content blocks.","oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/ContentBlock"}}]}},"required":["role","content"]},"ContentBlock":{"description":"A content block within a message's `content` array. Discriminator is `type`.\nStrict-typed concrete subtypes cover the full Anthropic Messages API surface;\n`cache_control` is forwarded byte-for-byte where present.\n","oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"},{"$ref":"#/components/schemas/DocumentBlock"},{"$ref":"#/components/schemas/ToolUseBlock"},{"$ref":"#/components/schemas/ToolResultBlock"},{"$ref":"#/components/schemas/ThinkingBlock"},{"$ref":"#/components/schemas/RedactedThinkingBlock"},{"$ref":"#/components/schemas/ServerToolUseBlock"},{"$ref":"#/components/schemas/WebSearchToolResultBlock"},{"$ref":"#/components/schemas/SearchResultBlock"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TextBlock","image":"#/components/schemas/ImageBlock","document":"#/components/schemas/DocumentBlock","tool_use":"#/components/schemas/ToolUseBlock","tool_result":"#/components/schemas/ToolResultBlock","thinking":"#/components/schemas/ThinkingBlock","redacted_thinking":"#/components/schemas/RedactedThinkingBlock","server_tool_use":"#/components/schemas/ServerToolUseBlock","web_search_tool_result":"#/components/schemas/WebSearchToolResultBlock","search_result":"#/components/schemas/SearchResultBlock"}}},"TextBlock":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true},"citations":{"type":"array","nullable":true,"items":{"type":"object","properties":{"type":{"type":"string"},"cited_text":{"type":"string"},"document_index":{"type":"integer"},"document_title":{"type":"string","nullable":true},"start_char_index":{"type":"integer"},"end_char_index":{"type":"integer"},"start_page_number":{"type":"integer"},"end_page_number":{"type":"integer"},"start_block_index":{"type":"integer"},"end_block_index":{"type":"integer"}},"required":["type"]}}},"required":["type","text"]},"CacheControlEphemeral":{"type":"object","description":"Marks a caching breakpoint for prompt caching. Attach it to any cacheable element —\nsystem text blocks, message content blocks, tool definitions, `tool_use`, `tool_result`,\n`search_result`, or `document` blocks. A request may carry up to four such breakpoints.\nWhen supplied at the top level, it is automatically applied to the last cacheable block.\n","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","description":"How long the cached prefix stays valid. Omitting it falls back to `5m`; `1h` works without any beta header.","enum":["5m","1h"]}},"required":["type"]},"ImageBlock":{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"$ref":"#/components/schemas/ImageSource"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","source"]},"ImageSource":{"oneOf":[{"$ref":"#/components/schemas/ImageSourceBase64"},{"$ref":"#/components/schemas/ImageSourceURL"}]},"ImageSourceBase64":{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","description":"Base64-encoded image bytes."}},"required":["type","media_type","data"]},"ImageSourceURL":{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri"}},"required":["type","url"]},"DocumentBlock":{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"source":{"$ref":"#/components/schemas/DocumentSource"},"title":{"type":"string","nullable":true},"context":{"type":"string","nullable":true},"citations":{"$ref":"#/components/schemas/CitationsConfig","nullable":true},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","source"]},"DocumentSource":{"oneOf":[{"$ref":"#/components/schemas/DocumentSourceBase64"},{"$ref":"#/components/schemas/DocumentSourceURL"},{"$ref":"#/components/schemas/DocumentSourceText"},{"$ref":"#/components/schemas/DocumentSourceContent"}]},"DocumentSourceBase64":{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["application/pdf"]},"data":{"type":"string"}},"required":["type","media_type","data"]},"DocumentSourceURL":{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri"}},"required":["type","url"]},"DocumentSourceText":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"media_type":{"type":"string","enum":["text/plain"]},"data":{"type":"string"}},"required":["type","media_type","data"]},"DocumentSourceContent":{"type":"object","properties":{"type":{"type":"string","enum":["content"]},"content":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"}]}}},"required":["type","content"]},"CitationsConfig":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"ToolUseBlock":{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","description":"Arguments passed to the tool, matching the input schema the client declared for it."},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","id","name","input"]},"ToolResultBlock":{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_use_id":{"type":"string"},"content":{"description":"Either a plain string or an array of text/image content blocks.","oneOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"}]}}]},"is_error":{"type":"boolean","nullable":true},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","tool_use_id"]},"ThinkingBlock":{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","thinking","signature"]},"RedactedThinkingBlock":{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"]},"data":{"type":"string"}},"required":["type","data"]},"ServerToolUseBlock":{"type":"object","description":"A built-in tool call (such as `web_search` or `code_execution`) that the provider runs on its own side.","properties":{"type":{"type":"string","enum":["server_tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","id","name","input"]},"WebSearchToolResultBlock":{"type":"object","properties":{"type":{"type":"string","enum":["web_search_tool_result"]},"tool_use_id":{"type":"string"},"content":{"description":"Either an array of search results or an error block.","oneOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["web_search_result"]},"url":{"type":"string"},"title":{"type":"string"},"encrypted_content":{"type":"string"},"page_age":{"type":"string","nullable":true}},"required":["type","url","title","encrypted_content"]}},{"type":"object","properties":{"type":{"type":"string","enum":["web_search_tool_result_error"]},"error_code":{"type":"string"}},"required":["type","error_code"]}]},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","tool_use_id","content"]},"SearchResultBlock":{"type":"object","properties":{"type":{"type":"string","enum":["search_result"]},"source":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"content":{"type":"array","items":{"$ref":"#/components/schemas/TextBlock"}},"citations":{"$ref":"#/components/schemas/CitationsConfig","nullable":true},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","content"]},"SystemBlock":{"type":"object","description":"A system prompt content block. Supports `cache_control` for caching the system prefix.","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","text"]},"Metadata":{"type":"object","description":"Optional request metadata passed through to the provider. The `user_id` field helps the provider associate the request with an end user.","properties":{"user_id":{"type":"string","nullable":true}}},"Tool":{"description":"Tool definition. Either a custom tool (function with input_schema) or a built-in server tool (typed by versioned `type`).","oneOf":[{"$ref":"#/components/schemas/CustomTool"},{"$ref":"#/components/schemas/ServerTool"}]},"CustomTool":{"type":"object","description":"A function tool that the client defines and implements.","properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","description":"A JSON Schema object that defines the shape of the tool's input arguments."},"type":{"type":"string","enum":["custom"],"description":"Optional type marker. Leave it out for legacy custom tools, or set it to `custom` when you need to be explicit."},"strict":{"type":"boolean","description":"Whether to enforce strict schema adherence for this tool's input. Requires `additionalProperties: false` and every property listed in `required` on `input_schema`. Omitted leaves the provider's own default.\n"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["name","input_schema"]},"ServerTool":{"type":"object","description":"A provider-hosted built-in tool, identified by its versioned type (for example `web_search_20250305`, `code_execution_20250825`, `bash_20250124`, `text_editor_20250124`, or `memory_20250818`).","properties":{"type":{"type":"string"},"name":{"type":"string"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","name"]},"ToolChoice":{"description":"Controls how the model selects tools.","oneOf":[{"$ref":"#/components/schemas/ToolChoiceAuto"},{"$ref":"#/components/schemas/ToolChoiceAny"},{"$ref":"#/components/schemas/ToolChoiceTool"},{"$ref":"#/components/schemas/ToolChoiceNone"}],"discriminator":{"propertyName":"type","mapping":{"auto":"#/components/schemas/ToolChoiceAuto","any":"#/components/schemas/ToolChoiceAny","tool":"#/components/schemas/ToolChoiceTool","none":"#/components/schemas/ToolChoiceNone"}}},"ToolChoiceAuto":{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"disable_parallel_tool_use":{"type":"boolean","nullable":true}},"required":["type"]},"ToolChoiceAny":{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"disable_parallel_tool_use":{"type":"boolean","nullable":true}},"required":["type"]},"ToolChoiceTool":{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"name":{"type":"string"},"disable_parallel_tool_use":{"type":"boolean","nullable":true}},"required":["type","name"]},"ToolChoiceNone":{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"ThinkingConfig":{"description":"Extended thinking configuration.","oneOf":[{"$ref":"#/components/schemas/EnabledThinkingConfig"},{"$ref":"#/components/schemas/AdaptiveThinkingConfig"},{"$ref":"#/components/schemas/DisabledThinkingConfig"}],"discriminator":{"propertyName":"type","mapping":{"enabled":"#/components/schemas/EnabledThinkingConfig","adaptive":"#/components/schemas/AdaptiveThinkingConfig","disabled":"#/components/schemas/DisabledThinkingConfig"}}},"EnabledThinkingConfig":{"type":"object","description":"Manual thinking budget. Supported by Claude 4.x and older models; Claude 5 models reject this form — use `AdaptiveThinkingConfig` with `output_config.effort` instead.\n","properties":{"type":{"type":"string","enum":["enabled"]},"budget_tokens":{"type":"integer","minimum":1024}},"required":["type","budget_tokens"]},"AdaptiveThinkingConfig":{"type":"object","description":"Adaptive thinking — the model decides how much to think based on the request. Required form for Claude 5 models (which reject `enabled`/`budget_tokens`). Tune the thinking depth with the top-level `output_config.effort` parameter.\n","properties":{"type":{"type":"string","enum":["adaptive"]}},"required":["type"]},"DisabledThinkingConfig":{"type":"object","properties":{"type":{"type":"string","enum":["disabled"]}},"required":["type"]},"OutputConfig":{"type":"object","description":"Output configuration. Controls how much effort the model puts into the response when adaptive thinking is enabled.\n","properties":{"effort":{"type":"string","description":"Effort level applied when `thinking.type` is `adaptive`.","enum":["low","medium","high"]}}},"MessagesResponse":{"type":"object","description":"Anthropic-native non-streaming Messages API response.","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["assistant"]},"model":{"type":"string"},"nexos_model_uuid":{"type":"string","description":"The nexos model identifier (company model UUID) used for this response. Same value as the `X-Nexos-Model-Id` response header; can be passed as `model` in subsequent requests. Nexos extension."},"nexos_model_name":{"type":"string","description":"The nexos model name used for this response (the value accepted as `model` in subsequent requests). Nexos extension."},"cost_savings":{"$ref":"#/components/schemas/CostSavings"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ContentBlock"}},"stop_reason":{"type":"string","nullable":true,"enum":["end_turn","max_tokens","stop_sequence","tool_use","pause_turn","refusal"]},"stop_sequence":{"type":"string","nullable":true},"stop_details":{"$ref":"#/components/schemas/StopDetails","nullable":true},"usage":{"$ref":"#/components/schemas/Usage"},"container":{"$ref":"#/components/schemas/Container","nullable":true}},"required":["id","type","role","content","model","usage"]},"CostSavings":{"type":"object","description":"Cost savings for this request, in the same unit as `usage.nexos_credits_cost`.\n`baseline_cost` is what the request would have cost without nexos optimizations; it equals\n`charged_cost` plus every non-null saving. A saving is `null` when its optimization did not\napply to the request, and `0` when it applied but saved nothing. Nexos extension.\n","properties":{"baseline_cost":{"type":"number","format":"double","description":"Cost the request would have had without nexos optimizations."},"charged_cost":{"type":"number","format":"double","description":"Cost actually charged for the request. Same value as `usage.nexos_credits_cost`."},"cache_optimization":{"type":"number","format":"double","nullable":true,"description":"Saving from prompt cache breakpoints injected by the nexos optimizer. Negative when writing the cache cost more than it saved on this request (cache writes are billed above the normal input rate); later cache reads recover it. `null` when the optimizer did not inject cache control."},"nexos_cache":{"type":"number","format":"double","nullable":true,"description":"Saving from serving the response from the nexos response cache. `null` when the response was not served from cache."}},"required":["baseline_cost","charged_cost","cache_optimization","nexos_cache"]},"StopDetails":{"type":"object","description":"Why a turn was refused. Present when `stop_reason` is `refusal`, and null on every\nother stop reason. Anthropic describes a refusal here rather than in a content block,\nso a client should branch on `stop_reason` or `stop_details.type` rather than assume\n`category` and `explanation` are populated.\n","properties":{"type":{"type":"string","enum":["refusal"]},"category":{"type":"string","nullable":true,"description":"The policy category the decline falls under. Null when it maps to no named\ncategory, which is always the case for a refusal translated from another\nprovider — their APIs carry no equivalent category.\n"},"explanation":{"type":"string","nullable":true,"description":"A human-readable description of the decline, such as the refusal text the\nupstream model wrote. Display it rather than parse it.\n"}},"required":["type"]},"Usage":{"type":"object","description":"Token counts reported for the request.","properties":{"input_tokens":{"type":"integer","description":"Number of input tokens charged for the request, not counting any tokens read from cache."},"output_tokens":{"type":"integer"},"cache_creation_input_tokens":{"type":"integer","nullable":true,"description":"Number of input tokens stored into the prompt cache during this request."},"cache_read_input_tokens":{"type":"integer","nullable":true,"description":"Number of input tokens read back from the prompt cache, which are billed at a reduced rate."},"cache_creation":{"$ref":"#/components/schemas/CacheCreation","nullable":true},"output_tokens_details":{"type":"object","nullable":true,"description":"Breakdown of the output tokens.","properties":{"thinking_tokens":{"type":"integer","description":"Number of output tokens used for extended thinking."}}},"service_tier":{"type":"string","nullable":true},"server_tool_use":{"$ref":"#/components/schemas/ServerToolUsage","nullable":true},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"required":["input_tokens","output_tokens"]},"CacheCreation":{"type":"object","description":"Breakdown of cache-write tokens split by cache lifetime tier.","properties":{"ephemeral_5m_input_tokens":{"type":"integer"},"ephemeral_1h_input_tokens":{"type":"integer"}}},"ServerToolUsage":{"type":"object","description":"Usage counts for each server-side tool, present when those tools ran during the request.","properties":{"web_search_requests":{"type":"integer"}}},"Container":{"type":"object","description":"Details of the execution container, included when the request used server-side code execution.","properties":{"id":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["id","expires_at"]},"MessagesStreamEvent":{"description":"Anthropic-native Messages API SSE event. Discriminated by `type`. Forwarded byte-for-byte\nfrom the upstream provider — public-api does not transform individual events.\n","oneOf":[{"$ref":"#/components/schemas/MessageStartEvent"},{"$ref":"#/components/schemas/ContentBlockStartEvent"},{"$ref":"#/components/schemas/ContentBlockDeltaEvent"},{"$ref":"#/components/schemas/ContentBlockStopEvent"},{"$ref":"#/components/schemas/MessageDeltaEvent"},{"$ref":"#/components/schemas/MessageStopEvent"},{"$ref":"#/components/schemas/PingEvent"},{"$ref":"#/components/schemas/ErrorEvent"}],"discriminator":{"propertyName":"type","mapping":{"message_start":"#/components/schemas/MessageStartEvent","content_block_start":"#/components/schemas/ContentBlockStartEvent","content_block_delta":"#/components/schemas/ContentBlockDeltaEvent","content_block_stop":"#/components/schemas/ContentBlockStopEvent","message_delta":"#/components/schemas/MessageDeltaEvent","message_stop":"#/components/schemas/MessageStopEvent","ping":"#/components/schemas/PingEvent","error":"#/components/schemas/ErrorEvent"}}},"MessageStartEvent":{"type":"object","properties":{"type":{"type":"string","enum":["message_start"]},"message":{"$ref":"#/components/schemas/MessagesResponse"}},"required":["type","message"]},"ContentBlockStartEvent":{"type":"object","properties":{"type":{"type":"string","enum":["content_block_start"]},"index":{"type":"integer"},"content_block":{"$ref":"#/components/schemas/ContentBlock"}},"required":["type","index","content_block"]},"ContentBlockDeltaEvent":{"type":"object","properties":{"type":{"type":"string","enum":["content_block_delta"]},"index":{"type":"integer"},"delta":{"$ref":"#/components/schemas/ContentBlockDelta"}},"required":["type","index","delta"]},"ContentBlockDelta":{"oneOf":[{"$ref":"#/components/schemas/TextDelta"},{"$ref":"#/components/schemas/InputJsonDelta"},{"$ref":"#/components/schemas/ThinkingDelta"},{"$ref":"#/components/schemas/SignatureDelta"},{"$ref":"#/components/schemas/CitationsDelta"}],"discriminator":{"propertyName":"type","mapping":{"text_delta":"#/components/schemas/TextDelta","input_json_delta":"#/components/schemas/InputJsonDelta","thinking_delta":"#/components/schemas/ThinkingDelta","signature_delta":"#/components/schemas/SignatureDelta","citations_delta":"#/components/schemas/CitationsDelta"}}},"TextDelta":{"type":"object","properties":{"type":{"type":"string","enum":["text_delta"]},"text":{"type":"string"}},"required":["type","text"]},"InputJsonDelta":{"type":"object","properties":{"type":{"type":"string","enum":["input_json_delta"]},"partial_json":{"type":"string"}},"required":["type","partial_json"]},"ThinkingDelta":{"type":"object","properties":{"type":{"type":"string","enum":["thinking_delta"]},"thinking":{"type":"string"}},"required":["type","thinking"]},"SignatureDelta":{"type":"object","properties":{"type":{"type":"string","enum":["signature_delta"]},"signature":{"type":"string"}},"required":["type","signature"]},"CitationsDelta":{"type":"object","properties":{"type":{"type":"string","enum":["citations_delta"]},"citation":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]}},"required":["type","citation"]},"ContentBlockStopEvent":{"type":"object","properties":{"type":{"type":"string","enum":["content_block_stop"]},"index":{"type":"integer"}},"required":["type","index"]},"MessageDeltaEvent":{"type":"object","properties":{"type":{"type":"string","enum":["message_delta"]},"delta":{"$ref":"#/components/schemas/MessageDelta"},"usage":{"$ref":"#/components/schemas/Usage"},"cost_savings":{"$ref":"#/components/schemas/CostSavings"}},"required":["type","delta","usage"]},"MessageDelta":{"type":"object","description":"Top-level message delta carrying the terminal stop_reason, stop_sequence and — on a\nrefusal — stop_details. A refusal's stop_details arrives here rather than on\nmessage_start, which carries no stop information at all.\n","properties":{"stop_reason":{"type":"string","nullable":true,"enum":["end_turn","max_tokens","stop_sequence","tool_use","pause_turn","refusal"]},"stop_sequence":{"type":"string","nullable":true},"stop_details":{"$ref":"#/components/schemas/StopDetails","nullable":true}}},"MessageStopEvent":{"type":"object","properties":{"type":{"type":"string","enum":["message_stop"]}},"required":["type"]},"PingEvent":{"type":"object","properties":{"type":{"type":"string","enum":["ping"]}},"required":["type"]},"ErrorEvent":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}},"required":["type","message"]}},"required":["type","error"]}}},"paths":{"/v1/messages":{"post":{"operationId":"createMessage","tags":["Messages"],"summary":"Create a message (Anthropic-native)","description":"Anthropic-native Messages API. Accepts requests in Anthropic's wire format and forwards\nthem to the upstream Anthropic provider byte-for-byte, preserving native features such as\n`cache_control` for prompt caching. Use this endpoint when the client already speaks\nAnthropic — it avoids the OpenAI translation layer that silently strips `cache_control`.\n","parameters":[{"in":"header","name":"X-Session-Id","required":false,"schema":{"type":"string","maxLength":256},"description":"Optional client-provided identifier for grouping requests into a session. Leading and\ntrailing whitespace is trimmed; blank values, values longer than 256 bytes, and values\nwith non-printable or non-ASCII characters are ignored. Takes precedence over\n`X-Claude-Code-Session-Id`, `session-id`, and `thread-id`. When none of these headers has\na usable value, a session fingerprint is derived from the first message and the\nauthenticated company, user, and team identity, if usable message text is available. This\nheader does not load conversation history.\n"},{"in":"header","name":"X-Claude-Code-Session-Id","required":false,"schema":{"type":"string","maxLength":256},"description":"Alternative client-provided session identifier, supported for Claude Code clients. Used\nonly when `X-Session-Id` has no usable value. Takes precedence over `session-id` and\n`thread-id`. Leading and trailing whitespace is trimmed; blank values, values longer than\n256 bytes, and values with non-printable or non-ASCII characters are ignored. This header\ndoes not load conversation history.\n"},{"in":"header","name":"thread-id","required":false,"schema":{"type":"string","maxLength":256},"description":"Alternative client-provided session identifier, supported for Codex clients. Used only\nwhen none of `X-Session-Id`, `X-Claude-Code-Session-Id`, and `session-id` has a usable\nvalue. Leading and trailing whitespace is trimmed; blank values, values longer than 256\nbytes, and values with non-printable or non-ASCII characters are ignored. This header does\nnot load conversation history.\n"},{"in":"header","name":"session-id","required":false,"schema":{"type":"string","maxLength":256},"description":"Alternative client-provided session identifier, supported for Codex clients, which send\none value for a root thread and all of its subagents. Used only when neither\n`X-Session-Id` nor `X-Claude-Code-Session-Id` has a usable value. Takes precedence over\n`thread-id`. Leading and trailing whitespace is trimmed; blank values, values longer than\n256 bytes, and values with non-printable or non-ASCII characters are ignored. This header\ndoes not load conversation history.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageRequest"}}}},"responses":{"200":{"description":"OK","headers":{"X-Session-Id":{"schema":{"type":"string"},"description":"Session identifier the request was grouped under, resolved from the first usable of: the `X-Session-Id`, `X-Claude-Code-Session-Id`, `session-id`, or `thread-id` request header; otherwise a fingerprint (`fp1_...`) derived from the authenticated company, user, and team identity and the first user message. Send it back as `X-Session-Id` to keep later requests in the same session. Omitted when no session can be determined."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/MessagesStreamEvent"}}}}}}}}}
```

## Count message tokens (Anthropic-native)

> Anthropic-native token counting. Accepts the same structured inputs as \`/v1/messages\` and\
> returns the number of input tokens without generating a response. Claude Code calls this as\
> \`/v1/messages/count\_tokens?beta=true\` to size its context window; when the endpoint is\
> missing it falls back to a character-based estimate.<br>

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Messages","description":"Anthropic-native Messages API for prompt-cache-preserving passthrough."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"CountMessageTokensRequest":{"type":"object","description":"Anthropic-native token counting request body. Accepts the same structured inputs as\n`/v1/messages` — `system`, `messages`, `tools`, `thinking` — but no `max_tokens`, because no\noutput is generated. Forwarded byte-for-byte to the upstream provider.\n","properties":{"model":{"type":"string","description":"Model identifier or alias resolved against the company's configured models. Must resolve to an Anthropic-provider model."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/InputMessage"}},"system":{"description":"System prompt as a single string or as an array of text blocks (each may carry `cache_control`).","oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/SystemBlock"}}]},"tools":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Tool"}},"tool_choice":{"$ref":"#/components/schemas/ToolChoice","nullable":true},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true},"thinking":{"$ref":"#/components/schemas/ThinkingConfig","nullable":true}},"required":["model","messages"]},"InputMessage":{"type":"object","description":"A single input message in the `messages` array.","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"description":"Either a plain string or an array of content blocks.","oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/ContentBlock"}}]}},"required":["role","content"]},"ContentBlock":{"description":"A content block within a message's `content` array. Discriminator is `type`.\nStrict-typed concrete subtypes cover the full Anthropic Messages API surface;\n`cache_control` is forwarded byte-for-byte where present.\n","oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"},{"$ref":"#/components/schemas/DocumentBlock"},{"$ref":"#/components/schemas/ToolUseBlock"},{"$ref":"#/components/schemas/ToolResultBlock"},{"$ref":"#/components/schemas/ThinkingBlock"},{"$ref":"#/components/schemas/RedactedThinkingBlock"},{"$ref":"#/components/schemas/ServerToolUseBlock"},{"$ref":"#/components/schemas/WebSearchToolResultBlock"},{"$ref":"#/components/schemas/SearchResultBlock"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/TextBlock","image":"#/components/schemas/ImageBlock","document":"#/components/schemas/DocumentBlock","tool_use":"#/components/schemas/ToolUseBlock","tool_result":"#/components/schemas/ToolResultBlock","thinking":"#/components/schemas/ThinkingBlock","redacted_thinking":"#/components/schemas/RedactedThinkingBlock","server_tool_use":"#/components/schemas/ServerToolUseBlock","web_search_tool_result":"#/components/schemas/WebSearchToolResultBlock","search_result":"#/components/schemas/SearchResultBlock"}}},"TextBlock":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true},"citations":{"type":"array","nullable":true,"items":{"type":"object","properties":{"type":{"type":"string"},"cited_text":{"type":"string"},"document_index":{"type":"integer"},"document_title":{"type":"string","nullable":true},"start_char_index":{"type":"integer"},"end_char_index":{"type":"integer"},"start_page_number":{"type":"integer"},"end_page_number":{"type":"integer"},"start_block_index":{"type":"integer"},"end_block_index":{"type":"integer"}},"required":["type"]}}},"required":["type","text"]},"CacheControlEphemeral":{"type":"object","description":"Marks a caching breakpoint for prompt caching. Attach it to any cacheable element —\nsystem text blocks, message content blocks, tool definitions, `tool_use`, `tool_result`,\n`search_result`, or `document` blocks. A request may carry up to four such breakpoints.\nWhen supplied at the top level, it is automatically applied to the last cacheable block.\n","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","description":"How long the cached prefix stays valid. Omitting it falls back to `5m`; `1h` works without any beta header.","enum":["5m","1h"]}},"required":["type"]},"ImageBlock":{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"$ref":"#/components/schemas/ImageSource"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","source"]},"ImageSource":{"oneOf":[{"$ref":"#/components/schemas/ImageSourceBase64"},{"$ref":"#/components/schemas/ImageSourceURL"}]},"ImageSourceBase64":{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"data":{"type":"string","description":"Base64-encoded image bytes."}},"required":["type","media_type","data"]},"ImageSourceURL":{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri"}},"required":["type","url"]},"DocumentBlock":{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"source":{"$ref":"#/components/schemas/DocumentSource"},"title":{"type":"string","nullable":true},"context":{"type":"string","nullable":true},"citations":{"$ref":"#/components/schemas/CitationsConfig","nullable":true},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","source"]},"DocumentSource":{"oneOf":[{"$ref":"#/components/schemas/DocumentSourceBase64"},{"$ref":"#/components/schemas/DocumentSourceURL"},{"$ref":"#/components/schemas/DocumentSourceText"},{"$ref":"#/components/schemas/DocumentSourceContent"}]},"DocumentSourceBase64":{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["application/pdf"]},"data":{"type":"string"}},"required":["type","media_type","data"]},"DocumentSourceURL":{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","format":"uri"}},"required":["type","url"]},"DocumentSourceText":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"media_type":{"type":"string","enum":["text/plain"]},"data":{"type":"string"}},"required":["type","media_type","data"]},"DocumentSourceContent":{"type":"object","properties":{"type":{"type":"string","enum":["content"]},"content":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"}]}}},"required":["type","content"]},"CitationsConfig":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"ToolUseBlock":{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","description":"Arguments passed to the tool, matching the input schema the client declared for it."},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","id","name","input"]},"ToolResultBlock":{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_use_id":{"type":"string"},"content":{"description":"Either a plain string or an array of text/image content blocks.","oneOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TextBlock"},{"$ref":"#/components/schemas/ImageBlock"}]}}]},"is_error":{"type":"boolean","nullable":true},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","tool_use_id"]},"ThinkingBlock":{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","thinking","signature"]},"RedactedThinkingBlock":{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"]},"data":{"type":"string"}},"required":["type","data"]},"ServerToolUseBlock":{"type":"object","description":"A built-in tool call (such as `web_search` or `code_execution`) that the provider runs on its own side.","properties":{"type":{"type":"string","enum":["server_tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","id","name","input"]},"WebSearchToolResultBlock":{"type":"object","properties":{"type":{"type":"string","enum":["web_search_tool_result"]},"tool_use_id":{"type":"string"},"content":{"description":"Either an array of search results or an error block.","oneOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["web_search_result"]},"url":{"type":"string"},"title":{"type":"string"},"encrypted_content":{"type":"string"},"page_age":{"type":"string","nullable":true}},"required":["type","url","title","encrypted_content"]}},{"type":"object","properties":{"type":{"type":"string","enum":["web_search_tool_result_error"]},"error_code":{"type":"string"}},"required":["type","error_code"]}]},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","tool_use_id","content"]},"SearchResultBlock":{"type":"object","properties":{"type":{"type":"string","enum":["search_result"]},"source":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"content":{"type":"array","items":{"$ref":"#/components/schemas/TextBlock"}},"citations":{"$ref":"#/components/schemas/CitationsConfig","nullable":true},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","content"]},"SystemBlock":{"type":"object","description":"A system prompt content block. Supports `cache_control` for caching the system prefix.","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","text"]},"Tool":{"description":"Tool definition. Either a custom tool (function with input_schema) or a built-in server tool (typed by versioned `type`).","oneOf":[{"$ref":"#/components/schemas/CustomTool"},{"$ref":"#/components/schemas/ServerTool"}]},"CustomTool":{"type":"object","description":"A function tool that the client defines and implements.","properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","description":"A JSON Schema object that defines the shape of the tool's input arguments."},"type":{"type":"string","enum":["custom"],"description":"Optional type marker. Leave it out for legacy custom tools, or set it to `custom` when you need to be explicit."},"strict":{"type":"boolean","description":"Whether to enforce strict schema adherence for this tool's input. Requires `additionalProperties: false` and every property listed in `required` on `input_schema`. Omitted leaves the provider's own default.\n"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["name","input_schema"]},"ServerTool":{"type":"object","description":"A provider-hosted built-in tool, identified by its versioned type (for example `web_search_20250305`, `code_execution_20250825`, `bash_20250124`, `text_editor_20250124`, or `memory_20250818`).","properties":{"type":{"type":"string"},"name":{"type":"string"},"cache_control":{"$ref":"#/components/schemas/CacheControlEphemeral","nullable":true}},"required":["type","name"]},"ToolChoice":{"description":"Controls how the model selects tools.","oneOf":[{"$ref":"#/components/schemas/ToolChoiceAuto"},{"$ref":"#/components/schemas/ToolChoiceAny"},{"$ref":"#/components/schemas/ToolChoiceTool"},{"$ref":"#/components/schemas/ToolChoiceNone"}],"discriminator":{"propertyName":"type","mapping":{"auto":"#/components/schemas/ToolChoiceAuto","any":"#/components/schemas/ToolChoiceAny","tool":"#/components/schemas/ToolChoiceTool","none":"#/components/schemas/ToolChoiceNone"}}},"ToolChoiceAuto":{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"disable_parallel_tool_use":{"type":"boolean","nullable":true}},"required":["type"]},"ToolChoiceAny":{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"disable_parallel_tool_use":{"type":"boolean","nullable":true}},"required":["type"]},"ToolChoiceTool":{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"name":{"type":"string"},"disable_parallel_tool_use":{"type":"boolean","nullable":true}},"required":["type","name"]},"ToolChoiceNone":{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"ThinkingConfig":{"description":"Extended thinking configuration.","oneOf":[{"$ref":"#/components/schemas/EnabledThinkingConfig"},{"$ref":"#/components/schemas/AdaptiveThinkingConfig"},{"$ref":"#/components/schemas/DisabledThinkingConfig"}],"discriminator":{"propertyName":"type","mapping":{"enabled":"#/components/schemas/EnabledThinkingConfig","adaptive":"#/components/schemas/AdaptiveThinkingConfig","disabled":"#/components/schemas/DisabledThinkingConfig"}}},"EnabledThinkingConfig":{"type":"object","description":"Manual thinking budget. Supported by Claude 4.x and older models; Claude 5 models reject this form — use `AdaptiveThinkingConfig` with `output_config.effort` instead.\n","properties":{"type":{"type":"string","enum":["enabled"]},"budget_tokens":{"type":"integer","minimum":1024}},"required":["type","budget_tokens"]},"AdaptiveThinkingConfig":{"type":"object","description":"Adaptive thinking — the model decides how much to think based on the request. Required form for Claude 5 models (which reject `enabled`/`budget_tokens`). Tune the thinking depth with the top-level `output_config.effort` parameter.\n","properties":{"type":{"type":"string","enum":["adaptive"]}},"required":["type"]},"DisabledThinkingConfig":{"type":"object","properties":{"type":{"type":"string","enum":["disabled"]}},"required":["type"]},"CountMessageTokensResponse":{"type":"object","description":"Number of input tokens the supplied request would consume.","properties":{"input_tokens":{"type":"integer","description":"Estimated total input tokens. The count is an estimate and is not billed."}},"required":["input_tokens"]}}},"paths":{"/v1/messages/count_tokens":{"post":{"operationId":"countMessageTokens","tags":["Messages"],"summary":"Count message tokens (Anthropic-native)","description":"Anthropic-native token counting. Accepts the same structured inputs as `/v1/messages` and\nreturns the number of input tokens without generating a response. Claude Code calls this as\n`/v1/messages/count_tokens?beta=true` to size its context window; when the endpoint is\nmissing it falls back to a character-based estimate.\n","parameters":[{"in":"query","name":"beta","schema":{"type":"string"},"required":false,"description":"Marks the request as using the Anthropic beta API surface. Claude Code sends `beta=true`;\nforwarded upstream unchanged.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountMessageTokensRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountMessageTokensResponse"}}}}}}}}}
```


# Responses

Create and manage model responses.

## Create a model response

> Creates a model response.\
> \
> \`store: true\` is only honored if storing is enabled for the company - a company-level\
> setting that is off by default. When the setting is off, responses are not stored\
> regardless of the \`store\` value sent.<br>

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"CreateResponseRequest":{"allOf":[{"$ref":"#/components/schemas/CreateModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"type":"object","properties":{"input":{"$ref":"#/components/schemas/InputParam"},"include":{"type":"array","description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program).","items":{"$ref":"#/components/schemas/IncludeEnum"},"nullable":true},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.\n","default":true,"nullable":true},"store":{"type":"boolean","description":"Whether to store the generated model response for later retrieval via\nAPI.\n\n`store: true` is only honored if storing is enabled for the company - a company-level\nsetting that is off by default. When the setting is off, the response is not stored\nregardless of the `store` value sent.\n","default":true,"nullable":true},"instructions":{"type":"string","description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","nullable":true},"stream":{"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n","type":"boolean","default":false,"nullable":true},"stream_options":{"$ref":"#/components/schemas/ResponseStreamOptions"},"conversation":{"$ref":"#/components/schemas/ConversationParam","nullable":true}}}]},"CreateModelResponseProperties":{"allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"type":"object","properties":{"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","type":"integer","minimum":0,"maximum":20}}}]},"ModelResponseProperties":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/responses_Metadata"},"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","type":"integer","minimum":0,"maximum":20,"nullable":true},"temperature":{"type":"number","minimum":0,"maximum":2,"default":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n","nullable":true},"top_p":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","nullable":true},"user":{"type":"string","deprecated":true,"description":"Deprecated in favor of `safety_identifier` and `prompt_cache_key`; use `prompt_cache_key` to maintain caching. A stable end-user identifier to improve cache hit rates and help detect abuse.\n"},"safety_identifier":{"type":"string","description":"A stable identifier used to help detect users who may violate usage policies. Use a unique per-user string (e.g., a hash of username or email) to avoid sending identifying information.\n"},"prompt_cache_key":{"type":"string","description":"Used to cache responses for similar requests and improve cache hit rates. Replaces the `user` field.\n"},"service_tier":{"$ref":"#/components/schemas/ServiceTier"},"prompt_cache_retention":{"type":"string","enum":["in_memory","24h"],"description":"Retention policy for the prompt cache. Set to `24h` to keep cached prefixes active longer (up to 24 hours).\n","nullable":true}}},"responses_Metadata":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string"},"nullable":true},"ServiceTier":{"type":"string","description":"Specifies the processing tier for the request.\nThe response includes the actual tier used, which may differ from the requested value.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","nullable":true},"ResponseProperties":{"type":"object","required":["model"],"properties":{"previous_response_id":{"type":"string","description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations. Cannot be used with `conversation`.\n","nullable":true},"model":{"description":"Model ID used to generate the response (e.g., `gpt-4o` or `o3`). See your provider's model guide for available options.\n","type":"string"},"reasoning":{"$ref":"#/components/schemas/Reasoning","nullable":true},"background":{"type":"boolean","description":"Whether to run the model response in the background.\n","default":false,"nullable":true},"max_output_tokens":{"description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.\n","type":"integer","nullable":true},"max_tool_calls":{"description":"The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n","type":"integer","nullable":true},"text":{"$ref":"#/components/schemas/ResponseTextParam"},"tools":{"$ref":"#/components/schemas/ToolsArray"},"tool_choice":{"$ref":"#/components/schemas/ToolChoiceParam"},"prompt":{"$ref":"#/components/schemas/Prompt"},"truncation":{"type":"string","description":"The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n  the model's context window size, the model will truncate the\n  response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n  size for a model, the request will fail with a 400 error.\n","enum":["auto","disabled"],"default":"disabled","nullable":true}}},"Reasoning":{"type":"object","description":"Configuration options for reasoning models. Applicable to gpt-5 and o-series models only.\n","title":"Reasoning","properties":{"effort":{"$ref":"#/components/schemas/ReasoningEffort"},"mode":{"type":"string","description":"Reasoning mode for models that support it. One of `standard` or `pro`.\n","enum":["standard","pro"]},"summary":{"type":"string","nullable":true,"description":"A summary of the model's reasoning.\nOne of `auto`, `concise`, or `detailed` (only `concise` is supported for `computer-use-preview`).\n","enum":["auto","concise","detailed"]},"generate_summary":{"type":"string","nullable":true,"deprecated":true,"description":"Deprecated: use `summary` instead.\nA summary of the model's reasoning. One of `auto`, `concise`, or `detailed`.\n","enum":["auto","concise","detailed"]}}},"ReasoningEffort":{"type":"string","nullable":true,"enum":["none","minimal","low","medium","high"],"default":"medium","description":"Controls how much reasoning effort the model uses. Lower settings are faster and use fewer tokens; higher settings provide more detailed reasoning.\n"},"ResponseTextParam":{"type":"object","description":"Configuration options for a text response. Supports plain text or structured JSON.\n","properties":{"format":{"$ref":"#/components/schemas/TextResponseFormatConfiguration"},"verbosity":{"$ref":"#/components/schemas/Verbosity"}}},"TextResponseFormatConfiguration":{"description":"Specifies the required output format. Use `type: json_schema` to enforce a schema; `type: text` is the default.\n","anyOf":[{"$ref":"#/components/schemas/responses_ResponseFormatText"},{"$ref":"#/components/schemas/TextResponseFormatJsonSchema"},{"$ref":"#/components/schemas/responses_ResponseFormatJsonObject"}],"discriminator":{"propertyName":"type"}},"responses_ResponseFormatText":{"type":"object","title":"Text","description":"Default response format. Used to generate text responses.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `text`.","enum":["text"]}},"required":["type"]},"TextResponseFormatJsonSchema":{"type":"object","title":"JSON schema","description":"JSON Schema response format used to generate structured JSON responses.\nLearn more in the Structured Outputs guide.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"]},"description":{"type":"string","description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"},"schema":{"$ref":"#/components/schemas/responses_ResponseFormatJsonSchemaSchema"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf true, the model will follow the exact schema; only a subset of JSON Schema is supported.\n"}},"required":["type","schema","name"]},"responses_ResponseFormatJsonSchemaSchema":{"type":"object","title":"JSON schema","description":"The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n","additionalProperties":true},"responses_ResponseFormatJsonObject":{"type":"object","title":"JSON object","description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_object`.","enum":["json_object"]}},"required":["type"]},"Verbosity":{"type":"string","nullable":true,"enum":["low","medium","high"],"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n"},"ToolsArray":{"type":"array","description":"An array of tools the model may call while generating a response. Categories include built-in tools, MCP tools, and custom function calls.\n","items":{"$ref":"#/components/schemas/responses_Tool"}},"responses_Tool":{"description":"A tool that can be used to generate a response.\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionTool"},{"$ref":"#/components/schemas/FileSearchTool"},{"$ref":"#/components/schemas/ComputerUsePreviewTool"},{"$ref":"#/components/schemas/WebSearchTool"},{"$ref":"#/components/schemas/MCPTool"},{"$ref":"#/components/schemas/CodeInterpreterTool"},{"$ref":"#/components/schemas/ImageGenTool"},{"$ref":"#/components/schemas/LocalShellToolParam"},{"$ref":"#/components/schemas/FunctionShellToolParam"},{"$ref":"#/components/schemas/CustomToolParam"},{"$ref":"#/components/schemas/WebSearchPreviewTool"},{"$ref":"#/components/schemas/ApplyPatchToolParam"}]},"FunctionTool":{"properties":{"type":{"type":"string","enum":["function"],"description":"The type of the function tool. Always `function`.","default":"function"},"name":{"type":"string","description":"The name of the function to call."},"description":{"type":"string","nullable":true,"description":"A description of the function. Used by the model to determine whether or not to call the function."},"parameters":{"type":"object","nullable":true,"additionalProperties":{},"description":"A JSON schema object describing the parameters of the function."},"strict":{"type":"boolean","nullable":true,"description":"Whether to enforce strict parameter validation. Default `true`."}},"type":"object","required":["type","name","strict","parameters"],"title":"Function","description":"Defines a function in your code that the model can call."},"FileSearchTool":{"properties":{"type":{"type":"string","enum":["file_search"],"description":"The type of the file search tool. Always `file_search`.","default":"file_search"},"vector_store_ids":{"items":{"type":"string"},"type":"array","description":"The IDs of the vector stores to search."},"max_num_results":{"type":"integer","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive."},"ranking_options":{"$ref":"#/components/schemas/RankingOptions","description":"Ranking options for search."},"filters":{"$ref":"#/components/schemas/Filters","description":"A filter to apply.","nullable":true}},"type":"object","required":["type","vector_store_ids"],"title":"File search","description":"Searches uploaded files for relevant content. See the file search guide."},"RankingOptions":{"properties":{"ranker":{"$ref":"#/components/schemas/RankerVersionType","description":"The ranker to use for the file search."},"score_threshold":{"type":"number","description":"The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results."},"hybrid_search":{"$ref":"#/components/schemas/HybridSearchOptions","description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled."}},"type":"object","required":[]},"RankerVersionType":{"type":"string","enum":["auto","default-2024-11-15"]},"HybridSearchOptions":{"properties":{"embedding_weight":{"type":"number","description":"The weight of the embedding in the reciprocal ranking fusion."},"text_weight":{"type":"number","description":"The weight of the text in the reciprocal ranking fusion."}},"type":"object","required":["embedding_weight","text_weight"]},"Filters":{"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]},"ComparisonFilter":{"type":"object","additionalProperties":false,"title":"Comparison Filter","description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n","properties":{"type":{"type":"string","default":"eq","enum":["eq","ne","gt","gte","lt","lte"],"description":"Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"},"key":{"type":"string","description":"The key to compare against the value."},"value":{"description":"The value to compare against the attribute key; supports string, number, or boolean types.","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"$ref":"#/components/schemas/ComparisonFilterValueItems"}}]}},"required":["type","key","value"]},"ComparisonFilterValueItems":{"anyOf":[{"type":"string"},{"type":"number"}]},"CompoundFilter":{"type":"object","additionalProperties":false,"title":"Compound Filter","description":"Combine multiple filters using `and` or `or`.","properties":{"type":{"type":"string","description":"Type of operation: `and` or `or`.","enum":["and","or"]},"filters":{"type":"array","description":"Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]}}},"required":["type","filters"]},"ComputerUsePreviewTool":{"properties":{"type":{"type":"string","enum":["computer_use_preview"],"description":"The type of the computer use tool. Always `computer_use_preview`.","default":"computer_use_preview"},"environment":{"$ref":"#/components/schemas/ComputerEnvironment","description":"The type of computer environment to control."},"display_width":{"type":"integer","description":"The width of the computer display."},"display_height":{"type":"integer","description":"The height of the computer display."}},"type":"object","required":["type","environment","display_width","display_height"],"title":"Computer use preview","description":"A tool that controls a virtual computer. Learn more in the computer tool guide."},"ComputerEnvironment":{"type":"string","enum":["windows","mac","linux","ubuntu","browser"]},"WebSearchTool":{"type":"object","title":"Web search","description":"Search the internet for sources related to the prompt. Learn more in the web search tool guide.\n","properties":{"type":{"type":"string","enum":["web_search","web_search_2025_08_26"],"description":"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.","default":"web_search"},"filters":{"type":"object","description":"Filters for the search.\n","properties":{"allowed_domains":{"type":"array","title":"Allowed domains for the search.","description":"Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n","items":{"type":"string","description":"Allowed domain for the search."},"default":[],"nullable":true}},"nullable":true},"user_location":{"$ref":"#/components/schemas/WebSearchApproximateLocation"},"search_context_size":{"type":"string","enum":["low","medium","high"],"default":"medium","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"required":["type"]},"WebSearchApproximateLocation":{"type":"object","nullable":true,"title":"Web search approximate location","description":"The approximate location of the user.\n","properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","nullable":true,"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."},"region":{"type":"string","nullable":true,"description":"Free text input for the region of the user, e.g. `California`."},"city":{"type":"string","nullable":true,"description":"Free text input for the city of the user, e.g. `San Francisco`."},"timezone":{"type":"string","nullable":true,"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."}}},"MCPTool":{"type":"object","title":"MCP tool","description":"Give the model access to tools via remote Model Context Protocol (MCP) servers. Learn more in the MCP guide.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"The type of the MCP tool. Always `mcp`."},"server_label":{"type":"string","description":"A label for this MCP server, used to identify it in tool calls.\n"},"server_url":{"type":"string","description":"The URL for the MCP server. One of `server_url` or `connector_id` must be\nprovided.\n"},"connector_id":{"type":"string","enum":["connector_dropbox","connector_gmail","connector_googlecalendar","connector_googledrive","connector_microsoftteams","connector_outlookcalendar","connector_outlookemail","connector_sharepoint"],"description":"Identifier for service connectors, like those available in ChatGPT. One of\n`server_url` or `connector_id` must be provided.\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"},"authorization":{"type":"string","description":"An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"},"server_description":{"type":"string","description":"Optional description of the MCP server, used to provide more context.\n"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n","nullable":true},"allowed_tools":{"description":"List of allowed tool names or a filter object.\n","anyOf":[{"type":"array","title":"MCP allowed tools","description":"A string array of allowed tool names","items":{"type":"string"}},{"$ref":"#/components/schemas/MCPToolFilter"}],"nullable":true},"require_approval":{"description":"Specify which of the MCP server's tools require approval.","default":"always","anyOf":[{"type":"object","title":"MCP tool approval filter","description":"Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n","properties":{"always":{"$ref":"#/components/schemas/MCPToolFilter"},"never":{"$ref":"#/components/schemas/MCPToolFilter"}},"additionalProperties":false},{"type":"string","title":"MCP tool approval setting","description":"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n","enum":["always","never"]}],"nullable":true}},"required":["type","server_label"]},"MCPToolFilter":{"type":"object","title":"MCP tool filter","description":"A filter object to specify which tools are allowed.\n","properties":{"tool_names":{"type":"array","title":"MCP allowed tools","items":{"type":"string"},"description":"List of allowed tool names."},"read_only":{"type":"boolean","description":"Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n"}},"required":[],"additionalProperties":false},"CodeInterpreterTool":{"type":"object","title":"Code interpreter","description":"A tool that runs Python code to help generate a response to a prompt.\n","properties":{"type":{"type":"string","enum":["code_interpreter"],"description":"The type of the code interpreter tool. Always `code_interpreter`.\n"},"container":{"description":"The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code.\n","anyOf":[{"type":"string","description":"The container ID."},{"$ref":"#/components/schemas/CodeInterpreterContainerAuto"}]}},"required":["type","container"]},"CodeInterpreterContainerAuto":{"properties":{"type":{"type":"string","enum":["auto"],"description":"Always `auto`.","default":"auto"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"description":"An optional list of uploaded files to make available to your code."},"memory_limit":{"$ref":"#/components/schemas/ContainerMemoryLimit","nullable":true}},"type":"object","required":["type"],"title":"CodeInterpreterToolAuto","description":"Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on."},"ContainerMemoryLimit":{"type":"string","enum":["1g","4g","16g","64g"]},"ImageGenTool":{"type":"object","title":"Image generation tool","description":"A tool that generates images using a model like `gpt-image-1`.\n","properties":{"type":{"type":"string","enum":["image_generation"],"description":"The type of the image generation tool. Always `image_generation`.\n"},"model":{"type":"string","enum":["gpt-image-1","gpt-image-1-mini"],"description":"The image generation model to use. Default: `gpt-image-1`.\n","default":"gpt-image-1"},"quality":{"type":"string","enum":["low","medium","high","auto"],"description":"The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.\n","default":"auto"},"size":{"type":"string","enum":["1024x1024","1024x1536","1536x1024","auto"],"description":"The size of the generated image. One of `1024x1024`, `1024x1536`,\n`1536x1024`, or `auto`. Default: `auto`.\n","default":"auto"},"output_format":{"type":"string","enum":["png","webp","jpeg"],"description":"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n","default":"png"},"output_compression":{"type":"integer","minimum":0,"maximum":100,"description":"Compression level for the output image. Default: 100.\n","default":100},"moderation":{"type":"string","enum":["auto","low"],"description":"Moderation level for the generated image. Default: `auto`.\n","default":"auto"},"background":{"type":"string","enum":["transparent","opaque","auto"],"description":"Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.\n","default":"auto"},"input_fidelity":{"$ref":"#/components/schemas/InputFidelity","nullable":true},"input_image_mask":{"type":"object","description":"Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n","properties":{"image_url":{"type":"string","description":"Base64-encoded mask image.\n"},"file_id":{"type":"string","description":"File ID for the mask image.\n"}},"required":[],"additionalProperties":false},"partial_images":{"type":"integer","minimum":0,"maximum":3,"description":"Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n","default":0}},"required":["type"]},"InputFidelity":{"type":"string","enum":["high","low"],"description":"Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`."},"LocalShellToolParam":{"properties":{"type":{"type":"string","enum":["local_shell"],"description":"The type of the local shell tool. Always `local_shell`.","default":"local_shell"}},"type":"object","required":["type"],"title":"Local shell tool","description":"A tool that allows the model to execute shell commands in a local environment."},"FunctionShellToolParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The type of the shell tool. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Shell tool","description":"A tool that allows the model to execute shell commands."},"CustomToolParam":{"properties":{"type":{"type":"string","enum":["custom"],"description":"The type of the custom tool. Always `custom`.","default":"custom"},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls."},"description":{"type":"string","description":"Optional description of the custom tool, used to provide more context."},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CustomTextFormatParam"},{"$ref":"#/components/schemas/CustomGrammarFormatParam"}]}},"type":"object","required":["type","name"],"title":"Custom tool","description":"A custom tool that processes input using a specified format."},"CustomTextFormatParam":{"properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`.","default":"text"}},"type":"object","required":["type"],"title":"Text format","description":"Unconstrained free-form text."},"CustomGrammarFormatParam":{"properties":{"type":{"type":"string","enum":["grammar"],"description":"Grammar format. Always `grammar`.","default":"grammar"},"syntax":{"$ref":"#/components/schemas/GrammarSyntax1","description":"The syntax of the grammar definition. One of `lark` or `regex`."},"definition":{"type":"string","description":"The grammar definition."}},"type":"object","required":["type","syntax","definition"],"title":"Grammar format","description":"A grammar defined by the user."},"GrammarSyntax1":{"type":"string","enum":["lark","regex"]},"WebSearchPreviewTool":{"properties":{"type":{"type":"string","enum":["web_search_preview","web_search_preview_2025_03_11"],"description":"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.","default":"web_search_preview"},"user_location":{"$ref":"#/components/schemas/ApproximateLocation","description":"The user's location.","nullable":true},"search_context_size":{"$ref":"#/components/schemas/SearchContextSize","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"type":"object","required":["type"],"title":"Web search preview","description":"Searches the web for relevant results to use in a response. Learn more in the web search tool guide."},"ApproximateLocation":{"properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.","nullable":true},"region":{"type":"string","description":"Free text input for the region of the user, e.g. `California`.","nullable":true},"city":{"type":"string","description":"Free text input for the city of the user, e.g. `San Francisco`.","nullable":true},"timezone":{"type":"string","description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.","nullable":true}},"type":"object","required":["type"]},"SearchContextSize":{"type":"string","enum":["low","medium","high"]},"ApplyPatchToolParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The type of the tool. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Apply patch tool","description":"Allows the assistant to create, delete, or update files using unified diffs."},"ToolChoiceParam":{"description":"How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n","anyOf":[{"$ref":"#/components/schemas/ToolChoiceOptions"},{"$ref":"#/components/schemas/ToolChoiceAllowed"},{"$ref":"#/components/schemas/ToolChoiceTypes"},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"$ref":"#/components/schemas/ToolChoiceMCP"},{"$ref":"#/components/schemas/ToolChoiceCustom"},{"$ref":"#/components/schemas/SpecificApplyPatchParam"},{"$ref":"#/components/schemas/SpecificFunctionShellParam"}]},"ToolChoiceOptions":{"type":"string","title":"Tool choice mode","description":"Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n","enum":["none","auto","required"]},"ToolChoiceAllowed":{"type":"object","title":"Allowed tools","description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"type":{"type":"string","enum":["allowed_tools"],"description":"Allowed tool configuration type. Always `allowed_tools`."},"mode":{"type":"string","enum":["auto","required"],"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"},"tools":{"type":"array","description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n","items":{"type":"object","description":"A tool definition that the model should be allowed to call.\n","additionalProperties":true}}},"required":["type","mode","tools"]},"ToolChoiceTypes":{"type":"object","title":"Hosted tool","description":"Indicates that the model should use a built-in tool to generate a response.\nUse this to select a specific hosted capability.\n","properties":{"type":{"type":"string","description":"The type of hosted tool the model should to use. \n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer_use_preview`\n- `code_interpreter`\n- `image_generation`\n","enum":["file_search","web_search_preview","computer_use_preview","web_search_preview_2025_03_11","image_generation","code_interpreter"]}},"required":["type"]},"ToolChoiceFunction":{"type":"object","title":"Function tool","description":"Use this option to force the model to call a specific function.\n","properties":{"type":{"type":"string","enum":["function"],"description":"For function calling, the type is always `function`."},"name":{"type":"string","description":"The name of the function to call."}},"required":["type","name"]},"ToolChoiceMCP":{"type":"object","title":"MCP tool","description":"Use this option to force the model to call a specific tool on a remote MCP server.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"For MCP tools, the type is always `mcp`."},"server_label":{"type":"string","description":"The label of the MCP server to use.\n"},"name":{"type":"string","description":"The name of the tool to call on the server.\n","nullable":true}},"required":["type","server_label"]},"ToolChoiceCustom":{"type":"object","title":"Custom tool","description":"Use this option to force the model to call a specific custom tool.\n","properties":{"type":{"type":"string","enum":["custom"],"description":"For custom tool calling, the type is always `custom`."},"name":{"type":"string","description":"The name of the custom tool to call."}},"required":["type","name"]},"SpecificApplyPatchParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The tool to call. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Specific apply patch tool choice","description":"Forces the model to call the apply_patch tool when executing a tool call."},"SpecificFunctionShellParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The tool to call. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Specific shell tool choice","description":"Forces the model to call the function shell tool when a tool call is required."},"Prompt":{"type":"object","nullable":true,"description":"Reference to a prompt template and its variables.\n","required":["id"],"properties":{"id":{"type":"string","description":"The unique identifier of the prompt template to use."},"version":{"type":"string","nullable":true,"description":"Optional version of the prompt template."},"variables":{"$ref":"#/components/schemas/ResponsePromptVariables"}}},"ResponsePromptVariables":{"type":"object","title":"Prompt Variables","description":"Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n","additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"nullable":true},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"InputParam":{"description":"Text, image, or file inputs used to generate a response.\nUse this to provide content the model should consider.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model, equivalent to a text input with the\n`user` role.\n"},{"type":"array","title":"Input item list","description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"}}]},"InputItem":{"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"EasyInputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"role":{"type":"string","description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"]},"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model.\n"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"type":{"type":"string","description":"The type of the message input. Always `message`.\n","enum":["message"],"default":"message"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"Item":{"type":"object","description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ComputerCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The ID of the computer tool call output.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The ID of the computer tool call that produced the output."},"type":{"type":"string","enum":["computer_call_output"],"description":"The type of the computer tool call output. Always `computer_call_output`.","default":"computer_call_output"},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"acknowledged_safety_checks":{"items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array","description":"The safety checks reported by the API that have been acknowledged by the developer.","nullable":true},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Computer tool call output","description":"The output of a computer tool call."},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"FunctionCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"FunctionCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function tool call generated by the model."},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.","default":"function_call_output"},"output":{"description":"Text, image, or file output of the function tool call.","anyOf":[{"type":"string","maxLength":10485760,"description":"A JSON string of the output of the function tool call."},{"items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function tool call output","description":"The output of a function tool call."},"InputTextContentParam":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","maxLength":10485760,"description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContentParamAutoParam":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","maxLength":20971520,"nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/DetailEnum","nullable":true,"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type"],"title":"Input image","description":"An image input to the model."},"DetailEnum":{"type":"string","enum":["low","high","auto"]},"InputFileContentParam":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","nullable":true,"description":"The name of the file to be sent to the model."},"file_data":{"type":"string","maxLength":33554432,"nullable":true,"description":"The base64-encoded data of the file to be sent to the model."},"file_url":{"type":"string","nullable":true,"description":"The URL of the file to be sent to the model."}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"ReasoningItem":{"type":"object","description":"A description of the chain of thought used by a reasoning model while generating a response.\nInclude these items in your input for subsequent turns if you are manually managing context.\n","title":"Reasoning","properties":{"type":{"type":"string","description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"default":"reasoning"},"id":{"type":"string","description":"The unique identifier of the reasoning content.\n"},"encrypted_content":{"type":"string","description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","nullable":true},"summary":{"type":"array","description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/Summary"}},"content":{"type":"array","description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","summary","type"]},"Summary":{"properties":{"type":{"type":"string","enum":["summary_text"],"description":"The type of the object. Always `summary_text`.","default":"summary_text"},"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"type":"object","required":["type","text"],"title":"Summary text","description":"A summary text from the model."},"ReasoningTextContent":{"properties":{"type":{"type":"string","enum":["reasoning_text"],"description":"The type of the reasoning text. Always `reasoning_text`.","default":"reasoning_text"},"text":{"type":"string","description":"The reasoning text from the model."}},"type":"object","required":["type","text"],"title":"ReasoningTextContent","description":"Reasoning text from the model."},"CompactionSummaryItemParam":{"properties":{"id":{"type":"string","description":"The ID of the compaction item.","nullable":true},"type":{"type":"string","enum":["compaction"],"description":"The type of the item. Always `compaction`.","default":"compaction"},"encrypted_content":{"type":"string","maxLength":10485760}},"type":"object","required":["type","encrypted_content"],"title":"Compaction item","description":"A compaction item generated by the `v1/responses/compact` API."},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCallItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `function_shell_call`.","default":"shell_call"},"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/FunctionShellCallItemStatus","nullable":true}},"type":"object","required":["call_id","type","action"],"title":"Function shell tool call","description":"A tool representing a request to execute one or more shell commands."},"FunctionShellActionParam":{"properties":{"commands":{"items":{"type":"string"},"type":"array","description":"Ordered shell commands for the execution environment to run."},"timeout_ms":{"type":"integer","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","nullable":true},"max_output_length":{"type":"integer","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","nullable":true}},"type":"object","required":["commands"],"title":"Function shell action","description":"Commands and limits describing how to run the function shell tool call."},"FunctionShellCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Function shell call status","description":"Status values reported for function shell tool calls."},"FunctionShellCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the item. Always `function_shell_call_output`.","default":"shell_call_output"},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array","description":"Captured chunks of stdout and stderr output, along with their associated outcomes."},"max_output_length":{"type":"integer","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function shell tool call output","description":"The streamed output items emitted by a function shell tool call."},"FunctionShellCallOutputContentParam":{"properties":{"stdout":{"type":"string","maxLength":10485760,"description":"Captured stdout output for this chunk of the shell call."},"stderr":{"type":"string","maxLength":10485760,"description":"Captured stderr output for this chunk of the shell call."},"outcome":{"$ref":"#/components/schemas/FunctionShellCallOutputOutcomeParam","description":"The exit or timeout outcome associated with this chunk."}},"type":"object","required":["stdout","stderr","outcome"],"title":"Function shell output chunk","description":"Captured stdout and stderr for a portion of a function shell tool call output."},"FunctionShellCallOutputOutcomeParam":{"title":"Function shell call outcome","description":"The exit or timeout outcome associated with this chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcomeParam"}]},"FunctionShellCallOutputTimeoutOutcomeParam":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcomeParam":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"The exit code returned by the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCallItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."}},"type":"object","required":["type","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call representing a request to create, delete, or update files using diff patches."},"ApplyPatchCallStatusParam":{"type":"string","enum":["in_progress","completed"],"title":"Apply patch call status","description":"Status values reported for apply_patch tool calls."},"ApplyPatchOperationParam":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperationParam"}]},"ApplyPatchCreateFileOperationParam":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"The operation type. Always `create_file`.","default":"create_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to create relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply when creating the file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction for creating a new file via the apply_patch tool."},"ApplyPatchDeleteFileOperationParam":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"The operation type. Always `delete_file`.","default":"delete_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to delete relative to the workspace root."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction for deleting an existing file via the apply_patch tool."},"ApplyPatchUpdateFileOperationParam":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"The operation type. Always `update_file`.","default":"update_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to update relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply to the existing file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction for updating an existing file via the apply_patch tool."},"ApplyPatchToolCallOutputItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","maxLength":10485760,"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","nullable":true}},"type":"object","required":["type","call_id","status"],"title":"Apply patch tool call output","description":"The streamed output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatusParam":{"type":"string","enum":["completed","failed"],"title":"Apply patch call output status","description":"Outcome values reported for apply_patch tool call outputs."},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"MCPApprovalResponse":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"default":"mcp_approval_response","description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n","nullable":true},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","request_id","approve","approval_request_id"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]},"CustomToolCallOutput":{"type":"object","title":"Custom tool call output","description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output","description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call output in the platform.\n"},"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call.\n"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the custom tool call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the custom tool call.\n"}]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"CustomToolCall":{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call","description":"The type of the custom tool call. Always `custom_tool_call`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call in the platform.\n"},"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output.\n"},"name":{"type":"string","description":"The name of the custom tool being called.\n"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.\n"}},"required":["type","call_id","name","input"]},"ItemReferenceParam":{"properties":{"type":{"type":"string","nullable":true,"enum":["item_reference"],"description":"The type of item to reference. Always `item_reference`.","default":"item_reference"},"id":{"type":"string","description":"The ID of the item to reference."}},"type":"object","required":["id"],"title":"Item reference","description":"An internal identifier for an item to reference."},"IncludeEnum":{"type":"string","enum":["file_search_call.results","web_search_call.results","web_search_call.action.sources","message.input_image.image_url","computer_call_output.output.image_url","code_interpreter_call.outputs","reasoning.encrypted_content","message.output_text.logprobs"],"description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)."},"ResponseStreamOptions":{"description":"Options for streaming responses. Only set this when you set `stream: true`.\n","type":"object","properties":{"include_obfuscation":{"type":"boolean","description":"When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events to\nnormalize payload sizes as a mitigation to certain side-channel attacks.\nThese obfuscation fields are included by default, but add a small amount\nof overhead to the data stream. You can set `include_obfuscation` to\nfalse to optimize for bandwidth if you trust the network links between\nyour application and the API.\n"}},"nullable":true},"ConversationParam":{"description":"The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.\nInput items and output items from this response are automatically added to this conversation after this response completes.\n","anyOf":[{"type":"string","title":"Conversation ID","description":"The unique ID of the conversation.\n"},{"$ref":"#/components/schemas/ConversationParam-2"}]},"ConversationParam-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"type":"object","required":["id"],"title":"Conversation object","description":"The conversation that this response belongs to."},"Response":{"title":"The response object","allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this Response.\n"},"object":{"type":"string","description":"The object type of this resource - always set to `response`.\n","enum":["response"]},"status":{"type":"string","description":"The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n","enum":["completed","failed","in_progress","cancelled","queued","incomplete"]},"created_at":{"type":"number","description":"Unix timestamp (in seconds) of when this Response was created.\n"},"error":{"$ref":"#/components/schemas/ResponseError"},"incomplete_details":{"type":"object","description":"Details about why the response is incomplete.\n","properties":{"reason":{"type":"string","description":"The reason why the response is incomplete.","enum":["max_output_tokens","content_filter"]}},"nullable":true},"output":{"type":"array","description":"An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n  on the model's response.\n- Rather than accessing the first item in the `output` array and\n  assuming it's an `assistant` message with the content generated by\n  the model, you might consider using the `output_text` property where\n  supported in SDKs.\n","items":{"$ref":"#/components/schemas/OutputItem"}},"instructions":{"description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","anyOf":[{"type":"string","description":"A text input to the model, equivalent to a text input with the\n`developer` role.\n"},{"type":"array","title":"Input item list","description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"}}],"nullable":true},"output_text":{"type":"string","description":"SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n","nullable":true},"usage":{"$ref":"#/components/schemas/ResponseUsage"},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.\n","default":true},"conversation":{"$ref":"#/components/schemas/Conversation-2","nullable":true},"provider":{"type":"string","description":"The upstream provider that served the request (e.g. `openai`). Nexos extension.\n"},"nexos_model_uuid":{"type":"string","description":"The nexos model identifier (company model UUID) used for this response. Same value as\nthe `X-Nexos-Model-Id` response header; can be passed as `model` in subsequent\nrequests. Nexos extension.\n"},"nexos_model_name":{"type":"string","description":"The nexos model name used for this response (the value accepted as `model` in\nsubsequent requests). Nexos extension.\n"},"cost_savings":{"$ref":"#/components/schemas/CostSavings"},"completed_at":{"type":"number","nullable":true,"description":"Unix timestamp (in seconds) of when the response generation completed.\nPassed through from the upstream provider.\n"},"store":{"type":"boolean","description":"Whether the response is stored for later retrieval. Echoed from the request\nby the upstream provider.\n"},"frequency_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"presence_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"moderation":{"type":"object","nullable":true,"description":"Moderation details passed through from the upstream provider, when available.\n"},"content_filters":{"type":"array","nullable":true,"description":"Content-filter annotations passed through from the upstream provider\n(returned by Azure-hosted models).\n","items":{"type":"object","properties":{"blocked":{"type":"boolean"},"source_type":{"type":"string"},"content_filter_raw":{"type":"array","items":{"type":"object"}},"content_filter_results":{"type":"object"},"content_filter_offsets":{"type":"object","properties":{"check_offset":{"type":"integer"},"start_offset":{"type":"integer"},"end_offset":{"type":"integer"}}}}}},"tool_usage":{"type":"object","nullable":true,"description":"Aggregated built-in tool usage for this response. Nexos extension.\n","properties":{"image_gen":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"}}},"web_search":{"type":"object","properties":{"num_requests":{"type":"integer"}}}}}},"required":["id","object","created_at","error","incomplete_details","instructions","model","tools","output","parallel_tool_calls","metadata","tool_choice","temperature","top_p"]}]},"ResponseError":{"type":"object","description":"An error object returned when the model fails to generate a Response.\n","properties":{"code":{"$ref":"#/components/schemas/ResponseErrorCode"},"message":{"type":"string","description":"A human-readable description of the error.\n"}},"required":["code","message"],"nullable":true},"ResponseErrorCode":{"type":"string","description":"The error code for the response.\n","enum":["server_error","rate_limit_exceeded","invalid_prompt","vector_store_timeout","invalid_image","invalid_image_format","invalid_base64_image","invalid_image_url","image_too_large","image_too_small","image_parse_error","image_content_policy_violation","invalid_image_mode","image_file_too_large","unsupported_image_media_type","empty_image_file","failed_to_download_image","image_file_not_found"]},"OutputItem":{"anyOf":[{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/CustomToolCall"}],"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"]},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"ResponseUsage":{"type":"object","description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n","properties":{"input_tokens":{"type":"integer","description":"The number of input tokens."},"input_tokens_details":{"type":"object","description":"A detailed breakdown of the input tokens.","properties":{"cached_tokens":{"type":"integer","description":"The number of tokens retrieved from cache. See prompt caching for details.\n"},"cache_write_tokens":{"type":"integer","description":"The number of tokens written to cache. Nexos extension.\n"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"Conversation-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"type":"object","required":["id"],"title":"Conversation","description":"The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation."},"CostSavings":{"type":"object","description":"Cost savings for this request, in the same unit as `usage.nexos_credits_cost`.\n`baseline_cost` is what the request would have cost without nexos optimizations; it equals\n`charged_cost` plus every non-null saving. A saving is `null` when its optimization did not\napply to the request, and `0` when it applied but saved nothing. Nexos extension.\n","properties":{"baseline_cost":{"type":"number","format":"double","description":"Cost the request would have had without nexos optimizations."},"charged_cost":{"type":"number","format":"double","description":"Cost actually charged for the request. Same value as `usage.nexos_credits_cost`."},"cache_optimization":{"type":"number","format":"double","nullable":true,"description":"Saving from prompt cache breakpoints injected by the nexos optimizer. Negative when writing the cache cost more than it saved on this request (cache writes are billed above the normal input rate); later cache reads recover it. `null` when the optimizer did not inject cache control."},"nexos_cache":{"type":"number","format":"double","nullable":true,"description":"Saving from serving the response from the nexos response cache. `null` when the response was not served from cache."}},"required":["baseline_cost","charged_cost","cache_optimization","nexos_cache"]},"ResponseStreamEvent":{"anyOf":[{"$ref":"#/components/schemas/ResponseAudioDeltaEvent"},{"$ref":"#/components/schemas/ResponseAudioDoneEvent"},{"$ref":"#/components/schemas/ResponseAudioTranscriptDeltaEvent"},{"$ref":"#/components/schemas/ResponseAudioTranscriptDoneEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallCodeDeltaEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallCodeDoneEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseCodeInterpreterCallInterpretingEvent"},{"$ref":"#/components/schemas/ResponseCompletedEvent"},{"$ref":"#/components/schemas/ResponseContentPartAddedEvent"},{"$ref":"#/components/schemas/ResponseContentPartDoneEvent"},{"$ref":"#/components/schemas/ResponseCreatedEvent"},{"$ref":"#/components/schemas/ResponseErrorEvent"},{"$ref":"#/components/schemas/ResponseFileSearchCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseFileSearchCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseFileSearchCallSearchingEvent"},{"$ref":"#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent"},{"$ref":"#/components/schemas/ResponseFunctionCallArgumentsDoneEvent"},{"$ref":"#/components/schemas/ResponseInProgressEvent"},{"$ref":"#/components/schemas/ResponseFailedEvent"},{"$ref":"#/components/schemas/ResponseIncompleteEvent"},{"$ref":"#/components/schemas/ResponseOutputItemAddedEvent"},{"$ref":"#/components/schemas/ResponseOutputItemDoneEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryPartAddedEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryPartDoneEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryTextDeltaEvent"},{"$ref":"#/components/schemas/ResponseReasoningSummaryTextDoneEvent"},{"$ref":"#/components/schemas/ResponseReasoningTextDeltaEvent"},{"$ref":"#/components/schemas/ResponseReasoningTextDoneEvent"},{"$ref":"#/components/schemas/ResponseRefusalDeltaEvent"},{"$ref":"#/components/schemas/ResponseRefusalDoneEvent"},{"$ref":"#/components/schemas/ResponseTextDeltaEvent"},{"$ref":"#/components/schemas/ResponseTextDoneEvent"},{"$ref":"#/components/schemas/ResponseWebSearchCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseWebSearchCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseWebSearchCallSearchingEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallGeneratingEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseImageGenCallPartialImageEvent"},{"$ref":"#/components/schemas/ResponseMCPCallArgumentsDeltaEvent"},{"$ref":"#/components/schemas/ResponseMCPCallArgumentsDoneEvent"},{"$ref":"#/components/schemas/ResponseMCPCallCompletedEvent"},{"$ref":"#/components/schemas/ResponseMCPCallFailedEvent"},{"$ref":"#/components/schemas/ResponseMCPCallInProgressEvent"},{"$ref":"#/components/schemas/ResponseMCPListToolsCompletedEvent"},{"$ref":"#/components/schemas/ResponseMCPListToolsFailedEvent"},{"$ref":"#/components/schemas/ResponseMCPListToolsInProgressEvent"},{"$ref":"#/components/schemas/ResponseOutputTextAnnotationAddedEvent"},{"$ref":"#/components/schemas/ResponseQueuedEvent"},{"$ref":"#/components/schemas/ResponseCustomToolCallInputDeltaEvent"},{"$ref":"#/components/schemas/ResponseCustomToolCallInputDoneEvent"}],"discriminator":{"propertyName":"type"}},"ResponseAudioDeltaEvent":{"type":"object","description":"Emitted when there is a partial audio response.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.audio.delta`.\n","enum":["response.audio.delta"]},"sequence_number":{"type":"integer","description":"A sequence number for this chunk of the stream response.\n"},"delta":{"type":"string","description":"A chunk of Base64 encoded response audio bytes.\n"}},"required":["type","delta","sequence_number"]},"ResponseAudioDoneEvent":{"type":"object","description":"Emitted when the audio response is complete.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.audio.done`.\n","enum":["response.audio.done"]},"sequence_number":{"type":"integer","description":"The sequence number of the delta.\n"}},"required":["type","sequence_number","response_id"]},"ResponseAudioTranscriptDeltaEvent":{"type":"object","description":"Emitted when there is a partial transcript of audio.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.audio.transcript.delta`.\n","enum":["response.audio.transcript.delta"]},"delta":{"type":"string","description":"The partial transcript of the audio response.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","response_id","delta","sequence_number"]},"ResponseAudioTranscriptDoneEvent":{"type":"object","description":"Emitted when the full audio transcript is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.audio.transcript.done`.\n","enum":["response.audio.transcript.done"]},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","response_id","sequence_number"]},"ResponseCodeInterpreterCallCodeDeltaEvent":{"type":"object","description":"Emitted when a partial code snippet is streamed by the code interpreter.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call_code.delta`.","enum":["response.code_interpreter_call_code.delta"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code is being streamed."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"delta":{"type":"string","description":"The partial code snippet being streamed by the code interpreter."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","delta","sequence_number"]},"ResponseCodeInterpreterCallCodeDoneEvent":{"type":"object","description":"Emitted when the code snippet is finalized by the code interpreter.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call_code.done`.","enum":["response.code_interpreter_call_code.done"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code is finalized."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"code":{"type":"string","description":"The final code snippet output by the code interpreter."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","code","sequence_number"]},"ResponseCodeInterpreterCallCompletedEvent":{"type":"object","description":"Emitted when the code interpreter call is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call.completed`.","enum":["response.code_interpreter_call.completed"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code interpreter call is completed."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseCodeInterpreterCallInProgressEvent":{"type":"object","description":"Emitted when a code interpreter call is in progress.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call.in_progress`.","enum":["response.code_interpreter_call.in_progress"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code interpreter call is in progress."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseCodeInterpreterCallInterpretingEvent":{"type":"object","description":"Emitted when the code interpreter is actively interpreting the code snippet.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.code_interpreter_call.interpreting`.","enum":["response.code_interpreter_call.interpreting"]},"output_index":{"type":"integer","description":"The index of the output item in the response for which the code interpreter is interpreting code."},"item_id":{"type":"string","description":"The unique identifier of the code interpreter tool call item."},"sequence_number":{"type":"integer","description":"The sequence number of this event, used to order streaming events."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseCompletedEvent":{"type":"object","description":"Emitted when the model response is complete.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.completed`.\n","enum":["response.completed"]},"response":{"$ref":"#/components/schemas/Response","description":"Properties of the completed response.\n"},"sequence_number":{"type":"integer","description":"The sequence number for this event."}},"required":["type","response","sequence_number"]},"ResponseContentPartAddedEvent":{"type":"object","description":"Emitted when a new content part is added.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.content_part.added`.\n","enum":["response.content_part.added"]},"item_id":{"type":"string","description":"The ID of the output item that the content part was added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the content part was added to.\n"},"content_index":{"type":"integer","description":"The index of the content part that was added.\n"},"part":{"$ref":"#/components/schemas/OutputContent","description":"The content part that was added.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","content_index","part","sequence_number"]},"OutputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"},{"$ref":"#/components/schemas/ReasoningTextContent"}]},"ResponseContentPartDoneEvent":{"type":"object","description":"Emitted when a content part is done.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.content_part.done`.\n","enum":["response.content_part.done"]},"item_id":{"type":"string","description":"The ID of the output item that the content part was added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the content part was added to.\n"},"content_index":{"type":"integer","description":"The index of the content part that is done.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"part":{"$ref":"#/components/schemas/OutputContent","description":"The content part that is done.\n"}},"required":["type","item_id","output_index","content_index","part","sequence_number"]},"ResponseCreatedEvent":{"type":"object","description":"An event that is emitted when a response is created.\n","properties":{"type":{"type":"string","description":"The type of the event. Always `response.created`.\n","enum":["response.created"]},"response":{"$ref":"#/components/schemas/Response","description":"The response that was created.\n"},"sequence_number":{"type":"integer","description":"The sequence number for this event."}},"required":["type","response","sequence_number"]},"ResponseErrorEvent":{"type":"object","description":"Emitted when an error occurs.","properties":{"type":{"type":"string","description":"The type of the event. Always `error`.\n","enum":["error"]},"code":{"type":"string","description":"The error code.\n","nullable":true},"message":{"type":"string","description":"The error message.\n"},"param":{"type":"string","description":"The error parameter.\n","nullable":true},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","code","message","param","sequence_number"]},"ResponseFileSearchCallCompletedEvent":{"type":"object","description":"Emitted when a file search call is completed (results found).","properties":{"type":{"type":"string","description":"The type of the event. Always `response.file_search_call.completed`.\n","enum":["response.file_search_call.completed"]},"output_index":{"type":"integer","description":"The index of the output item that the file search call is initiated.\n"},"item_id":{"type":"string","description":"The ID of the output item that the file search call is initiated.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseFileSearchCallInProgressEvent":{"type":"object","description":"Emitted when a file search call is initiated.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.file_search_call.in_progress`.\n","enum":["response.file_search_call.in_progress"]},"output_index":{"type":"integer","description":"The index of the output item that the file search call is initiated.\n"},"item_id":{"type":"string","description":"The ID of the output item that the file search call is initiated.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseFileSearchCallSearchingEvent":{"type":"object","description":"Emitted when a file search is currently searching.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.file_search_call.searching`.\n","enum":["response.file_search_call.searching"]},"output_index":{"type":"integer","description":"The index of the output item that the file search call is searching.\n"},"item_id":{"type":"string","description":"The ID of the output item that the file search call is initiated.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseFunctionCallArgumentsDeltaEvent":{"type":"object","description":"Emitted when there is a partial function-call arguments delta.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.function_call_arguments.delta`.\n","enum":["response.function_call_arguments.delta"]},"item_id":{"type":"string","description":"The ID of the output item that the function-call arguments delta is added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the function-call arguments delta is added to.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"delta":{"type":"string","description":"The function-call arguments delta that is added.\n"}},"required":["type","item_id","output_index","delta","sequence_number"]},"ResponseFunctionCallArgumentsDoneEvent":{"type":"object","description":"Emitted when function-call arguments are finalized.","properties":{"type":{"type":"string","enum":["response.function_call_arguments.done"]},"item_id":{"type":"string","description":"The ID of the item."},"name":{"type":"string","description":"The name of the function that was called."},"output_index":{"type":"integer","description":"The index of the output item."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"arguments":{"type":"string","description":"The function-call arguments."}},"required":["type","item_id","name","output_index","arguments","sequence_number"]},"ResponseInProgressEvent":{"type":"object","description":"Emitted when the response is in progress.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.in_progress`.\n","enum":["response.in_progress"]},"response":{"$ref":"#/components/schemas/Response","description":"The response that is in progress.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","response","sequence_number"]},"ResponseFailedEvent":{"type":"object","description":"An event that is emitted when a response fails.\n","properties":{"type":{"type":"string","description":"The type of the event. Always `response.failed`.\n","enum":["response.failed"]},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"response":{"$ref":"#/components/schemas/Response","description":"The response that failed.\n"}},"required":["type","response","sequence_number"]},"ResponseIncompleteEvent":{"type":"object","description":"An event that is emitted when a response finishes as incomplete.\n","properties":{"type":{"type":"string","description":"The type of the event. Always `response.incomplete`.\n","enum":["response.incomplete"]},"response":{"$ref":"#/components/schemas/Response","description":"The response that was incomplete.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","response","sequence_number"]},"ResponseOutputItemAddedEvent":{"type":"object","description":"Emitted when a new output item is added.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.output_item.added`.\n","enum":["response.output_item.added"]},"output_index":{"type":"integer","description":"The index of the output item that was added.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"},"item":{"$ref":"#/components/schemas/OutputItem","description":"The output item that was added.\n"}},"required":["type","output_index","item","sequence_number"]},"ResponseOutputItemDoneEvent":{"type":"object","description":"Emitted when an output item is marked done.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.output_item.done`.\n","enum":["response.output_item.done"]},"output_index":{"type":"integer","description":"The index of the output item that was marked done.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"},"item":{"$ref":"#/components/schemas/OutputItem","description":"The output item that was marked done.\n"}},"required":["type","output_index","item","sequence_number"]},"ResponseReasoningSummaryPartAddedEvent":{"type":"object","description":"Emitted when a new reasoning summary part is added.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_summary_part.added`.\n","enum":["response.reasoning_summary_part.added"]},"item_id":{"type":"string","description":"The ID of the item this summary part is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this summary part is associated with.\n"},"summary_index":{"type":"integer","description":"The index of the summary part within the reasoning summary.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"},"part":{"type":"object","description":"The summary part that was added.\n","properties":{"type":{"type":"string","description":"The type of the summary part. Always `summary_text`.","enum":["summary_text"]},"text":{"type":"string","description":"The text of the summary part."}},"required":["type","text"]}},"required":["type","item_id","output_index","summary_index","part","sequence_number"]},"ResponseReasoningSummaryPartDoneEvent":{"type":"object","description":"Emitted when a reasoning summary part is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_summary_part.done`.\n","enum":["response.reasoning_summary_part.done"]},"item_id":{"type":"string","description":"The ID of the item this summary part is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this summary part is associated with.\n"},"summary_index":{"type":"integer","description":"The index of the summary part within the reasoning summary.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"},"part":{"type":"object","description":"The completed summary part.\n","properties":{"type":{"type":"string","description":"The type of the summary part. Always `summary_text`.","enum":["summary_text"]},"text":{"type":"string","description":"The text of the summary part."}},"required":["type","text"]}},"required":["type","item_id","output_index","summary_index","part","sequence_number"]},"ResponseReasoningSummaryTextDeltaEvent":{"type":"object","description":"Emitted when a delta is added to a reasoning summary text.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_summary_text.delta`.\n","enum":["response.reasoning_summary_text.delta"]},"item_id":{"type":"string","description":"The ID of the item this summary text delta is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this summary text delta is associated with.\n"},"summary_index":{"type":"integer","description":"The index of the summary part within the reasoning summary.\n"},"delta":{"type":"string","description":"The text delta that was added to the summary.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","summary_index","delta","sequence_number"]},"ResponseReasoningSummaryTextDoneEvent":{"type":"object","description":"Emitted when a reasoning summary text is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_summary_text.done`.\n","enum":["response.reasoning_summary_text.done"]},"item_id":{"type":"string","description":"The ID of the item this summary text is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this summary text is associated with.\n"},"summary_index":{"type":"integer","description":"The index of the summary part within the reasoning summary.\n"},"text":{"type":"string","description":"The full text of the completed reasoning summary.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","summary_index","text","sequence_number"]},"ResponseReasoningTextDeltaEvent":{"type":"object","description":"Emitted when a delta is added to a reasoning text.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_text.delta`.\n","enum":["response.reasoning_text.delta"]},"item_id":{"type":"string","description":"The ID of the item this reasoning text delta is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this reasoning text delta is associated with.\n"},"content_index":{"type":"integer","description":"The index of the reasoning content part this delta is associated with.\n"},"delta":{"type":"string","description":"The text delta that was added to the reasoning content.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","content_index","delta","sequence_number"]},"ResponseReasoningTextDoneEvent":{"type":"object","description":"Emitted when a reasoning text is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.reasoning_text.done`.\n","enum":["response.reasoning_text.done"]},"item_id":{"type":"string","description":"The ID of the item this reasoning text is associated with.\n"},"output_index":{"type":"integer","description":"The index of the output item this reasoning text is associated with.\n"},"content_index":{"type":"integer","description":"The index of the reasoning content part.\n"},"text":{"type":"string","description":"The full text of the completed reasoning content.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","content_index","text","sequence_number"]},"ResponseRefusalDeltaEvent":{"type":"object","description":"Emitted when there is a partial refusal text.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.refusal.delta`.\n","enum":["response.refusal.delta"]},"item_id":{"type":"string","description":"The ID of the output item that the refusal text is added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the refusal text is added to.\n"},"content_index":{"type":"integer","description":"The index of the content part that the refusal text is added to.\n"},"delta":{"type":"string","description":"The refusal text that is added.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","content_index","delta","sequence_number"]},"ResponseRefusalDoneEvent":{"type":"object","description":"Emitted when refusal text is finalized.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.refusal.done`.\n","enum":["response.refusal.done"]},"item_id":{"type":"string","description":"The ID of the output item that the refusal text is finalized.\n"},"output_index":{"type":"integer","description":"The index of the output item that the refusal text is finalized.\n"},"content_index":{"type":"integer","description":"The index of the content part that the refusal text is finalized.\n"},"refusal":{"type":"string","description":"The refusal text that is finalized.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event.\n"}},"required":["type","item_id","output_index","content_index","refusal","sequence_number"]},"ResponseTextDeltaEvent":{"type":"object","description":"Emitted when there is an additional text delta.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.output_text.delta`.\n","enum":["response.output_text.delta"]},"item_id":{"type":"string","description":"The ID of the output item that the text delta was added to.\n"},"output_index":{"type":"integer","description":"The index of the output item that the text delta was added to.\n"},"content_index":{"type":"integer","description":"The index of the content part that the text delta was added to.\n"},"delta":{"type":"string","description":"The text delta that was added.\n"},"sequence_number":{"type":"integer","description":"The sequence number for this event."},"logprobs":{"type":"array","description":"The log probabilities of the tokens in the delta.\n","items":{"$ref":"#/components/schemas/ResponseLogProb"}}},"required":["type","item_id","output_index","content_index","delta","sequence_number","logprobs"]},"ResponseLogProb":{"type":"object","description":"A logprob is the logarithmic probability that the model assigns to producing \na particular token at a given position in the sequence. Less-negative (higher) \nlogprob values indicate greater model confidence in that token choice.\n","properties":{"token":{"description":"A possible text token.","type":"string"},"logprob":{"description":"The log probability of this token.\n","type":"number"},"top_logprobs":{"description":"The log probability of the top 20 most likely tokens.\n","type":"array","items":{"type":"object","properties":{"token":{"description":"A possible text token.","type":"string"},"logprob":{"description":"The log probability of this token.","type":"number"}}}}},"required":["token","logprob"]},"ResponseTextDoneEvent":{"type":"object","description":"Emitted when text content is finalized.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.output_text.done`.\n","enum":["response.output_text.done"]},"item_id":{"type":"string","description":"The ID of the output item that the text content is finalized.\n"},"output_index":{"type":"integer","description":"The index of the output item that the text content is finalized.\n"},"content_index":{"type":"integer","description":"The index of the content part that the text content is finalized.\n"},"text":{"type":"string","description":"The text content that is finalized.\n"},"sequence_number":{"type":"integer","description":"The sequence number for this event."},"logprobs":{"type":"array","description":"The log probabilities of the tokens in the delta.\n","items":{"$ref":"#/components/schemas/ResponseLogProb"}}},"required":["type","item_id","output_index","content_index","text","sequence_number","logprobs"]},"ResponseWebSearchCallCompletedEvent":{"type":"object","description":"Emitted when a web search call is completed.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.web_search_call.completed`.\n","enum":["response.web_search_call.completed"]},"output_index":{"type":"integer","description":"The index of the output item that the web search call is associated with.\n"},"item_id":{"type":"string","description":"Unique ID for the output item associated with the web search call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of the web search call being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseWebSearchCallInProgressEvent":{"type":"object","description":"Emitted when a web search call is initiated.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.web_search_call.in_progress`.\n","enum":["response.web_search_call.in_progress"]},"output_index":{"type":"integer","description":"The index of the output item that the web search call is associated with.\n"},"item_id":{"type":"string","description":"Unique ID for the output item associated with the web search call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of the web search call being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseWebSearchCallSearchingEvent":{"type":"object","description":"Emitted when a web search call is executing.","properties":{"type":{"type":"string","description":"The type of the event. Always `response.web_search_call.searching`.\n","enum":["response.web_search_call.searching"]},"output_index":{"type":"integer","description":"The index of the output item that the web search call is associated with.\n"},"item_id":{"type":"string","description":"Unique ID for the output item associated with the web search call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of the web search call being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseImageGenCallCompletedEvent":{"type":"object","title":"ResponseImageGenCallCompletedEvent","description":"Emitted when an image generation tool call has completed and the final image is available.\n","properties":{"type":{"type":"string","enum":["response.image_generation_call.completed"],"description":"The type of the event. Always 'response.image_generation_call.completed'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"item_id":{"type":"string","description":"The unique identifier of the image generation item being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseImageGenCallGeneratingEvent":{"type":"object","title":"ResponseImageGenCallGeneratingEvent","description":"Emitted when an image generation tool call is actively generating an image (intermediate state).\n","properties":{"type":{"type":"string","enum":["response.image_generation_call.generating"],"description":"The type of the event. Always 'response.image_generation_call.generating'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the image generation item being processed."},"sequence_number":{"type":"integer","description":"The sequence number of the image generation item being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseImageGenCallInProgressEvent":{"type":"object","title":"ResponseImageGenCallInProgressEvent","description":"Emitted when an image generation tool call is in progress.\n","properties":{"type":{"type":"string","enum":["response.image_generation_call.in_progress"],"description":"The type of the event. Always 'response.image_generation_call.in_progress'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the image generation item being processed."},"sequence_number":{"type":"integer","description":"The sequence number of the image generation item being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseImageGenCallPartialImageEvent":{"type":"object","title":"ResponseImageGenCallPartialImageEvent","description":"Emitted when a partial image is available during image generation streaming.\n","properties":{"type":{"type":"string","enum":["response.image_generation_call.partial_image"],"description":"The type of the event. Always 'response.image_generation_call.partial_image'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the image generation item being processed."},"sequence_number":{"type":"integer","description":"The sequence number of the image generation item being processed."},"partial_image_index":{"type":"integer","description":"0-based index for the partial image (backend is 1-based, but this is 0-based for the user)."},"partial_image_b64":{"type":"string","description":"Base64-encoded partial image data, suitable for rendering as an image."}},"required":["type","output_index","item_id","sequence_number","partial_image_index","partial_image_b64"]},"ResponseMCPCallArgumentsDeltaEvent":{"type":"object","title":"ResponseMCPCallArgumentsDeltaEvent","description":"Emitted when there is a delta (partial update) to the arguments of an MCP tool call.\n","properties":{"type":{"type":"string","enum":["response.mcp_call_arguments.delta"],"description":"The type of the event. Always 'response.mcp_call_arguments.delta'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the MCP tool call item being processed."},"delta":{"type":"string","description":"A JSON string containing the partial update to the arguments for the MCP tool call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","delta","sequence_number"]},"ResponseMCPCallArgumentsDoneEvent":{"type":"object","title":"ResponseMCPCallArgumentsDoneEvent","description":"Emitted when the arguments for an MCP tool call are finalized.\n","properties":{"type":{"type":"string","enum":["response.mcp_call_arguments.done"],"description":"The type of the event. Always 'response.mcp_call_arguments.done'."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the MCP tool call item being processed."},"arguments":{"type":"string","description":"A JSON string containing the finalized arguments for the MCP tool call.\n"},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","output_index","item_id","arguments","sequence_number"]},"ResponseMCPCallCompletedEvent":{"type":"object","title":"ResponseMCPCallCompletedEvent","description":"Emitted when an MCP  tool call has completed successfully.\n","properties":{"type":{"type":"string","enum":["response.mcp_call.completed"],"description":"The type of the event. Always 'response.mcp_call.completed'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that completed."},"output_index":{"type":"integer","description":"The index of the output item that completed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseMCPCallFailedEvent":{"type":"object","title":"ResponseMCPCallFailedEvent","description":"Emitted when an MCP  tool call has failed.\n","properties":{"type":{"type":"string","enum":["response.mcp_call.failed"],"description":"The type of the event. Always 'response.mcp_call.failed'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that failed."},"output_index":{"type":"integer","description":"The index of the output item that failed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseMCPCallInProgressEvent":{"type":"object","title":"ResponseMCPCallInProgressEvent","description":"Emitted when an MCP  tool call is in progress.\n","properties":{"type":{"type":"string","enum":["response.mcp_call.in_progress"],"description":"The type of the event. Always 'response.mcp_call.in_progress'."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"item_id":{"type":"string","description":"The unique identifier of the MCP tool call item being processed."}},"required":["type","output_index","item_id","sequence_number"]},"ResponseMCPListToolsCompletedEvent":{"type":"object","title":"ResponseMCPListToolsCompletedEvent","description":"Emitted when the list of available MCP tools has been successfully retrieved.\n","properties":{"type":{"type":"string","enum":["response.mcp_list_tools.completed"],"description":"The type of the event. Always 'response.mcp_list_tools.completed'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that produced this output."},"output_index":{"type":"integer","description":"The index of the output item that was processed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseMCPListToolsFailedEvent":{"type":"object","title":"ResponseMCPListToolsFailedEvent","description":"Emitted when the attempt to list available MCP tools has failed.\n","properties":{"type":{"type":"string","enum":["response.mcp_list_tools.failed"],"description":"The type of the event. Always 'response.mcp_list_tools.failed'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that failed."},"output_index":{"type":"integer","description":"The index of the output item that failed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseMCPListToolsInProgressEvent":{"type":"object","title":"ResponseMCPListToolsInProgressEvent","description":"Emitted when the system is in the process of retrieving the list of available MCP tools.\n","properties":{"type":{"type":"string","enum":["response.mcp_list_tools.in_progress"],"description":"The type of the event. Always 'response.mcp_list_tools.in_progress'."},"item_id":{"type":"string","description":"The ID of the MCP tool call item that is being processed."},"output_index":{"type":"integer","description":"The index of the output item that is being processed."},"sequence_number":{"type":"integer","description":"The sequence number of this event."}},"required":["type","item_id","output_index","sequence_number"]},"ResponseOutputTextAnnotationAddedEvent":{"type":"object","title":"ResponseOutputTextAnnotationAddedEvent","description":"Emitted when an annotation is added to output text content.\n","properties":{"type":{"type":"string","enum":["response.output_text.annotation.added"],"description":"The type of the event. Always 'response.output_text.annotation.added'."},"item_id":{"type":"string","description":"The unique identifier of the item to which the annotation is being added."},"output_index":{"type":"integer","description":"The index of the output item in the response's output array."},"content_index":{"type":"integer","description":"The index of the content part within the output item."},"annotation_index":{"type":"integer","description":"The index of the annotation within the content part."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"annotation":{"type":"object","description":"The annotation object being added. (See annotation schema for details.)"}},"required":["type","item_id","output_index","content_index","annotation_index","annotation","sequence_number"]},"ResponseQueuedEvent":{"type":"object","title":"ResponseQueuedEvent","description":"Emitted when a response is queued and waiting to be processed.\n","properties":{"type":{"type":"string","enum":["response.queued"],"description":"The type of the event. Always 'response.queued'."},"response":{"$ref":"#/components/schemas/Response","description":"The full response object that is queued."},"sequence_number":{"type":"integer","description":"The sequence number for this event."}},"required":["type","response","sequence_number"]},"ResponseCustomToolCallInputDeltaEvent":{"title":"ResponseCustomToolCallInputDelta","type":"object","description":"Event representing a delta (partial update) to the input of a custom tool call.\n","properties":{"type":{"type":"string","enum":["response.custom_tool_call_input.delta"],"description":"The event type identifier."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"output_index":{"type":"integer","description":"The index of the output this delta applies to."},"item_id":{"type":"string","description":"Unique identifier for the API item associated with this event."},"delta":{"type":"string","description":"The incremental input data (delta) for the custom tool call."}},"required":["type","output_index","item_id","delta","sequence_number"]},"ResponseCustomToolCallInputDoneEvent":{"title":"ResponseCustomToolCallInputDone","type":"object","description":"Event indicating that input for a custom tool call is complete.\n","properties":{"type":{"type":"string","enum":["response.custom_tool_call_input.done"],"description":"The event type identifier."},"sequence_number":{"type":"integer","description":"The sequence number of this event."},"output_index":{"type":"integer","description":"The index of the output this event applies to."},"item_id":{"type":"string","description":"Unique identifier for the API item associated with this event."},"input":{"type":"string","description":"The complete input data for the custom tool call."}},"required":["type","output_index","item_id","input","sequence_number"]}}},"paths":{"/v1/responses":{"post":{"operationId":"createResponse","tags":["Responses"],"summary":"Create a model response","parameters":[{"in":"header","name":"X-Session-Id","required":false,"schema":{"type":"string","maxLength":256},"description":"Optional client-provided identifier for grouping requests into a session. Leading and\ntrailing whitespace is trimmed; blank values, values longer than 256 bytes, and values\nwith non-printable or non-ASCII characters are ignored. Takes precedence over\n`X-Claude-Code-Session-Id`, `session-id`, and `thread-id`. When none of these headers has\na usable value, the request's `conversation` identifier is used if present, whether\nsupplied as a string or an object with an `id`. Otherwise, a session fingerprint is\nderived from the first user input and the authenticated company, user, and team identity,\nif usable text is available. When chaining turns with `previous_response_id`, send this\nheader (or `conversation`) with a stable value on every turn - the fingerprint is derived\nfrom each turn's own input and will otherwise differ per turn. This header does not load\nconversation history.\n"},{"in":"header","name":"X-Claude-Code-Session-Id","required":false,"schema":{"type":"string","maxLength":256},"description":"Alternative client-provided session identifier, supported for Claude Code clients. Used\nonly when `X-Session-Id` has no usable value. Takes precedence over `session-id` and\n`thread-id`. Leading and trailing whitespace is trimmed; blank values, values longer than\n256 bytes, and values with non-printable or non-ASCII characters are ignored. This header\ndoes not load conversation history.\n"},{"in":"header","name":"thread-id","required":false,"schema":{"type":"string","maxLength":256},"description":"Alternative client-provided session identifier, supported for Codex clients. Used only\nwhen none of `X-Session-Id`, `X-Claude-Code-Session-Id`, and `session-id` has a usable\nvalue. Leading and trailing whitespace is trimmed; blank values, values longer than 256\nbytes, and values with non-printable or non-ASCII characters are ignored. This header does\nnot load conversation history.\n"},{"in":"header","name":"session-id","required":false,"schema":{"type":"string","maxLength":256},"description":"Alternative client-provided session identifier, supported for Codex clients, which send\none value for a root thread and all of its subagents. Used only when neither\n`X-Session-Id` nor `X-Claude-Code-Session-Id` has a usable value. Takes precedence over\n`thread-id`. Leading and trailing whitespace is trimmed; blank values, values longer than\n256 bytes, and values with non-printable or non-ASCII characters are ignored. This header\ndoes not load conversation history.\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseRequest"}}}},"responses":{"200":{"description":"OK","headers":{"X-Session-Id":{"schema":{"type":"string"},"description":"Session identifier the request was grouped under, resolved from the first usable of: the `X-Session-Id`, `X-Claude-Code-Session-Id`, `session-id`, or `thread-id` request header; otherwise the request's `conversation` identifier; otherwise a fingerprint (`fp1_...`) derived from the authenticated company, user, and team identity and the first user input. Send it back as `X-Session-Id` to keep later requests in the same session. Omitted when no session can be determined."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/ResponseStreamEvent"}}}}},"description":"Creates a model response.\n\n`store: true` is only honored if storing is enabled for the company - a company-level\nsetting that is off by default. When the setting is off, responses are not stored\nregardless of the `store` value sent.\n"}}}}
````

## Get a model response

> Retrieves a model response with the given ID.<br>

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"IncludeEnum":{"type":"string","enum":["file_search_call.results","web_search_call.results","web_search_call.action.sources","message.input_image.image_url","computer_call_output.output.image_url","code_interpreter_call.outputs","reasoning.encrypted_content","message.output_text.logprobs"],"description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)."},"Response":{"title":"The response object","allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this Response.\n"},"object":{"type":"string","description":"The object type of this resource - always set to `response`.\n","enum":["response"]},"status":{"type":"string","description":"The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n","enum":["completed","failed","in_progress","cancelled","queued","incomplete"]},"created_at":{"type":"number","description":"Unix timestamp (in seconds) of when this Response was created.\n"},"error":{"$ref":"#/components/schemas/ResponseError"},"incomplete_details":{"type":"object","description":"Details about why the response is incomplete.\n","properties":{"reason":{"type":"string","description":"The reason why the response is incomplete.","enum":["max_output_tokens","content_filter"]}},"nullable":true},"output":{"type":"array","description":"An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n  on the model's response.\n- Rather than accessing the first item in the `output` array and\n  assuming it's an `assistant` message with the content generated by\n  the model, you might consider using the `output_text` property where\n  supported in SDKs.\n","items":{"$ref":"#/components/schemas/OutputItem"}},"instructions":{"description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","anyOf":[{"type":"string","description":"A text input to the model, equivalent to a text input with the\n`developer` role.\n"},{"type":"array","title":"Input item list","description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"}}],"nullable":true},"output_text":{"type":"string","description":"SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n","nullable":true},"usage":{"$ref":"#/components/schemas/ResponseUsage"},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.\n","default":true},"conversation":{"$ref":"#/components/schemas/Conversation-2","nullable":true},"provider":{"type":"string","description":"The upstream provider that served the request (e.g. `openai`). Nexos extension.\n"},"nexos_model_uuid":{"type":"string","description":"The nexos model identifier (company model UUID) used for this response. Same value as\nthe `X-Nexos-Model-Id` response header; can be passed as `model` in subsequent\nrequests. Nexos extension.\n"},"nexos_model_name":{"type":"string","description":"The nexos model name used for this response (the value accepted as `model` in\nsubsequent requests). Nexos extension.\n"},"cost_savings":{"$ref":"#/components/schemas/CostSavings"},"completed_at":{"type":"number","nullable":true,"description":"Unix timestamp (in seconds) of when the response generation completed.\nPassed through from the upstream provider.\n"},"store":{"type":"boolean","description":"Whether the response is stored for later retrieval. Echoed from the request\nby the upstream provider.\n"},"frequency_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"presence_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"moderation":{"type":"object","nullable":true,"description":"Moderation details passed through from the upstream provider, when available.\n"},"content_filters":{"type":"array","nullable":true,"description":"Content-filter annotations passed through from the upstream provider\n(returned by Azure-hosted models).\n","items":{"type":"object","properties":{"blocked":{"type":"boolean"},"source_type":{"type":"string"},"content_filter_raw":{"type":"array","items":{"type":"object"}},"content_filter_results":{"type":"object"},"content_filter_offsets":{"type":"object","properties":{"check_offset":{"type":"integer"},"start_offset":{"type":"integer"},"end_offset":{"type":"integer"}}}}}},"tool_usage":{"type":"object","nullable":true,"description":"Aggregated built-in tool usage for this response. Nexos extension.\n","properties":{"image_gen":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"}}},"web_search":{"type":"object","properties":{"num_requests":{"type":"integer"}}}}}},"required":["id","object","created_at","error","incomplete_details","instructions","model","tools","output","parallel_tool_calls","metadata","tool_choice","temperature","top_p"]}]},"ModelResponseProperties":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/responses_Metadata"},"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","type":"integer","minimum":0,"maximum":20,"nullable":true},"temperature":{"type":"number","minimum":0,"maximum":2,"default":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n","nullable":true},"top_p":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","nullable":true},"user":{"type":"string","deprecated":true,"description":"Deprecated in favor of `safety_identifier` and `prompt_cache_key`; use `prompt_cache_key` to maintain caching. A stable end-user identifier to improve cache hit rates and help detect abuse.\n"},"safety_identifier":{"type":"string","description":"A stable identifier used to help detect users who may violate usage policies. Use a unique per-user string (e.g., a hash of username or email) to avoid sending identifying information.\n"},"prompt_cache_key":{"type":"string","description":"Used to cache responses for similar requests and improve cache hit rates. Replaces the `user` field.\n"},"service_tier":{"$ref":"#/components/schemas/ServiceTier"},"prompt_cache_retention":{"type":"string","enum":["in_memory","24h"],"description":"Retention policy for the prompt cache. Set to `24h` to keep cached prefixes active longer (up to 24 hours).\n","nullable":true}}},"responses_Metadata":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string"},"nullable":true},"ServiceTier":{"type":"string","description":"Specifies the processing tier for the request.\nThe response includes the actual tier used, which may differ from the requested value.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","nullable":true},"ResponseProperties":{"type":"object","required":["model"],"properties":{"previous_response_id":{"type":"string","description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations. Cannot be used with `conversation`.\n","nullable":true},"model":{"description":"Model ID used to generate the response (e.g., `gpt-4o` or `o3`). See your provider's model guide for available options.\n","type":"string"},"reasoning":{"$ref":"#/components/schemas/Reasoning","nullable":true},"background":{"type":"boolean","description":"Whether to run the model response in the background.\n","default":false,"nullable":true},"max_output_tokens":{"description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.\n","type":"integer","nullable":true},"max_tool_calls":{"description":"The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n","type":"integer","nullable":true},"text":{"$ref":"#/components/schemas/ResponseTextParam"},"tools":{"$ref":"#/components/schemas/ToolsArray"},"tool_choice":{"$ref":"#/components/schemas/ToolChoiceParam"},"prompt":{"$ref":"#/components/schemas/Prompt"},"truncation":{"type":"string","description":"The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n  the model's context window size, the model will truncate the\n  response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n  size for a model, the request will fail with a 400 error.\n","enum":["auto","disabled"],"default":"disabled","nullable":true}}},"Reasoning":{"type":"object","description":"Configuration options for reasoning models. Applicable to gpt-5 and o-series models only.\n","title":"Reasoning","properties":{"effort":{"$ref":"#/components/schemas/ReasoningEffort"},"mode":{"type":"string","description":"Reasoning mode for models that support it. One of `standard` or `pro`.\n","enum":["standard","pro"]},"summary":{"type":"string","nullable":true,"description":"A summary of the model's reasoning.\nOne of `auto`, `concise`, or `detailed` (only `concise` is supported for `computer-use-preview`).\n","enum":["auto","concise","detailed"]},"generate_summary":{"type":"string","nullable":true,"deprecated":true,"description":"Deprecated: use `summary` instead.\nA summary of the model's reasoning. One of `auto`, `concise`, or `detailed`.\n","enum":["auto","concise","detailed"]}}},"ReasoningEffort":{"type":"string","nullable":true,"enum":["none","minimal","low","medium","high"],"default":"medium","description":"Controls how much reasoning effort the model uses. Lower settings are faster and use fewer tokens; higher settings provide more detailed reasoning.\n"},"ResponseTextParam":{"type":"object","description":"Configuration options for a text response. Supports plain text or structured JSON.\n","properties":{"format":{"$ref":"#/components/schemas/TextResponseFormatConfiguration"},"verbosity":{"$ref":"#/components/schemas/Verbosity"}}},"TextResponseFormatConfiguration":{"description":"Specifies the required output format. Use `type: json_schema` to enforce a schema; `type: text` is the default.\n","anyOf":[{"$ref":"#/components/schemas/responses_ResponseFormatText"},{"$ref":"#/components/schemas/TextResponseFormatJsonSchema"},{"$ref":"#/components/schemas/responses_ResponseFormatJsonObject"}],"discriminator":{"propertyName":"type"}},"responses_ResponseFormatText":{"type":"object","title":"Text","description":"Default response format. Used to generate text responses.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `text`.","enum":["text"]}},"required":["type"]},"TextResponseFormatJsonSchema":{"type":"object","title":"JSON schema","description":"JSON Schema response format used to generate structured JSON responses.\nLearn more in the Structured Outputs guide.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"]},"description":{"type":"string","description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"},"schema":{"$ref":"#/components/schemas/responses_ResponseFormatJsonSchemaSchema"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf true, the model will follow the exact schema; only a subset of JSON Schema is supported.\n"}},"required":["type","schema","name"]},"responses_ResponseFormatJsonSchemaSchema":{"type":"object","title":"JSON schema","description":"The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n","additionalProperties":true},"responses_ResponseFormatJsonObject":{"type":"object","title":"JSON object","description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_object`.","enum":["json_object"]}},"required":["type"]},"Verbosity":{"type":"string","nullable":true,"enum":["low","medium","high"],"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n"},"ToolsArray":{"type":"array","description":"An array of tools the model may call while generating a response. Categories include built-in tools, MCP tools, and custom function calls.\n","items":{"$ref":"#/components/schemas/responses_Tool"}},"responses_Tool":{"description":"A tool that can be used to generate a response.\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionTool"},{"$ref":"#/components/schemas/FileSearchTool"},{"$ref":"#/components/schemas/ComputerUsePreviewTool"},{"$ref":"#/components/schemas/WebSearchTool"},{"$ref":"#/components/schemas/MCPTool"},{"$ref":"#/components/schemas/CodeInterpreterTool"},{"$ref":"#/components/schemas/ImageGenTool"},{"$ref":"#/components/schemas/LocalShellToolParam"},{"$ref":"#/components/schemas/FunctionShellToolParam"},{"$ref":"#/components/schemas/CustomToolParam"},{"$ref":"#/components/schemas/WebSearchPreviewTool"},{"$ref":"#/components/schemas/ApplyPatchToolParam"}]},"FunctionTool":{"properties":{"type":{"type":"string","enum":["function"],"description":"The type of the function tool. Always `function`.","default":"function"},"name":{"type":"string","description":"The name of the function to call."},"description":{"type":"string","nullable":true,"description":"A description of the function. Used by the model to determine whether or not to call the function."},"parameters":{"type":"object","nullable":true,"additionalProperties":{},"description":"A JSON schema object describing the parameters of the function."},"strict":{"type":"boolean","nullable":true,"description":"Whether to enforce strict parameter validation. Default `true`."}},"type":"object","required":["type","name","strict","parameters"],"title":"Function","description":"Defines a function in your code that the model can call."},"FileSearchTool":{"properties":{"type":{"type":"string","enum":["file_search"],"description":"The type of the file search tool. Always `file_search`.","default":"file_search"},"vector_store_ids":{"items":{"type":"string"},"type":"array","description":"The IDs of the vector stores to search."},"max_num_results":{"type":"integer","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive."},"ranking_options":{"$ref":"#/components/schemas/RankingOptions","description":"Ranking options for search."},"filters":{"$ref":"#/components/schemas/Filters","description":"A filter to apply.","nullable":true}},"type":"object","required":["type","vector_store_ids"],"title":"File search","description":"Searches uploaded files for relevant content. See the file search guide."},"RankingOptions":{"properties":{"ranker":{"$ref":"#/components/schemas/RankerVersionType","description":"The ranker to use for the file search."},"score_threshold":{"type":"number","description":"The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results."},"hybrid_search":{"$ref":"#/components/schemas/HybridSearchOptions","description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled."}},"type":"object","required":[]},"RankerVersionType":{"type":"string","enum":["auto","default-2024-11-15"]},"HybridSearchOptions":{"properties":{"embedding_weight":{"type":"number","description":"The weight of the embedding in the reciprocal ranking fusion."},"text_weight":{"type":"number","description":"The weight of the text in the reciprocal ranking fusion."}},"type":"object","required":["embedding_weight","text_weight"]},"Filters":{"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]},"ComparisonFilter":{"type":"object","additionalProperties":false,"title":"Comparison Filter","description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n","properties":{"type":{"type":"string","default":"eq","enum":["eq","ne","gt","gte","lt","lte"],"description":"Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"},"key":{"type":"string","description":"The key to compare against the value."},"value":{"description":"The value to compare against the attribute key; supports string, number, or boolean types.","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"$ref":"#/components/schemas/ComparisonFilterValueItems"}}]}},"required":["type","key","value"]},"ComparisonFilterValueItems":{"anyOf":[{"type":"string"},{"type":"number"}]},"CompoundFilter":{"type":"object","additionalProperties":false,"title":"Compound Filter","description":"Combine multiple filters using `and` or `or`.","properties":{"type":{"type":"string","description":"Type of operation: `and` or `or`.","enum":["and","or"]},"filters":{"type":"array","description":"Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]}}},"required":["type","filters"]},"ComputerUsePreviewTool":{"properties":{"type":{"type":"string","enum":["computer_use_preview"],"description":"The type of the computer use tool. Always `computer_use_preview`.","default":"computer_use_preview"},"environment":{"$ref":"#/components/schemas/ComputerEnvironment","description":"The type of computer environment to control."},"display_width":{"type":"integer","description":"The width of the computer display."},"display_height":{"type":"integer","description":"The height of the computer display."}},"type":"object","required":["type","environment","display_width","display_height"],"title":"Computer use preview","description":"A tool that controls a virtual computer. Learn more in the computer tool guide."},"ComputerEnvironment":{"type":"string","enum":["windows","mac","linux","ubuntu","browser"]},"WebSearchTool":{"type":"object","title":"Web search","description":"Search the internet for sources related to the prompt. Learn more in the web search tool guide.\n","properties":{"type":{"type":"string","enum":["web_search","web_search_2025_08_26"],"description":"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.","default":"web_search"},"filters":{"type":"object","description":"Filters for the search.\n","properties":{"allowed_domains":{"type":"array","title":"Allowed domains for the search.","description":"Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n","items":{"type":"string","description":"Allowed domain for the search."},"default":[],"nullable":true}},"nullable":true},"user_location":{"$ref":"#/components/schemas/WebSearchApproximateLocation"},"search_context_size":{"type":"string","enum":["low","medium","high"],"default":"medium","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"required":["type"]},"WebSearchApproximateLocation":{"type":"object","nullable":true,"title":"Web search approximate location","description":"The approximate location of the user.\n","properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","nullable":true,"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."},"region":{"type":"string","nullable":true,"description":"Free text input for the region of the user, e.g. `California`."},"city":{"type":"string","nullable":true,"description":"Free text input for the city of the user, e.g. `San Francisco`."},"timezone":{"type":"string","nullable":true,"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."}}},"MCPTool":{"type":"object","title":"MCP tool","description":"Give the model access to tools via remote Model Context Protocol (MCP) servers. Learn more in the MCP guide.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"The type of the MCP tool. Always `mcp`."},"server_label":{"type":"string","description":"A label for this MCP server, used to identify it in tool calls.\n"},"server_url":{"type":"string","description":"The URL for the MCP server. One of `server_url` or `connector_id` must be\nprovided.\n"},"connector_id":{"type":"string","enum":["connector_dropbox","connector_gmail","connector_googlecalendar","connector_googledrive","connector_microsoftteams","connector_outlookcalendar","connector_outlookemail","connector_sharepoint"],"description":"Identifier for service connectors, like those available in ChatGPT. One of\n`server_url` or `connector_id` must be provided.\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"},"authorization":{"type":"string","description":"An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"},"server_description":{"type":"string","description":"Optional description of the MCP server, used to provide more context.\n"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n","nullable":true},"allowed_tools":{"description":"List of allowed tool names or a filter object.\n","anyOf":[{"type":"array","title":"MCP allowed tools","description":"A string array of allowed tool names","items":{"type":"string"}},{"$ref":"#/components/schemas/MCPToolFilter"}],"nullable":true},"require_approval":{"description":"Specify which of the MCP server's tools require approval.","default":"always","anyOf":[{"type":"object","title":"MCP tool approval filter","description":"Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n","properties":{"always":{"$ref":"#/components/schemas/MCPToolFilter"},"never":{"$ref":"#/components/schemas/MCPToolFilter"}},"additionalProperties":false},{"type":"string","title":"MCP tool approval setting","description":"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n","enum":["always","never"]}],"nullable":true}},"required":["type","server_label"]},"MCPToolFilter":{"type":"object","title":"MCP tool filter","description":"A filter object to specify which tools are allowed.\n","properties":{"tool_names":{"type":"array","title":"MCP allowed tools","items":{"type":"string"},"description":"List of allowed tool names."},"read_only":{"type":"boolean","description":"Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n"}},"required":[],"additionalProperties":false},"CodeInterpreterTool":{"type":"object","title":"Code interpreter","description":"A tool that runs Python code to help generate a response to a prompt.\n","properties":{"type":{"type":"string","enum":["code_interpreter"],"description":"The type of the code interpreter tool. Always `code_interpreter`.\n"},"container":{"description":"The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code.\n","anyOf":[{"type":"string","description":"The container ID."},{"$ref":"#/components/schemas/CodeInterpreterContainerAuto"}]}},"required":["type","container"]},"CodeInterpreterContainerAuto":{"properties":{"type":{"type":"string","enum":["auto"],"description":"Always `auto`.","default":"auto"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"description":"An optional list of uploaded files to make available to your code."},"memory_limit":{"$ref":"#/components/schemas/ContainerMemoryLimit","nullable":true}},"type":"object","required":["type"],"title":"CodeInterpreterToolAuto","description":"Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on."},"ContainerMemoryLimit":{"type":"string","enum":["1g","4g","16g","64g"]},"ImageGenTool":{"type":"object","title":"Image generation tool","description":"A tool that generates images using a model like `gpt-image-1`.\n","properties":{"type":{"type":"string","enum":["image_generation"],"description":"The type of the image generation tool. Always `image_generation`.\n"},"model":{"type":"string","enum":["gpt-image-1","gpt-image-1-mini"],"description":"The image generation model to use. Default: `gpt-image-1`.\n","default":"gpt-image-1"},"quality":{"type":"string","enum":["low","medium","high","auto"],"description":"The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.\n","default":"auto"},"size":{"type":"string","enum":["1024x1024","1024x1536","1536x1024","auto"],"description":"The size of the generated image. One of `1024x1024`, `1024x1536`,\n`1536x1024`, or `auto`. Default: `auto`.\n","default":"auto"},"output_format":{"type":"string","enum":["png","webp","jpeg"],"description":"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n","default":"png"},"output_compression":{"type":"integer","minimum":0,"maximum":100,"description":"Compression level for the output image. Default: 100.\n","default":100},"moderation":{"type":"string","enum":["auto","low"],"description":"Moderation level for the generated image. Default: `auto`.\n","default":"auto"},"background":{"type":"string","enum":["transparent","opaque","auto"],"description":"Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.\n","default":"auto"},"input_fidelity":{"$ref":"#/components/schemas/InputFidelity","nullable":true},"input_image_mask":{"type":"object","description":"Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n","properties":{"image_url":{"type":"string","description":"Base64-encoded mask image.\n"},"file_id":{"type":"string","description":"File ID for the mask image.\n"}},"required":[],"additionalProperties":false},"partial_images":{"type":"integer","minimum":0,"maximum":3,"description":"Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n","default":0}},"required":["type"]},"InputFidelity":{"type":"string","enum":["high","low"],"description":"Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`."},"LocalShellToolParam":{"properties":{"type":{"type":"string","enum":["local_shell"],"description":"The type of the local shell tool. Always `local_shell`.","default":"local_shell"}},"type":"object","required":["type"],"title":"Local shell tool","description":"A tool that allows the model to execute shell commands in a local environment."},"FunctionShellToolParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The type of the shell tool. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Shell tool","description":"A tool that allows the model to execute shell commands."},"CustomToolParam":{"properties":{"type":{"type":"string","enum":["custom"],"description":"The type of the custom tool. Always `custom`.","default":"custom"},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls."},"description":{"type":"string","description":"Optional description of the custom tool, used to provide more context."},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CustomTextFormatParam"},{"$ref":"#/components/schemas/CustomGrammarFormatParam"}]}},"type":"object","required":["type","name"],"title":"Custom tool","description":"A custom tool that processes input using a specified format."},"CustomTextFormatParam":{"properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`.","default":"text"}},"type":"object","required":["type"],"title":"Text format","description":"Unconstrained free-form text."},"CustomGrammarFormatParam":{"properties":{"type":{"type":"string","enum":["grammar"],"description":"Grammar format. Always `grammar`.","default":"grammar"},"syntax":{"$ref":"#/components/schemas/GrammarSyntax1","description":"The syntax of the grammar definition. One of `lark` or `regex`."},"definition":{"type":"string","description":"The grammar definition."}},"type":"object","required":["type","syntax","definition"],"title":"Grammar format","description":"A grammar defined by the user."},"GrammarSyntax1":{"type":"string","enum":["lark","regex"]},"WebSearchPreviewTool":{"properties":{"type":{"type":"string","enum":["web_search_preview","web_search_preview_2025_03_11"],"description":"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.","default":"web_search_preview"},"user_location":{"$ref":"#/components/schemas/ApproximateLocation","description":"The user's location.","nullable":true},"search_context_size":{"$ref":"#/components/schemas/SearchContextSize","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"type":"object","required":["type"],"title":"Web search preview","description":"Searches the web for relevant results to use in a response. Learn more in the web search tool guide."},"ApproximateLocation":{"properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.","nullable":true},"region":{"type":"string","description":"Free text input for the region of the user, e.g. `California`.","nullable":true},"city":{"type":"string","description":"Free text input for the city of the user, e.g. `San Francisco`.","nullable":true},"timezone":{"type":"string","description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.","nullable":true}},"type":"object","required":["type"]},"SearchContextSize":{"type":"string","enum":["low","medium","high"]},"ApplyPatchToolParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The type of the tool. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Apply patch tool","description":"Allows the assistant to create, delete, or update files using unified diffs."},"ToolChoiceParam":{"description":"How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n","anyOf":[{"$ref":"#/components/schemas/ToolChoiceOptions"},{"$ref":"#/components/schemas/ToolChoiceAllowed"},{"$ref":"#/components/schemas/ToolChoiceTypes"},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"$ref":"#/components/schemas/ToolChoiceMCP"},{"$ref":"#/components/schemas/ToolChoiceCustom"},{"$ref":"#/components/schemas/SpecificApplyPatchParam"},{"$ref":"#/components/schemas/SpecificFunctionShellParam"}]},"ToolChoiceOptions":{"type":"string","title":"Tool choice mode","description":"Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n","enum":["none","auto","required"]},"ToolChoiceAllowed":{"type":"object","title":"Allowed tools","description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"type":{"type":"string","enum":["allowed_tools"],"description":"Allowed tool configuration type. Always `allowed_tools`."},"mode":{"type":"string","enum":["auto","required"],"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"},"tools":{"type":"array","description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n","items":{"type":"object","description":"A tool definition that the model should be allowed to call.\n","additionalProperties":true}}},"required":["type","mode","tools"]},"ToolChoiceTypes":{"type":"object","title":"Hosted tool","description":"Indicates that the model should use a built-in tool to generate a response.\nUse this to select a specific hosted capability.\n","properties":{"type":{"type":"string","description":"The type of hosted tool the model should to use. \n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer_use_preview`\n- `code_interpreter`\n- `image_generation`\n","enum":["file_search","web_search_preview","computer_use_preview","web_search_preview_2025_03_11","image_generation","code_interpreter"]}},"required":["type"]},"ToolChoiceFunction":{"type":"object","title":"Function tool","description":"Use this option to force the model to call a specific function.\n","properties":{"type":{"type":"string","enum":["function"],"description":"For function calling, the type is always `function`."},"name":{"type":"string","description":"The name of the function to call."}},"required":["type","name"]},"ToolChoiceMCP":{"type":"object","title":"MCP tool","description":"Use this option to force the model to call a specific tool on a remote MCP server.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"For MCP tools, the type is always `mcp`."},"server_label":{"type":"string","description":"The label of the MCP server to use.\n"},"name":{"type":"string","description":"The name of the tool to call on the server.\n","nullable":true}},"required":["type","server_label"]},"ToolChoiceCustom":{"type":"object","title":"Custom tool","description":"Use this option to force the model to call a specific custom tool.\n","properties":{"type":{"type":"string","enum":["custom"],"description":"For custom tool calling, the type is always `custom`."},"name":{"type":"string","description":"The name of the custom tool to call."}},"required":["type","name"]},"SpecificApplyPatchParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The tool to call. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Specific apply patch tool choice","description":"Forces the model to call the apply_patch tool when executing a tool call."},"SpecificFunctionShellParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The tool to call. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Specific shell tool choice","description":"Forces the model to call the function shell tool when a tool call is required."},"Prompt":{"type":"object","nullable":true,"description":"Reference to a prompt template and its variables.\n","required":["id"],"properties":{"id":{"type":"string","description":"The unique identifier of the prompt template to use."},"version":{"type":"string","nullable":true,"description":"Optional version of the prompt template."},"variables":{"$ref":"#/components/schemas/ResponsePromptVariables"}}},"ResponsePromptVariables":{"type":"object","title":"Prompt Variables","description":"Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n","additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"nullable":true},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"ResponseError":{"type":"object","description":"An error object returned when the model fails to generate a Response.\n","properties":{"code":{"$ref":"#/components/schemas/ResponseErrorCode"},"message":{"type":"string","description":"A human-readable description of the error.\n"}},"required":["code","message"],"nullable":true},"ResponseErrorCode":{"type":"string","description":"The error code for the response.\n","enum":["server_error","rate_limit_exceeded","invalid_prompt","vector_store_timeout","invalid_image","invalid_image_format","invalid_base64_image","invalid_image_url","image_too_large","image_too_small","image_parse_error","image_content_policy_violation","invalid_image_mode","image_file_too_large","unsupported_image_media_type","empty_image_file","failed_to_download_image","image_file_not_found"]},"OutputItem":{"anyOf":[{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/CustomToolCall"}],"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"]},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ReasoningItem":{"type":"object","description":"A description of the chain of thought used by a reasoning model while generating a response.\nInclude these items in your input for subsequent turns if you are manually managing context.\n","title":"Reasoning","properties":{"type":{"type":"string","description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"default":"reasoning"},"id":{"type":"string","description":"The unique identifier of the reasoning content.\n"},"encrypted_content":{"type":"string","description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","nullable":true},"summary":{"type":"array","description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/Summary"}},"content":{"type":"array","description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","summary","type"]},"Summary":{"properties":{"type":{"type":"string","enum":["summary_text"],"description":"The type of the object. Always `summary_text`.","default":"summary_text"},"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"type":"object","required":["type","text"],"title":"Summary text","description":"A summary text from the model."},"ReasoningTextContent":{"properties":{"type":{"type":"string","enum":["reasoning_text"],"description":"The type of the reasoning text. Always `reasoning_text`.","default":"reasoning_text"},"text":{"type":"string","description":"The reasoning text from the model."}},"type":"object","required":["type","text"],"title":"ReasoningTextContent","description":"Reasoning text from the model."},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"CustomToolCall":{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call","description":"The type of the custom tool call. Always `custom_tool_call`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call in the platform.\n"},"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output.\n"},"name":{"type":"string","description":"The name of the custom tool being called.\n"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.\n"}},"required":["type","call_id","name","input"]},"InputItem":{"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"EasyInputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"role":{"type":"string","description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"]},"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model.\n"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"type":{"type":"string","description":"The type of the message input. Always `message`.\n","enum":["message"],"default":"message"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"Item":{"type":"object","description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"ComputerCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The ID of the computer tool call output.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The ID of the computer tool call that produced the output."},"type":{"type":"string","enum":["computer_call_output"],"description":"The type of the computer tool call output. Always `computer_call_output`.","default":"computer_call_output"},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"acknowledged_safety_checks":{"items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array","description":"The safety checks reported by the API that have been acknowledged by the developer.","nullable":true},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Computer tool call output","description":"The output of a computer tool call."},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"FunctionCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function tool call generated by the model."},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.","default":"function_call_output"},"output":{"description":"Text, image, or file output of the function tool call.","anyOf":[{"type":"string","maxLength":10485760,"description":"A JSON string of the output of the function tool call."},{"items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function tool call output","description":"The output of a function tool call."},"InputTextContentParam":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","maxLength":10485760,"description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContentParamAutoParam":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","maxLength":20971520,"nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/DetailEnum","nullable":true,"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type"],"title":"Input image","description":"An image input to the model."},"DetailEnum":{"type":"string","enum":["low","high","auto"]},"InputFileContentParam":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","nullable":true,"description":"The name of the file to be sent to the model."},"file_data":{"type":"string","maxLength":33554432,"nullable":true,"description":"The base64-encoded data of the file to be sent to the model."},"file_url":{"type":"string","nullable":true,"description":"The URL of the file to be sent to the model."}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"CompactionSummaryItemParam":{"properties":{"id":{"type":"string","description":"The ID of the compaction item.","nullable":true},"type":{"type":"string","enum":["compaction"],"description":"The type of the item. Always `compaction`.","default":"compaction"},"encrypted_content":{"type":"string","maxLength":10485760}},"type":"object","required":["type","encrypted_content"],"title":"Compaction item","description":"A compaction item generated by the `v1/responses/compact` API."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCallItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `function_shell_call`.","default":"shell_call"},"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/FunctionShellCallItemStatus","nullable":true}},"type":"object","required":["call_id","type","action"],"title":"Function shell tool call","description":"A tool representing a request to execute one or more shell commands."},"FunctionShellActionParam":{"properties":{"commands":{"items":{"type":"string"},"type":"array","description":"Ordered shell commands for the execution environment to run."},"timeout_ms":{"type":"integer","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","nullable":true},"max_output_length":{"type":"integer","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","nullable":true}},"type":"object","required":["commands"],"title":"Function shell action","description":"Commands and limits describing how to run the function shell tool call."},"FunctionShellCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Function shell call status","description":"Status values reported for function shell tool calls."},"FunctionShellCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the item. Always `function_shell_call_output`.","default":"shell_call_output"},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array","description":"Captured chunks of stdout and stderr output, along with their associated outcomes."},"max_output_length":{"type":"integer","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function shell tool call output","description":"The streamed output items emitted by a function shell tool call."},"FunctionShellCallOutputContentParam":{"properties":{"stdout":{"type":"string","maxLength":10485760,"description":"Captured stdout output for this chunk of the shell call."},"stderr":{"type":"string","maxLength":10485760,"description":"Captured stderr output for this chunk of the shell call."},"outcome":{"$ref":"#/components/schemas/FunctionShellCallOutputOutcomeParam","description":"The exit or timeout outcome associated with this chunk."}},"type":"object","required":["stdout","stderr","outcome"],"title":"Function shell output chunk","description":"Captured stdout and stderr for a portion of a function shell tool call output."},"FunctionShellCallOutputOutcomeParam":{"title":"Function shell call outcome","description":"The exit or timeout outcome associated with this chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcomeParam"}]},"FunctionShellCallOutputTimeoutOutcomeParam":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcomeParam":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"The exit code returned by the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCallItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."}},"type":"object","required":["type","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call representing a request to create, delete, or update files using diff patches."},"ApplyPatchCallStatusParam":{"type":"string","enum":["in_progress","completed"],"title":"Apply patch call status","description":"Status values reported for apply_patch tool calls."},"ApplyPatchOperationParam":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperationParam"}]},"ApplyPatchCreateFileOperationParam":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"The operation type. Always `create_file`.","default":"create_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to create relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply when creating the file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction for creating a new file via the apply_patch tool."},"ApplyPatchDeleteFileOperationParam":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"The operation type. Always `delete_file`.","default":"delete_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to delete relative to the workspace root."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction for deleting an existing file via the apply_patch tool."},"ApplyPatchUpdateFileOperationParam":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"The operation type. Always `update_file`.","default":"update_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to update relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply to the existing file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction for updating an existing file via the apply_patch tool."},"ApplyPatchToolCallOutputItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","maxLength":10485760,"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","nullable":true}},"type":"object","required":["type","call_id","status"],"title":"Apply patch tool call output","description":"The streamed output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatusParam":{"type":"string","enum":["completed","failed"],"title":"Apply patch call output status","description":"Outcome values reported for apply_patch tool call outputs."},"MCPApprovalResponse":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"default":"mcp_approval_response","description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n","nullable":true},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","request_id","approve","approval_request_id"]},"CustomToolCallOutput":{"type":"object","title":"Custom tool call output","description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output","description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call output in the platform.\n"},"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call.\n"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the custom tool call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the custom tool call.\n"}]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"ItemReferenceParam":{"properties":{"type":{"type":"string","nullable":true,"enum":["item_reference"],"description":"The type of item to reference. Always `item_reference`.","default":"item_reference"},"id":{"type":"string","description":"The ID of the item to reference."}},"type":"object","required":["id"],"title":"Item reference","description":"An internal identifier for an item to reference."},"ResponseUsage":{"type":"object","description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n","properties":{"input_tokens":{"type":"integer","description":"The number of input tokens."},"input_tokens_details":{"type":"object","description":"A detailed breakdown of the input tokens.","properties":{"cached_tokens":{"type":"integer","description":"The number of tokens retrieved from cache. See prompt caching for details.\n"},"cache_write_tokens":{"type":"integer","description":"The number of tokens written to cache. Nexos extension.\n"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"Conversation-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"type":"object","required":["id"],"title":"Conversation","description":"The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation."},"CostSavings":{"type":"object","description":"Cost savings for this request, in the same unit as `usage.nexos_credits_cost`.\n`baseline_cost` is what the request would have cost without nexos optimizations; it equals\n`charged_cost` plus every non-null saving. A saving is `null` when its optimization did not\napply to the request, and `0` when it applied but saved nothing. Nexos extension.\n","properties":{"baseline_cost":{"type":"number","format":"double","description":"Cost the request would have had without nexos optimizations."},"charged_cost":{"type":"number","format":"double","description":"Cost actually charged for the request. Same value as `usage.nexos_credits_cost`."},"cache_optimization":{"type":"number","format":"double","nullable":true,"description":"Saving from prompt cache breakpoints injected by the nexos optimizer. Negative when writing the cache cost more than it saved on this request (cache writes are billed above the normal input rate); later cache reads recover it. `null` when the optimizer did not inject cache control."},"nexos_cache":{"type":"number","format":"double","nullable":true,"description":"Saving from serving the response from the nexos response cache. `null` when the response was not served from cache."}},"required":["baseline_cost","charged_cost","cache_optimization","nexos_cache"]}}},"paths":{"/v1/responses/{response_id}":{"get":{"operationId":"getResponse","tags":["Responses"],"summary":"Get a model response","parameters":[{"in":"path","name":"response_id","required":true,"schema":{"type":"string"},"description":"The ID of the response to retrieve."},{"in":"query","name":"include","schema":{"type":"array","items":{"$ref":"#/components/schemas/IncludeEnum"}},"description":"Additional fields to include in the response. See the `include`\nparameter for Response creation above for more information.\n"},{"in":"query","name":"stream","schema":{"type":"boolean"},"description":"If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\n"},{"in":"query","name":"starting_after","schema":{"type":"integer"},"description":"The sequence number of the event after which to start streaming.\n"},{"in":"query","name":"include_obfuscation","schema":{"type":"boolean"},"description":"When true, stream obfuscation will be enabled. Stream obfuscation adds\nrandom characters to an `obfuscation` field on streaming delta events\nto normalize payload sizes as a mitigation to certain side-channel\nattacks. These obfuscation fields are included by default, but add a\nsmall amount of overhead to the data stream.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}},"description":"Retrieves a model response with the given ID.\n"}}}}
````

## Delete a model response

> Deletes a model response with the given ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"Error":{"type":"object","description":"Error details. Two shapes occur: gateway-generated errors carry a numeric nexos error `code` and a `message` (no `type`/`param`); errors passed through from an upstream provider follow the provider's own schema (for OpenAI: string `code`, `message`, `param`, `type`) and the response body additionally carries a top-level `provider` field identifying the provider.\n","properties":{"code":{"description":"Nexos numeric error code (gateway errors) or provider error code (passthrough errors).","oneOf":[{"type":"string","nullable":true},{"type":"integer"}]},"message":{"type":"string"},"param":{"type":"string","nullable":true,"description":"Present only on provider-passthrough errors."},"type":{"type":"string","description":"Present only on provider-passthrough errors."}},"required":["message"]}}},"paths":{"/v1/responses/{response_id}":{"delete":{"operationId":"deleteResponse","tags":["Responses"],"summary":"Delete a model response","parameters":[{"in":"path","name":"response_id","required":true,"schema":{"type":"string"},"description":"The ID of the response to delete."}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Deletes a model response with the given ID.\n"}}}}
```

## List input items

> Returns a list of input items for a given response.

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"IncludeEnum":{"type":"string","enum":["file_search_call.results","web_search_call.results","web_search_call.action.sources","message.input_image.image_url","computer_call_output.output.image_url","code_interpreter_call.outputs","reasoning.encrypted_content","message.output_text.logprobs"],"description":"Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)."},"ResponseItemList":{"type":"object","description":"A list of Response items.","properties":{"object":{"description":"The type of object returned, must be `list`.","const":"list"},"data":{"type":"array","description":"A list of items used to generate this response.","items":{"$ref":"#/components/schemas/ItemResource"}},"has_more":{"type":"boolean","description":"Whether there are more items available."},"first_id":{"type":"string","description":"The ID of the first item in the list."},"last_id":{"type":"string","description":"The ID of the last item in the list."}},"required":["object","data","has_more","first_id","last_id"]},"ItemResource":{"description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/InputMessageResource"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerToolCallOutputResource"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCallResource"},{"$ref":"#/components/schemas/FunctionToolCallOutputResource"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponseResource"},{"$ref":"#/components/schemas/MCPToolCall"}]},"InputMessageResource":{"allOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the message input.\n"}},"required":["id"]}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ComputerToolCallOutputResource":{"allOf":[{"$ref":"#/components/schemas/ComputerToolCallOutput"},{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the computer call tool output.\n"}},"required":["id"]}]},"ComputerToolCallOutput":{"type":"object","title":"Computer tool call output","description":"The output of a computer tool call.\n","properties":{"type":{"type":"string","description":"The type of the computer tool call output. Always `computer_call_output`.\n","enum":["computer_call_output"],"default":"computer_call_output"},"id":{"type":"string","description":"The ID of the computer tool call output.\n"},"call_id":{"type":"string","description":"The ID of the computer tool call that produced the output.\n"},"acknowledged_safety_checks":{"type":"array","description":"The safety checks reported by the API that have been acknowledged by the\ndeveloper.\n","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"}},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","output"]},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"FunctionToolCallResource":{"allOf":[{"$ref":"#/components/schemas/FunctionToolCall"},{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"}},"required":["id"]}]},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"FunctionToolCallOutputResource":{"allOf":[{"$ref":"#/components/schemas/FunctionToolCallOutput"},{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the function call tool output.\n"}},"required":["id"]}]},"FunctionToolCallOutput":{"type":"object","title":"Function tool call output","description":"The output of a function tool call.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item\nis returned via API.\n"},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"output":{"description":"The output from the function call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the function call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the function call.\n"}]},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"MCPApprovalResponseResource":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n"},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","id","request_id","approve","approval_request_id"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]}}},"paths":{"/v1/responses/{response_id}/input_items":{"get":{"operationId":"listInputItems","tags":["Responses"],"summary":"List input items","parameters":[{"in":"path","name":"response_id","required":true,"schema":{"type":"string"},"description":"The ID of the response to retrieve input items for."},{"name":"limit","in":"query","description":"A limit on the number of objects to be returned. Limit can range between\n1 and 100, and the default is 20.\n","required":false,"schema":{"type":"integer","default":20}},{"in":"query","name":"order","schema":{"type":"string","enum":["asc","desc"]},"description":"The order to return the input items in. Default is `desc`.\n- `asc`: Return the input items in ascending order.\n- `desc`: Return the input items in descending order.\n"},{"in":"query","name":"after","schema":{"type":"string"},"description":"An item ID to list items after, used in pagination.\n"},{"in":"query","name":"include","schema":{"type":"array","items":{"$ref":"#/components/schemas/IncludeEnum"}},"description":"Additional fields to include in the response. See the `include`\nparameter for Response creation above for more information.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseItemList"}}}}},"description":"Returns a list of input items for a given response."}}}}
````

## Cancel a response

> Cancels a model response with the given ID. Only responses created with\
> the \`background\` parameter set to \`true\` can be cancelled.\
> \
> \*\*Note:\*\* background responses are temporarily disabled on the platform —\
> requests with \`background: true\` currently return error \`100101\`, so this\
> operation cannot be used until background responses are re-enabled.<br>

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"Response":{"title":"The response object","allOf":[{"$ref":"#/components/schemas/ModelResponseProperties"},{"$ref":"#/components/schemas/ResponseProperties"},{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this Response.\n"},"object":{"type":"string","description":"The object type of this resource - always set to `response`.\n","enum":["response"]},"status":{"type":"string","description":"The status of the response generation. One of `completed`, `failed`,\n`in_progress`, `cancelled`, `queued`, or `incomplete`.\n","enum":["completed","failed","in_progress","cancelled","queued","incomplete"]},"created_at":{"type":"number","description":"Unix timestamp (in seconds) of when this Response was created.\n"},"error":{"$ref":"#/components/schemas/ResponseError"},"incomplete_details":{"type":"object","description":"Details about why the response is incomplete.\n","properties":{"reason":{"type":"string","description":"The reason why the response is incomplete.","enum":["max_output_tokens","content_filter"]}},"nullable":true},"output":{"type":"array","description":"An array of content items generated by the model.\n\n- The length and order of items in the `output` array is dependent\n  on the model's response.\n- Rather than accessing the first item in the `output` array and\n  assuming it's an `assistant` message with the content generated by\n  the model, you might consider using the `output_text` property where\n  supported in SDKs.\n","items":{"$ref":"#/components/schemas/OutputItem"}},"instructions":{"description":"A system (or developer) message inserted into the model's context.\n\nWhen using along with `previous_response_id`, the instructions from a previous\nresponse will not be carried over to the next response. This makes it simple\nto swap out system (or developer) messages in new responses.\n","anyOf":[{"type":"string","description":"A text input to the model, equivalent to a text input with the\n`developer` role.\n"},{"type":"array","title":"Input item list","description":"A list of one or many input items to the model, containing\ndifferent content types.\n","items":{"$ref":"#/components/schemas/InputItem"}}],"nullable":true},"output_text":{"type":"string","description":"SDK-only convenience property that contains the aggregated text output\nfrom all `output_text` items in the `output` array, if any are present.\nSupported in the Python and JavaScript SDKs.\n","nullable":true},"usage":{"$ref":"#/components/schemas/ResponseUsage"},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.\n","default":true},"conversation":{"$ref":"#/components/schemas/Conversation-2","nullable":true},"provider":{"type":"string","description":"The upstream provider that served the request (e.g. `openai`). Nexos extension.\n"},"nexos_model_uuid":{"type":"string","description":"The nexos model identifier (company model UUID) used for this response. Same value as\nthe `X-Nexos-Model-Id` response header; can be passed as `model` in subsequent\nrequests. Nexos extension.\n"},"nexos_model_name":{"type":"string","description":"The nexos model name used for this response (the value accepted as `model` in\nsubsequent requests). Nexos extension.\n"},"cost_savings":{"$ref":"#/components/schemas/CostSavings"},"completed_at":{"type":"number","nullable":true,"description":"Unix timestamp (in seconds) of when the response generation completed.\nPassed through from the upstream provider.\n"},"store":{"type":"boolean","description":"Whether the response is stored for later retrieval. Echoed from the request\nby the upstream provider.\n"},"frequency_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"presence_penalty":{"type":"number","nullable":true,"description":"Echoed by some upstream providers alongside the response.\n"},"moderation":{"type":"object","nullable":true,"description":"Moderation details passed through from the upstream provider, when available.\n"},"content_filters":{"type":"array","nullable":true,"description":"Content-filter annotations passed through from the upstream provider\n(returned by Azure-hosted models).\n","items":{"type":"object","properties":{"blocked":{"type":"boolean"},"source_type":{"type":"string"},"content_filter_raw":{"type":"array","items":{"type":"object"}},"content_filter_results":{"type":"object"},"content_filter_offsets":{"type":"object","properties":{"check_offset":{"type":"integer"},"start_offset":{"type":"integer"},"end_offset":{"type":"integer"}}}}}},"tool_usage":{"type":"object","nullable":true,"description":"Aggregated built-in tool usage for this response. Nexos extension.\n","properties":{"image_gen":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"}}},"web_search":{"type":"object","properties":{"num_requests":{"type":"integer"}}}}}},"required":["id","object","created_at","error","incomplete_details","instructions","model","tools","output","parallel_tool_calls","metadata","tool_choice","temperature","top_p"]}]},"ModelResponseProperties":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/responses_Metadata"},"top_logprobs":{"description":"An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n","type":"integer","minimum":0,"maximum":20,"nullable":true},"temperature":{"type":"number","minimum":0,"maximum":2,"default":1,"description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.\n","nullable":true},"top_p":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n","nullable":true},"user":{"type":"string","deprecated":true,"description":"Deprecated in favor of `safety_identifier` and `prompt_cache_key`; use `prompt_cache_key` to maintain caching. A stable end-user identifier to improve cache hit rates and help detect abuse.\n"},"safety_identifier":{"type":"string","description":"A stable identifier used to help detect users who may violate usage policies. Use a unique per-user string (e.g., a hash of username or email) to avoid sending identifying information.\n"},"prompt_cache_key":{"type":"string","description":"Used to cache responses for similar requests and improve cache hit rates. Replaces the `user` field.\n"},"service_tier":{"$ref":"#/components/schemas/ServiceTier"},"prompt_cache_retention":{"type":"string","enum":["in_memory","24h"],"description":"Retention policy for the prompt cache. Set to `24h` to keep cached prefixes active longer (up to 24 hours).\n","nullable":true}}},"responses_Metadata":{"type":"object","description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.\n","additionalProperties":{"type":"string"},"nullable":true},"ServiceTier":{"type":"string","description":"Specifies the processing tier for the request.\nThe response includes the actual tier used, which may differ from the requested value.\n","enum":["auto","default","flex","scale","priority"],"default":"auto","nullable":true},"ResponseProperties":{"type":"object","required":["model"],"properties":{"previous_response_id":{"type":"string","description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations. Cannot be used with `conversation`.\n","nullable":true},"model":{"description":"Model ID used to generate the response (e.g., `gpt-4o` or `o3`). See your provider's model guide for available options.\n","type":"string"},"reasoning":{"$ref":"#/components/schemas/Reasoning","nullable":true},"background":{"type":"boolean","description":"Whether to run the model response in the background.\n","default":false,"nullable":true},"max_output_tokens":{"description":"An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.\n","type":"integer","nullable":true},"max_tool_calls":{"description":"The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.\n","type":"integer","nullable":true},"text":{"$ref":"#/components/schemas/ResponseTextParam"},"tools":{"$ref":"#/components/schemas/ToolsArray"},"tool_choice":{"$ref":"#/components/schemas/ToolChoiceParam"},"prompt":{"$ref":"#/components/schemas/Prompt"},"truncation":{"type":"string","description":"The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n  the model's context window size, the model will truncate the\n  response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n  size for a model, the request will fail with a 400 error.\n","enum":["auto","disabled"],"default":"disabled","nullable":true}}},"Reasoning":{"type":"object","description":"Configuration options for reasoning models. Applicable to gpt-5 and o-series models only.\n","title":"Reasoning","properties":{"effort":{"$ref":"#/components/schemas/ReasoningEffort"},"mode":{"type":"string","description":"Reasoning mode for models that support it. One of `standard` or `pro`.\n","enum":["standard","pro"]},"summary":{"type":"string","nullable":true,"description":"A summary of the model's reasoning.\nOne of `auto`, `concise`, or `detailed` (only `concise` is supported for `computer-use-preview`).\n","enum":["auto","concise","detailed"]},"generate_summary":{"type":"string","nullable":true,"deprecated":true,"description":"Deprecated: use `summary` instead.\nA summary of the model's reasoning. One of `auto`, `concise`, or `detailed`.\n","enum":["auto","concise","detailed"]}}},"ReasoningEffort":{"type":"string","nullable":true,"enum":["none","minimal","low","medium","high"],"default":"medium","description":"Controls how much reasoning effort the model uses. Lower settings are faster and use fewer tokens; higher settings provide more detailed reasoning.\n"},"ResponseTextParam":{"type":"object","description":"Configuration options for a text response. Supports plain text or structured JSON.\n","properties":{"format":{"$ref":"#/components/schemas/TextResponseFormatConfiguration"},"verbosity":{"$ref":"#/components/schemas/Verbosity"}}},"TextResponseFormatConfiguration":{"description":"Specifies the required output format. Use `type: json_schema` to enforce a schema; `type: text` is the default.\n","anyOf":[{"$ref":"#/components/schemas/responses_ResponseFormatText"},{"$ref":"#/components/schemas/TextResponseFormatJsonSchema"},{"$ref":"#/components/schemas/responses_ResponseFormatJsonObject"}],"discriminator":{"propertyName":"type"}},"responses_ResponseFormatText":{"type":"object","title":"Text","description":"Default response format. Used to generate text responses.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `text`.","enum":["text"]}},"required":["type"]},"TextResponseFormatJsonSchema":{"type":"object","title":"JSON schema","description":"JSON Schema response format used to generate structured JSON responses.\nLearn more in the Structured Outputs guide.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_schema`.","enum":["json_schema"]},"description":{"type":"string","description":"A description of what the response format is for, used by the model to\ndetermine how to respond in the format.\n"},"name":{"type":"string","description":"The name of the response format. Must be a-z, A-Z, 0-9, or contain\nunderscores and dashes, with a maximum length of 64.\n"},"schema":{"$ref":"#/components/schemas/responses_ResponseFormatJsonSchemaSchema"},"strict":{"type":"boolean","nullable":true,"default":false,"description":"Whether to enable strict schema adherence when generating the output.\nIf true, the model will follow the exact schema; only a subset of JSON Schema is supported.\n"}},"required":["type","schema","name"]},"responses_ResponseFormatJsonSchemaSchema":{"type":"object","title":"JSON schema","description":"The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).\n","additionalProperties":true},"responses_ResponseFormatJsonObject":{"type":"object","title":"JSON object","description":"JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.\n","properties":{"type":{"type":"string","description":"The type of response format being defined. Always `json_object`.","enum":["json_object"]}},"required":["type"]},"Verbosity":{"type":"string","nullable":true,"enum":["low","medium","high"],"default":"medium","description":"Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.\n"},"ToolsArray":{"type":"array","description":"An array of tools the model may call while generating a response. Categories include built-in tools, MCP tools, and custom function calls.\n","items":{"$ref":"#/components/schemas/responses_Tool"}},"responses_Tool":{"description":"A tool that can be used to generate a response.\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionTool"},{"$ref":"#/components/schemas/FileSearchTool"},{"$ref":"#/components/schemas/ComputerUsePreviewTool"},{"$ref":"#/components/schemas/WebSearchTool"},{"$ref":"#/components/schemas/MCPTool"},{"$ref":"#/components/schemas/CodeInterpreterTool"},{"$ref":"#/components/schemas/ImageGenTool"},{"$ref":"#/components/schemas/LocalShellToolParam"},{"$ref":"#/components/schemas/FunctionShellToolParam"},{"$ref":"#/components/schemas/CustomToolParam"},{"$ref":"#/components/schemas/WebSearchPreviewTool"},{"$ref":"#/components/schemas/ApplyPatchToolParam"}]},"FunctionTool":{"properties":{"type":{"type":"string","enum":["function"],"description":"The type of the function tool. Always `function`.","default":"function"},"name":{"type":"string","description":"The name of the function to call."},"description":{"type":"string","nullable":true,"description":"A description of the function. Used by the model to determine whether or not to call the function."},"parameters":{"type":"object","nullable":true,"additionalProperties":{},"description":"A JSON schema object describing the parameters of the function."},"strict":{"type":"boolean","nullable":true,"description":"Whether to enforce strict parameter validation. Default `true`."}},"type":"object","required":["type","name","strict","parameters"],"title":"Function","description":"Defines a function in your code that the model can call."},"FileSearchTool":{"properties":{"type":{"type":"string","enum":["file_search"],"description":"The type of the file search tool. Always `file_search`.","default":"file_search"},"vector_store_ids":{"items":{"type":"string"},"type":"array","description":"The IDs of the vector stores to search."},"max_num_results":{"type":"integer","description":"The maximum number of results to return. This number should be between 1 and 50 inclusive."},"ranking_options":{"$ref":"#/components/schemas/RankingOptions","description":"Ranking options for search."},"filters":{"$ref":"#/components/schemas/Filters","description":"A filter to apply.","nullable":true}},"type":"object","required":["type","vector_store_ids"],"title":"File search","description":"Searches uploaded files for relevant content. See the file search guide."},"RankingOptions":{"properties":{"ranker":{"$ref":"#/components/schemas/RankerVersionType","description":"The ranker to use for the file search."},"score_threshold":{"type":"number","description":"The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results."},"hybrid_search":{"$ref":"#/components/schemas/HybridSearchOptions","description":"Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled."}},"type":"object","required":[]},"RankerVersionType":{"type":"string","enum":["auto","default-2024-11-15"]},"HybridSearchOptions":{"properties":{"embedding_weight":{"type":"number","description":"The weight of the embedding in the reciprocal ranking fusion."},"text_weight":{"type":"number","description":"The weight of the text in the reciprocal ranking fusion."}},"type":"object","required":["embedding_weight","text_weight"]},"Filters":{"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]},"ComparisonFilter":{"type":"object","additionalProperties":false,"title":"Comparison Filter","description":"A filter used to compare a specified attribute key to a given value using a defined comparison operation.\n","properties":{"type":{"type":"string","default":"eq","enum":["eq","ne","gt","gte","lt","lte"],"description":"Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n- `eq`: equals\n- `ne`: not equal\n- `gt`: greater than\n- `gte`: greater than or equal\n- `lt`: less than\n- `lte`: less than or equal\n- `in`: in\n- `nin`: not in\n"},"key":{"type":"string","description":"The key to compare against the value."},"value":{"description":"The value to compare against the attribute key; supports string, number, or boolean types.","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"$ref":"#/components/schemas/ComparisonFilterValueItems"}}]}},"required":["type","key","value"]},"ComparisonFilterValueItems":{"anyOf":[{"type":"string"},{"type":"number"}]},"CompoundFilter":{"type":"object","additionalProperties":false,"title":"Compound Filter","description":"Combine multiple filters using `and` or `or`.","properties":{"type":{"type":"string","description":"Type of operation: `and` or `or`.","enum":["and","or"]},"filters":{"type":"array","description":"Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ComparisonFilter"},{"$ref":"#/components/schemas/CompoundFilter"}]}}},"required":["type","filters"]},"ComputerUsePreviewTool":{"properties":{"type":{"type":"string","enum":["computer_use_preview"],"description":"The type of the computer use tool. Always `computer_use_preview`.","default":"computer_use_preview"},"environment":{"$ref":"#/components/schemas/ComputerEnvironment","description":"The type of computer environment to control."},"display_width":{"type":"integer","description":"The width of the computer display."},"display_height":{"type":"integer","description":"The height of the computer display."}},"type":"object","required":["type","environment","display_width","display_height"],"title":"Computer use preview","description":"A tool that controls a virtual computer. Learn more in the computer tool guide."},"ComputerEnvironment":{"type":"string","enum":["windows","mac","linux","ubuntu","browser"]},"WebSearchTool":{"type":"object","title":"Web search","description":"Search the internet for sources related to the prompt. Learn more in the web search tool guide.\n","properties":{"type":{"type":"string","enum":["web_search","web_search_2025_08_26"],"description":"The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.","default":"web_search"},"filters":{"type":"object","description":"Filters for the search.\n","properties":{"allowed_domains":{"type":"array","title":"Allowed domains for the search.","description":"Allowed domains for the search. If not provided, all domains are allowed.\nSubdomains of the provided domains are allowed as well.\n\nExample: `[\"pubmed.ncbi.nlm.nih.gov\"]`\n","items":{"type":"string","description":"Allowed domain for the search."},"default":[],"nullable":true}},"nullable":true},"user_location":{"$ref":"#/components/schemas/WebSearchApproximateLocation"},"search_context_size":{"type":"string","enum":["low","medium","high"],"default":"medium","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"required":["type"]},"WebSearchApproximateLocation":{"type":"object","nullable":true,"title":"Web search approximate location","description":"The approximate location of the user.\n","properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","nullable":true,"description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`."},"region":{"type":"string","nullable":true,"description":"Free text input for the region of the user, e.g. `California`."},"city":{"type":"string","nullable":true,"description":"Free text input for the city of the user, e.g. `San Francisco`."},"timezone":{"type":"string","nullable":true,"description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`."}}},"MCPTool":{"type":"object","title":"MCP tool","description":"Give the model access to tools via remote Model Context Protocol (MCP) servers. Learn more in the MCP guide.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"The type of the MCP tool. Always `mcp`."},"server_label":{"type":"string","description":"A label for this MCP server, used to identify it in tool calls.\n"},"server_url":{"type":"string","description":"The URL for the MCP server. One of `server_url` or `connector_id` must be\nprovided.\n"},"connector_id":{"type":"string","enum":["connector_dropbox","connector_gmail","connector_googlecalendar","connector_googledrive","connector_microsoftteams","connector_outlookcalendar","connector_outlookemail","connector_sharepoint"],"description":"Identifier for service connectors, like those available in ChatGPT. One of\n`server_url` or `connector_id` must be provided.\n\nCurrently supported `connector_id` values are:\n\n- Dropbox: `connector_dropbox`\n- Gmail: `connector_gmail`\n- Google Calendar: `connector_googlecalendar`\n- Google Drive: `connector_googledrive`\n- Microsoft Teams: `connector_microsoftteams`\n- Outlook Calendar: `connector_outlookcalendar`\n- Outlook Email: `connector_outlookemail`\n- SharePoint: `connector_sharepoint`\n"},"authorization":{"type":"string","description":"An OAuth access token that can be used with a remote MCP server, either\nwith a custom MCP server URL or a service connector. Your application\nmust handle the OAuth authorization flow and provide the token here.\n"},"server_description":{"type":"string","description":"Optional description of the MCP server, used to provide more context.\n"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional HTTP headers to send to the MCP server. Use for authentication\nor other purposes.\n","nullable":true},"allowed_tools":{"description":"List of allowed tool names or a filter object.\n","anyOf":[{"type":"array","title":"MCP allowed tools","description":"A string array of allowed tool names","items":{"type":"string"}},{"$ref":"#/components/schemas/MCPToolFilter"}],"nullable":true},"require_approval":{"description":"Specify which of the MCP server's tools require approval.","default":"always","anyOf":[{"type":"object","title":"MCP tool approval filter","description":"Specify which of the MCP server's tools require approval. Can be\n`always`, `never`, or a filter object associated with tools\nthat require approval.\n","properties":{"always":{"$ref":"#/components/schemas/MCPToolFilter"},"never":{"$ref":"#/components/schemas/MCPToolFilter"}},"additionalProperties":false},{"type":"string","title":"MCP tool approval setting","description":"Specify a single approval policy for all tools. One of `always` or\n`never`. When set to `always`, all tools will require approval. When\nset to `never`, all tools will not require approval.\n","enum":["always","never"]}],"nullable":true}},"required":["type","server_label"]},"MCPToolFilter":{"type":"object","title":"MCP tool filter","description":"A filter object to specify which tools are allowed.\n","properties":{"tool_names":{"type":"array","title":"MCP allowed tools","items":{"type":"string"},"description":"List of allowed tool names."},"read_only":{"type":"boolean","description":"Indicates whether or not a tool modifies data or is read-only. If an\nMCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\nit will match this filter.\n"}},"required":[],"additionalProperties":false},"CodeInterpreterTool":{"type":"object","title":"Code interpreter","description":"A tool that runs Python code to help generate a response to a prompt.\n","properties":{"type":{"type":"string","enum":["code_interpreter"],"description":"The type of the code interpreter tool. Always `code_interpreter`.\n"},"container":{"description":"The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code.\n","anyOf":[{"type":"string","description":"The container ID."},{"$ref":"#/components/schemas/CodeInterpreterContainerAuto"}]}},"required":["type","container"]},"CodeInterpreterContainerAuto":{"properties":{"type":{"type":"string","enum":["auto"],"description":"Always `auto`.","default":"auto"},"file_ids":{"items":{"type":"string"},"type":"array","maxItems":50,"description":"An optional list of uploaded files to make available to your code."},"memory_limit":{"$ref":"#/components/schemas/ContainerMemoryLimit","nullable":true}},"type":"object","required":["type"],"title":"CodeInterpreterToolAuto","description":"Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on."},"ContainerMemoryLimit":{"type":"string","enum":["1g","4g","16g","64g"]},"ImageGenTool":{"type":"object","title":"Image generation tool","description":"A tool that generates images using a model like `gpt-image-1`.\n","properties":{"type":{"type":"string","enum":["image_generation"],"description":"The type of the image generation tool. Always `image_generation`.\n"},"model":{"type":"string","enum":["gpt-image-1","gpt-image-1-mini"],"description":"The image generation model to use. Default: `gpt-image-1`.\n","default":"gpt-image-1"},"quality":{"type":"string","enum":["low","medium","high","auto"],"description":"The quality of the generated image. One of `low`, `medium`, `high`,\nor `auto`. Default: `auto`.\n","default":"auto"},"size":{"type":"string","enum":["1024x1024","1024x1536","1536x1024","auto"],"description":"The size of the generated image. One of `1024x1024`, `1024x1536`,\n`1536x1024`, or `auto`. Default: `auto`.\n","default":"auto"},"output_format":{"type":"string","enum":["png","webp","jpeg"],"description":"The output format of the generated image. One of `png`, `webp`, or\n`jpeg`. Default: `png`.\n","default":"png"},"output_compression":{"type":"integer","minimum":0,"maximum":100,"description":"Compression level for the output image. Default: 100.\n","default":100},"moderation":{"type":"string","enum":["auto","low"],"description":"Moderation level for the generated image. Default: `auto`.\n","default":"auto"},"background":{"type":"string","enum":["transparent","opaque","auto"],"description":"Background type for the generated image. One of `transparent`,\n`opaque`, or `auto`. Default: `auto`.\n","default":"auto"},"input_fidelity":{"$ref":"#/components/schemas/InputFidelity","nullable":true},"input_image_mask":{"type":"object","description":"Optional mask for inpainting. Contains `image_url`\n(string, optional) and `file_id` (string, optional).\n","properties":{"image_url":{"type":"string","description":"Base64-encoded mask image.\n"},"file_id":{"type":"string","description":"File ID for the mask image.\n"}},"required":[],"additionalProperties":false},"partial_images":{"type":"integer","minimum":0,"maximum":3,"description":"Number of partial images to generate in streaming mode, from 0 (default value) to 3.\n","default":0}},"required":["type"]},"InputFidelity":{"type":"string","enum":["high","low"],"description":"Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`."},"LocalShellToolParam":{"properties":{"type":{"type":"string","enum":["local_shell"],"description":"The type of the local shell tool. Always `local_shell`.","default":"local_shell"}},"type":"object","required":["type"],"title":"Local shell tool","description":"A tool that allows the model to execute shell commands in a local environment."},"FunctionShellToolParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The type of the shell tool. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Shell tool","description":"A tool that allows the model to execute shell commands."},"CustomToolParam":{"properties":{"type":{"type":"string","enum":["custom"],"description":"The type of the custom tool. Always `custom`.","default":"custom"},"name":{"type":"string","description":"The name of the custom tool, used to identify it in tool calls."},"description":{"type":"string","description":"Optional description of the custom tool, used to provide more context."},"format":{"description":"The input format for the custom tool. Default is unconstrained text.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CustomTextFormatParam"},{"$ref":"#/components/schemas/CustomGrammarFormatParam"}]}},"type":"object","required":["type","name"],"title":"Custom tool","description":"A custom tool that processes input using a specified format."},"CustomTextFormatParam":{"properties":{"type":{"type":"string","enum":["text"],"description":"Unconstrained text format. Always `text`.","default":"text"}},"type":"object","required":["type"],"title":"Text format","description":"Unconstrained free-form text."},"CustomGrammarFormatParam":{"properties":{"type":{"type":"string","enum":["grammar"],"description":"Grammar format. Always `grammar`.","default":"grammar"},"syntax":{"$ref":"#/components/schemas/GrammarSyntax1","description":"The syntax of the grammar definition. One of `lark` or `regex`."},"definition":{"type":"string","description":"The grammar definition."}},"type":"object","required":["type","syntax","definition"],"title":"Grammar format","description":"A grammar defined by the user."},"GrammarSyntax1":{"type":"string","enum":["lark","regex"]},"WebSearchPreviewTool":{"properties":{"type":{"type":"string","enum":["web_search_preview","web_search_preview_2025_03_11"],"description":"The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.","default":"web_search_preview"},"user_location":{"$ref":"#/components/schemas/ApproximateLocation","description":"The user's location.","nullable":true},"search_context_size":{"$ref":"#/components/schemas/SearchContextSize","description":"High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default."}},"type":"object","required":["type"],"title":"Web search preview","description":"Searches the web for relevant results to use in a response. Learn more in the web search tool guide."},"ApproximateLocation":{"properties":{"type":{"type":"string","enum":["approximate"],"description":"The type of location approximation. Always `approximate`.","default":"approximate"},"country":{"type":"string","description":"The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.","nullable":true},"region":{"type":"string","description":"Free text input for the region of the user, e.g. `California`.","nullable":true},"city":{"type":"string","description":"Free text input for the city of the user, e.g. `San Francisco`.","nullable":true},"timezone":{"type":"string","description":"The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.","nullable":true}},"type":"object","required":["type"]},"SearchContextSize":{"type":"string","enum":["low","medium","high"]},"ApplyPatchToolParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The type of the tool. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Apply patch tool","description":"Allows the assistant to create, delete, or update files using unified diffs."},"ToolChoiceParam":{"description":"How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call.\n","anyOf":[{"$ref":"#/components/schemas/ToolChoiceOptions"},{"$ref":"#/components/schemas/ToolChoiceAllowed"},{"$ref":"#/components/schemas/ToolChoiceTypes"},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"$ref":"#/components/schemas/ToolChoiceMCP"},{"$ref":"#/components/schemas/ToolChoiceCustom"},{"$ref":"#/components/schemas/SpecificApplyPatchParam"},{"$ref":"#/components/schemas/SpecificFunctionShellParam"}]},"ToolChoiceOptions":{"type":"string","title":"Tool choice mode","description":"Controls which (if any) tool is called by the model.\n\n`none` means the model will not call any tool and instead generates a message.\n\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n\n`required` means the model must call one or more tools.\n","enum":["none","auto","required"]},"ToolChoiceAllowed":{"type":"object","title":"Allowed tools","description":"Constrains the tools available to the model to a pre-defined set.\n","properties":{"type":{"type":"string","enum":["allowed_tools"],"description":"Allowed tool configuration type. Always `allowed_tools`."},"mode":{"type":"string","enum":["auto","required"],"description":"Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"},"tools":{"type":"array","description":"A list of tool definitions that the model should be allowed to call.\n\nFor the Responses API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"name\": \"get_weather\" },\n  { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n  { \"type\": \"image_generation\" }\n]\n```\n","items":{"type":"object","description":"A tool definition that the model should be allowed to call.\n","additionalProperties":true}}},"required":["type","mode","tools"]},"ToolChoiceTypes":{"type":"object","title":"Hosted tool","description":"Indicates that the model should use a built-in tool to generate a response.\nUse this to select a specific hosted capability.\n","properties":{"type":{"type":"string","description":"The type of hosted tool the model should to use. \n\nAllowed values are:\n- `file_search`\n- `web_search_preview`\n- `computer_use_preview`\n- `code_interpreter`\n- `image_generation`\n","enum":["file_search","web_search_preview","computer_use_preview","web_search_preview_2025_03_11","image_generation","code_interpreter"]}},"required":["type"]},"ToolChoiceFunction":{"type":"object","title":"Function tool","description":"Use this option to force the model to call a specific function.\n","properties":{"type":{"type":"string","enum":["function"],"description":"For function calling, the type is always `function`."},"name":{"type":"string","description":"The name of the function to call."}},"required":["type","name"]},"ToolChoiceMCP":{"type":"object","title":"MCP tool","description":"Use this option to force the model to call a specific tool on a remote MCP server.\n","properties":{"type":{"type":"string","enum":["mcp"],"description":"For MCP tools, the type is always `mcp`."},"server_label":{"type":"string","description":"The label of the MCP server to use.\n"},"name":{"type":"string","description":"The name of the tool to call on the server.\n","nullable":true}},"required":["type","server_label"]},"ToolChoiceCustom":{"type":"object","title":"Custom tool","description":"Use this option to force the model to call a specific custom tool.\n","properties":{"type":{"type":"string","enum":["custom"],"description":"For custom tool calling, the type is always `custom`."},"name":{"type":"string","description":"The name of the custom tool to call."}},"required":["type","name"]},"SpecificApplyPatchParam":{"properties":{"type":{"type":"string","enum":["apply_patch"],"description":"The tool to call. Always `apply_patch`.","default":"apply_patch"}},"type":"object","required":["type"],"title":"Specific apply patch tool choice","description":"Forces the model to call the apply_patch tool when executing a tool call."},"SpecificFunctionShellParam":{"properties":{"type":{"type":"string","enum":["shell"],"description":"The tool to call. Always `shell`.","default":"shell"}},"type":"object","required":["type"],"title":"Specific shell tool choice","description":"Forces the model to call the function shell tool when a tool call is required."},"Prompt":{"type":"object","nullable":true,"description":"Reference to a prompt template and its variables.\n","required":["id"],"properties":{"id":{"type":"string","description":"The unique identifier of the prompt template to use."},"version":{"type":"string","nullable":true,"description":"Optional version of the prompt template."},"variables":{"$ref":"#/components/schemas/ResponsePromptVariables"}}},"ResponsePromptVariables":{"type":"object","title":"Prompt Variables","description":"Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.\n","additionalProperties":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"nullable":true},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"ResponseError":{"type":"object","description":"An error object returned when the model fails to generate a Response.\n","properties":{"code":{"$ref":"#/components/schemas/ResponseErrorCode"},"message":{"type":"string","description":"A human-readable description of the error.\n"}},"required":["code","message"],"nullable":true},"ResponseErrorCode":{"type":"string","description":"The error code for the response.\n","enum":["server_error","rate_limit_exceeded","invalid_prompt","vector_store_timeout","invalid_image","invalid_image_format","invalid_base64_image","invalid_image_url","image_too_large","image_too_small","image_parse_error","image_content_policy_violation","invalid_image_mode","image_file_too_large","unsupported_image_media_type","empty_image_file","failed_to_download_image","image_file_not_found"]},"OutputItem":{"anyOf":[{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/CustomToolCall"}],"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"]},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ReasoningItem":{"type":"object","description":"A description of the chain of thought used by a reasoning model while generating a response.\nInclude these items in your input for subsequent turns if you are manually managing context.\n","title":"Reasoning","properties":{"type":{"type":"string","description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"default":"reasoning"},"id":{"type":"string","description":"The unique identifier of the reasoning content.\n"},"encrypted_content":{"type":"string","description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","nullable":true},"summary":{"type":"array","description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/Summary"}},"content":{"type":"array","description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","summary","type"]},"Summary":{"properties":{"type":{"type":"string","enum":["summary_text"],"description":"The type of the object. Always `summary_text`.","default":"summary_text"},"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"type":"object","required":["type","text"],"title":"Summary text","description":"A summary text from the model."},"ReasoningTextContent":{"properties":{"type":{"type":"string","enum":["reasoning_text"],"description":"The type of the reasoning text. Always `reasoning_text`.","default":"reasoning_text"},"text":{"type":"string","description":"The reasoning text from the model."}},"type":"object","required":["type","text"],"title":"ReasoningTextContent","description":"Reasoning text from the model."},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"CustomToolCall":{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call","description":"The type of the custom tool call. Always `custom_tool_call`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call in the platform.\n"},"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output.\n"},"name":{"type":"string","description":"The name of the custom tool being called.\n"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.\n"}},"required":["type","call_id","name","input"]},"InputItem":{"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"EasyInputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"role":{"type":"string","description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"]},"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model.\n"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"type":{"type":"string","description":"The type of the message input. Always `message`.\n","enum":["message"],"default":"message"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"Item":{"type":"object","description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"ComputerCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The ID of the computer tool call output.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The ID of the computer tool call that produced the output."},"type":{"type":"string","enum":["computer_call_output"],"description":"The type of the computer tool call output. Always `computer_call_output`.","default":"computer_call_output"},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"acknowledged_safety_checks":{"items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array","description":"The safety checks reported by the API that have been acknowledged by the developer.","nullable":true},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Computer tool call output","description":"The output of a computer tool call."},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"FunctionCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function tool call generated by the model."},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.","default":"function_call_output"},"output":{"description":"Text, image, or file output of the function tool call.","anyOf":[{"type":"string","maxLength":10485760,"description":"A JSON string of the output of the function tool call."},{"items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function tool call output","description":"The output of a function tool call."},"InputTextContentParam":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","maxLength":10485760,"description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContentParamAutoParam":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","maxLength":20971520,"nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/DetailEnum","nullable":true,"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type"],"title":"Input image","description":"An image input to the model."},"DetailEnum":{"type":"string","enum":["low","high","auto"]},"InputFileContentParam":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","nullable":true,"description":"The name of the file to be sent to the model."},"file_data":{"type":"string","maxLength":33554432,"nullable":true,"description":"The base64-encoded data of the file to be sent to the model."},"file_url":{"type":"string","nullable":true,"description":"The URL of the file to be sent to the model."}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"CompactionSummaryItemParam":{"properties":{"id":{"type":"string","description":"The ID of the compaction item.","nullable":true},"type":{"type":"string","enum":["compaction"],"description":"The type of the item. Always `compaction`.","default":"compaction"},"encrypted_content":{"type":"string","maxLength":10485760}},"type":"object","required":["type","encrypted_content"],"title":"Compaction item","description":"A compaction item generated by the `v1/responses/compact` API."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCallItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `function_shell_call`.","default":"shell_call"},"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/FunctionShellCallItemStatus","nullable":true}},"type":"object","required":["call_id","type","action"],"title":"Function shell tool call","description":"A tool representing a request to execute one or more shell commands."},"FunctionShellActionParam":{"properties":{"commands":{"items":{"type":"string"},"type":"array","description":"Ordered shell commands for the execution environment to run."},"timeout_ms":{"type":"integer","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","nullable":true},"max_output_length":{"type":"integer","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","nullable":true}},"type":"object","required":["commands"],"title":"Function shell action","description":"Commands and limits describing how to run the function shell tool call."},"FunctionShellCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Function shell call status","description":"Status values reported for function shell tool calls."},"FunctionShellCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the item. Always `function_shell_call_output`.","default":"shell_call_output"},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array","description":"Captured chunks of stdout and stderr output, along with their associated outcomes."},"max_output_length":{"type":"integer","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function shell tool call output","description":"The streamed output items emitted by a function shell tool call."},"FunctionShellCallOutputContentParam":{"properties":{"stdout":{"type":"string","maxLength":10485760,"description":"Captured stdout output for this chunk of the shell call."},"stderr":{"type":"string","maxLength":10485760,"description":"Captured stderr output for this chunk of the shell call."},"outcome":{"$ref":"#/components/schemas/FunctionShellCallOutputOutcomeParam","description":"The exit or timeout outcome associated with this chunk."}},"type":"object","required":["stdout","stderr","outcome"],"title":"Function shell output chunk","description":"Captured stdout and stderr for a portion of a function shell tool call output."},"FunctionShellCallOutputOutcomeParam":{"title":"Function shell call outcome","description":"The exit or timeout outcome associated with this chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcomeParam"}]},"FunctionShellCallOutputTimeoutOutcomeParam":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcomeParam":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"The exit code returned by the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCallItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."}},"type":"object","required":["type","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call representing a request to create, delete, or update files using diff patches."},"ApplyPatchCallStatusParam":{"type":"string","enum":["in_progress","completed"],"title":"Apply patch call status","description":"Status values reported for apply_patch tool calls."},"ApplyPatchOperationParam":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperationParam"}]},"ApplyPatchCreateFileOperationParam":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"The operation type. Always `create_file`.","default":"create_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to create relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply when creating the file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction for creating a new file via the apply_patch tool."},"ApplyPatchDeleteFileOperationParam":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"The operation type. Always `delete_file`.","default":"delete_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to delete relative to the workspace root."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction for deleting an existing file via the apply_patch tool."},"ApplyPatchUpdateFileOperationParam":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"The operation type. Always `update_file`.","default":"update_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to update relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply to the existing file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction for updating an existing file via the apply_patch tool."},"ApplyPatchToolCallOutputItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","maxLength":10485760,"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","nullable":true}},"type":"object","required":["type","call_id","status"],"title":"Apply patch tool call output","description":"The streamed output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatusParam":{"type":"string","enum":["completed","failed"],"title":"Apply patch call output status","description":"Outcome values reported for apply_patch tool call outputs."},"MCPApprovalResponse":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"default":"mcp_approval_response","description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n","nullable":true},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","request_id","approve","approval_request_id"]},"CustomToolCallOutput":{"type":"object","title":"Custom tool call output","description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output","description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call output in the platform.\n"},"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call.\n"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the custom tool call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the custom tool call.\n"}]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"ItemReferenceParam":{"properties":{"type":{"type":"string","nullable":true,"enum":["item_reference"],"description":"The type of item to reference. Always `item_reference`.","default":"item_reference"},"id":{"type":"string","description":"The ID of the item to reference."}},"type":"object","required":["id"],"title":"Item reference","description":"An internal identifier for an item to reference."},"ResponseUsage":{"type":"object","description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n","properties":{"input_tokens":{"type":"integer","description":"The number of input tokens."},"input_tokens_details":{"type":"object","description":"A detailed breakdown of the input tokens.","properties":{"cached_tokens":{"type":"integer","description":"The number of tokens retrieved from cache. See prompt caching for details.\n"},"cache_write_tokens":{"type":"integer","description":"The number of tokens written to cache. Nexos extension.\n"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"Conversation-2":{"properties":{"id":{"type":"string","description":"The unique ID of the conversation."}},"type":"object","required":["id"],"title":"Conversation","description":"The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation."},"CostSavings":{"type":"object","description":"Cost savings for this request, in the same unit as `usage.nexos_credits_cost`.\n`baseline_cost` is what the request would have cost without nexos optimizations; it equals\n`charged_cost` plus every non-null saving. A saving is `null` when its optimization did not\napply to the request, and `0` when it applied but saved nothing. Nexos extension.\n","properties":{"baseline_cost":{"type":"number","format":"double","description":"Cost the request would have had without nexos optimizations."},"charged_cost":{"type":"number","format":"double","description":"Cost actually charged for the request. Same value as `usage.nexos_credits_cost`."},"cache_optimization":{"type":"number","format":"double","nullable":true,"description":"Saving from prompt cache breakpoints injected by the nexos optimizer. Negative when writing the cache cost more than it saved on this request (cache writes are billed above the normal input rate); later cache reads recover it. `null` when the optimizer did not inject cache control."},"nexos_cache":{"type":"number","format":"double","nullable":true,"description":"Saving from serving the response from the nexos response cache. `null` when the response was not served from cache."}},"required":["baseline_cost","charged_cost","cache_optimization","nexos_cache"]},"Error":{"type":"object","description":"Error details. Two shapes occur: gateway-generated errors carry a numeric nexos error `code` and a `message` (no `type`/`param`); errors passed through from an upstream provider follow the provider's own schema (for OpenAI: string `code`, `message`, `param`, `type`) and the response body additionally carries a top-level `provider` field identifying the provider.\n","properties":{"code":{"description":"Nexos numeric error code (gateway errors) or provider error code (passthrough errors).","oneOf":[{"type":"string","nullable":true},{"type":"integer"}]},"message":{"type":"string"},"param":{"type":"string","nullable":true,"description":"Present only on provider-passthrough errors."},"type":{"type":"string","description":"Present only on provider-passthrough errors."}},"required":["message"]}}},"paths":{"/v1/responses/{response_id}/cancel":{"post":{"operationId":"cancelResponse","tags":["Responses"],"summary":"Cancel a response","parameters":[{"in":"path","name":"response_id","required":true,"schema":{"type":"string"},"description":"The ID of the response to cancel."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Cancels a model response with the given ID. Only responses created with\nthe `background` parameter set to `true` can be cancelled.\n\n**Note:** background responses are temporarily disabled on the platform —\nrequests with `background: true` currently return error `100101`, so this\noperation cannot be used until background responses are re-enabled.\n"}}}}
````

## Compact a response

> Compact conversation

````json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Responses","description":"Create and manage model responses."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"CompactResponseMethodPublicBody":{"properties":{"model":{"$ref":"#/components/schemas/ModelIdsCompaction"},"input":{"description":"Text, image, or file inputs to the model, used to generate a response","anyOf":[{"type":"string","maxLength":10485760,"description":"A text input to the model, equivalent to a text input with the `user` role."},{"items":{"$ref":"#/components/schemas/InputItem"},"type":"array"}],"nullable":true},"previous_response_id":{"type":"string","description":"The unique ID of the previous response to the model. Use this to create multi-turn conversations.","nullable":true},"instructions":{"type":"string","description":"A system (or developer) message inserted into the model's context.\nWhen used along with `previous_response_id`, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.","nullable":true}},"type":"object","required":[]},"ModelIdsCompaction":{"type":"string","description":"Model ID used to generate the response, like `gpt-5` or `o3`."},"InputItem":{"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/EasyInputMessage"},{"$ref":"#/components/schemas/Item"},{"$ref":"#/components/schemas/ItemReferenceParam"}]},"EasyInputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.\n","properties":{"role":{"type":"string","description":"The role of the message input. One of `user`, `assistant`, `system`, or\n`developer`.\n","enum":["user","assistant","system","developer"]},"content":{"description":"Text, image, or audio input to the model, used to generate a response.\nCan also contain previous assistant responses.\n","anyOf":[{"type":"string","title":"Text input","description":"A text input to the model.\n"},{"$ref":"#/components/schemas/InputMessageContentList"}]},"type":{"type":"string","description":"The type of the message input. Always `message`.\n","enum":["message"],"default":"message"}},"required":["role","content"]},"InputMessageContentList":{"type":"array","title":"Input item content list","description":"A list of one or many input items to the model, containing different content \ntypes.\n","items":{"$ref":"#/components/schemas/InputContent"}},"InputContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"InputTextContent":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContent":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/ImageDetail","description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type","detail"],"title":"Input image","description":"An image input to the model. See the vision guide for details."},"ImageDetail":{"type":"string","enum":["low","high","auto"]},"InputFileContent":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","description":"The name of the file to be sent to the model."},"file_url":{"type":"string","description":"The URL of the file to be sent to the model."},"file_data":{"type":"string","description":"The content of the file to be sent to the model.\n"}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"Item":{"type":"object","description":"Content item used to generate a response.\n","discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"],"anyOf":[{"$ref":"#/components/schemas/responses_InputMessage"},{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ComputerCallOutputItemParam"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/FunctionCallOutputItemParam"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/CompactionSummaryItemParam"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/LocalShellToolCallOutput"},{"$ref":"#/components/schemas/FunctionShellCallItemParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallItemParam"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutputItemParam"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/MCPApprovalResponse"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/CustomToolCallOutput"},{"$ref":"#/components/schemas/CustomToolCall"}]},"responses_InputMessage":{"type":"object","title":"Input message","description":"A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.\n","properties":{"type":{"type":"string","description":"The type of the message input. Always set to `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the message input. One of `user`, `system`, or `developer`.\n","enum":["user","system","developer"]},"status":{"type":"string","description":"The status of item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]},"content":{"$ref":"#/components/schemas/InputMessageContentList"}},"required":["role","content"]},"OutputMessage":{"type":"object","title":"Output message","description":"An output message from the model.\n","properties":{"id":{"type":"string","description":"The unique ID of the output message.\n"},"type":{"type":"string","description":"The type of the output message. Always `message`.\n","enum":["message"],"default":"message"},"role":{"type":"string","description":"The role of the output message. Always `assistant`.\n","enum":["assistant"]},"content":{"type":"array","description":"The content of the output message.\n","items":{"$ref":"#/components/schemas/OutputMessageContent"}},"status":{"type":"string","description":"The status of the message input. One of `in_progress`, `completed`, or\n`incomplete`. Populated when input items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","type","role","content","status"]},"OutputMessageContent":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/OutputTextContent"},{"$ref":"#/components/schemas/RefusalContent"}]},"OutputTextContent":{"properties":{"type":{"type":"string","enum":["output_text"],"description":"The type of the output text. Always `output_text`.","default":"output_text"},"text":{"type":"string","description":"The text output from the model."},"annotations":{"items":{"$ref":"#/components/schemas/responses_Annotation"},"type":"array","description":"The annotations of the text output."},"logprobs":{"items":{"$ref":"#/components/schemas/LogProb"},"type":"array"}},"type":"object","required":["type","text","annotations"],"title":"Output text","description":"A text output from the model."},"responses_Annotation":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FileCitationBody"},{"$ref":"#/components/schemas/UrlCitationBody"},{"$ref":"#/components/schemas/ContainerFileCitationBody"},{"$ref":"#/components/schemas/FilePath"}]},"FileCitationBody":{"properties":{"type":{"type":"string","enum":["file_citation"],"description":"The type of the file citation. Always `file_citation`.","default":"file_citation"},"file_id":{"type":"string","description":"The ID of the file."},"index":{"type":"integer","description":"The index of the file in the list of files."},"filename":{"type":"string","description":"The filename of the file cited."}},"type":"object","required":["type","file_id","index","filename"],"title":"File citation","description":"A citation to a file."},"UrlCitationBody":{"properties":{"type":{"type":"string","enum":["url_citation"],"description":"The type of the URL citation. Always `url_citation`.","default":"url_citation"},"url":{"type":"string","description":"The URL of the web resource."},"start_index":{"type":"integer","description":"The index of the first character of the URL citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the URL citation in the message."},"title":{"type":"string","description":"The title of the web resource."}},"type":"object","required":["type","url","start_index","end_index","title"],"title":"URL citation","description":"A citation for a web resource used to generate a model response."},"ContainerFileCitationBody":{"properties":{"type":{"type":"string","enum":["container_file_citation"],"description":"The type of the container file citation. Always `container_file_citation`.","default":"container_file_citation"},"container_id":{"type":"string","description":"The ID of the container file."},"file_id":{"type":"string","description":"The ID of the file."},"start_index":{"type":"integer","description":"The index of the first character of the container file citation in the message."},"end_index":{"type":"integer","description":"The index of the last character of the container file citation in the message."},"filename":{"type":"string","description":"The filename of the container file cited."}},"type":"object","required":["type","container_id","file_id","start_index","end_index","filename"],"title":"Container file citation","description":"A citation for a container file used to generate a model response."},"FilePath":{"type":"object","title":"File path","description":"A path to a file.\n","properties":{"type":{"type":"string","description":"The type of the file path. Always `file_path`.\n","enum":["file_path"]},"file_id":{"type":"string","description":"The ID of the file.\n"},"index":{"type":"integer","description":"The index of the file in the list of files.\n"}},"required":["type","file_id","index"]},"LogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"},"top_logprobs":{"items":{"$ref":"#/components/schemas/TopLogProb"},"type":"array"}},"type":"object","required":["token","logprob","bytes","top_logprobs"],"title":"Log probability","description":"The log probability of a token."},"TopLogProb":{"properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"items":{"type":"integer"},"type":"array"}},"type":"object","required":["token","logprob","bytes"],"title":"Top log probability","description":"The top log probability of a token."},"RefusalContent":{"properties":{"type":{"type":"string","enum":["refusal"],"description":"The type of the refusal. Always `refusal`.","default":"refusal"},"refusal":{"type":"string","description":"The refusal explanation from the model."}},"type":"object","required":["type","refusal"],"title":"Refusal","description":"A refusal from the model."},"FileSearchToolCall":{"type":"object","title":"File search tool call","description":"The results of a file search tool call. See the file search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the file search tool call.\n"},"type":{"type":"string","enum":["file_search_call"],"default":"file_search_call","description":"The type of the file search tool call. Always `file_search_call`.\n"},"status":{"type":"string","description":"The status of the file search tool call. One of `in_progress`,\n`searching`, `incomplete` or `failed`,\n","enum":["in_progress","searching","completed","incomplete","failed"]},"queries":{"type":"array","items":{"type":"string"},"description":"The queries used to search for files.\n"},"results":{"type":"array","description":"The results of the file search tool call.\n","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The unique ID of the file.\n"},"text":{"type":"string","description":"The text that was retrieved from the file.\n"},"filename":{"type":"string","description":"The name of the file.\n"},"attributes":{"$ref":"#/components/schemas/VectorStoreFileAttributes"},"score":{"type":"number","format":"float","description":"The relevance score of the file - a value between 0 and 1.\n"}}},"nullable":true}}},"VectorStoreFileAttributes":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.\n","maxProperties":16,"propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"}]}},"ComputerToolCall":{"type":"object","title":"Computer tool call","description":"A tool call to a computer use tool. See the computer use guide for more information.\n","properties":{"type":{"type":"string","description":"The type of the computer call. Always `computer_call`.","enum":["computer_call"],"default":"computer_call"},"id":{"type":"string","description":"The unique ID of the computer call."},"call_id":{"type":"string","description":"An identifier used when responding to the tool call with output.\n"},"action":{"$ref":"#/components/schemas/ComputerAction"},"pending_safety_checks":{"type":"array","items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"description":"The pending safety checks for the computer call.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","id","action","call_id","pending_safety_checks","status"]},"ComputerAction":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ClickParam"},{"$ref":"#/components/schemas/DoubleClickAction"},{"$ref":"#/components/schemas/Drag"},{"$ref":"#/components/schemas/KeyPressAction"},{"$ref":"#/components/schemas/Move"},{"$ref":"#/components/schemas/Screenshot"},{"$ref":"#/components/schemas/Scroll"},{"$ref":"#/components/schemas/Type"},{"$ref":"#/components/schemas/Wait"}]},"ClickParam":{"properties":{"type":{"type":"string","enum":["click"],"description":"Specifies the event type. For a click action, this property is always `click`.","default":"click"},"button":{"$ref":"#/components/schemas/ClickButtonType","description":"Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`."},"x":{"type":"integer","description":"The x-coordinate where the click occurred."},"y":{"type":"integer","description":"The y-coordinate where the click occurred."}},"type":"object","required":["type","button","x","y"],"title":"Click","description":"A click action."},"ClickButtonType":{"type":"string","enum":["left","right","wheel","back","forward"]},"DoubleClickAction":{"properties":{"type":{"type":"string","enum":["double_click"],"description":"Specifies the event type. For a double click action, this property is always set to `double_click`.","default":"double_click"},"x":{"type":"integer","description":"The x-coordinate where the double click occurred."},"y":{"type":"integer","description":"The y-coordinate where the double click occurred."}},"type":"object","required":["type","x","y"],"title":"DoubleClick","description":"A double click action."},"Drag":{"type":"object","title":"Drag","description":"A drag action.\n","properties":{"type":{"type":"string","enum":["drag"],"default":"drag","description":"Specifies the event type. For a drag action, this property is \nalways set to `drag`.\n"},"path":{"type":"array","description":"An array of coordinates representing the path of the drag action. Coordinates will appear as an array\nof objects, eg\n```\n[\n  { x: 100, y: 200 },\n  { x: 200, y: 300 }\n]\n```\n","items":{"$ref":"#/components/schemas/DragPoint"}}},"required":["type","path"]},"DragPoint":{"properties":{"x":{"type":"integer","description":"The x-coordinate."},"y":{"type":"integer","description":"The y-coordinate."}},"type":"object","required":["x","y"],"title":"Coordinate","description":"An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."},"KeyPressAction":{"properties":{"type":{"type":"string","enum":["keypress"],"description":"Specifies the event type. For a keypress action, this property is always set to `keypress`.","default":"keypress"},"keys":{"items":{"type":"string","description":"One of the keys the model is requesting to be pressed."},"type":"array","description":"The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key."}},"type":"object","required":["type","keys"],"title":"KeyPress","description":"A collection of keypresses the model would like to perform."},"Move":{"type":"object","title":"Move","description":"A mouse move action.\n","properties":{"type":{"type":"string","enum":["move"],"default":"move","description":"Specifies the event type. For a move action, this property is \nalways set to `move`.\n"},"x":{"type":"integer","description":"The x-coordinate to move to.\n"},"y":{"type":"integer","description":"The y-coordinate to move to.\n"}},"required":["type","x","y"]},"Screenshot":{"type":"object","title":"Screenshot","description":"A screenshot action.\n","properties":{"type":{"type":"string","enum":["screenshot"],"default":"screenshot","description":"Specifies the event type. For a screenshot action, this property is \nalways set to `screenshot`.\n"}},"required":["type"]},"Scroll":{"type":"object","title":"Scroll","description":"A scroll action.\n","properties":{"type":{"type":"string","enum":["scroll"],"default":"scroll","description":"Specifies the event type. For a scroll action, this property is \nalways set to `scroll`.\n"},"x":{"type":"integer","description":"The x-coordinate where the scroll occurred.\n"},"y":{"type":"integer","description":"The y-coordinate where the scroll occurred.\n"},"scroll_x":{"type":"integer","description":"The horizontal scroll distance.\n"},"scroll_y":{"type":"integer","description":"The vertical scroll distance.\n"}},"required":["type","x","y","scroll_x","scroll_y"]},"Type":{"type":"object","title":"Type","description":"An action to type in text.\n","properties":{"type":{"type":"string","enum":["type"],"default":"type","description":"Specifies the event type. For a type action, this property is \nalways set to `type`.\n"},"text":{"type":"string","description":"The text to type.\n"}},"required":["type","text"]},"Wait":{"type":"object","title":"Wait","description":"A wait action.\n","properties":{"type":{"type":"string","enum":["wait"],"default":"wait","description":"Specifies the event type. For a wait action, this property is \nalways set to `wait`.\n"}},"required":["type"]},"ComputerCallSafetyCheckParam":{"properties":{"id":{"type":"string","description":"The ID of the pending safety check."},"code":{"type":"string","description":"The type of the pending safety check.","nullable":true},"message":{"type":"string","description":"Details about the pending safety check.","nullable":true}},"type":"object","required":["id"],"description":"A pending safety check for the computer call."},"ComputerCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The ID of the computer tool call output.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The ID of the computer tool call that produced the output."},"type":{"type":"string","enum":["computer_call_output"],"description":"The type of the computer tool call output. Always `computer_call_output`.","default":"computer_call_output"},"output":{"$ref":"#/components/schemas/ComputerScreenshotImage"},"acknowledged_safety_checks":{"items":{"$ref":"#/components/schemas/ComputerCallSafetyCheckParam"},"type":"array","description":"The safety checks reported by the API that have been acknowledged by the developer.","nullable":true},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Computer tool call output","description":"The output of a computer tool call."},"ComputerScreenshotImage":{"type":"object","description":"A computer screenshot image used with the computer use tool.\n","properties":{"type":{"type":"string","enum":["computer_screenshot"],"default":"computer_screenshot","description":"Specifies the event type. For a computer screenshot, this property is \nalways set to `computer_screenshot`.\n"},"image_url":{"type":"string","description":"The URL of the screenshot image."},"file_id":{"type":"string","description":"The identifier of an uploaded file that contains the screenshot."}},"required":["type"]},"FunctionCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"WebSearchToolCall":{"type":"object","title":"Web search tool call","description":"The results of a web search tool call. See the web search guide for more information.\n","properties":{"id":{"type":"string","description":"The unique ID of the web search tool call.\n"},"type":{"type":"string","enum":["web_search_call"],"default":"web_search_call","description":"The type of the web search tool call. Always `web_search_call`.\n"},"status":{"type":"string","description":"The status of the web search tool call.\n","enum":["in_progress","searching","completed","failed"]},"action":{"type":"object","description":"An object describing the specific action taken in this web search call.\nIncludes details on how the model used the web (search, open_page, find).\n","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/WebSearchActionSearch"},{"$ref":"#/components/schemas/WebSearchActionOpenPage"},{"$ref":"#/components/schemas/WebSearchActionFind"}]}},"required":["id","type","status","action"]},"WebSearchActionSearch":{"type":"object","title":"Search action","description":"Action type \"search\" - Performs a web search query.\n","properties":{"type":{"type":"string","enum":["search"],"description":"The action type.\n"},"query":{"type":"string","description":"The search query.\n"},"sources":{"type":"array","title":"Web search sources","description":"The sources used in the search.\n","items":{"type":"object","title":"Web search source","description":"A source used in the search.\n","properties":{"type":{"type":"string","enum":["url"],"description":"The type of source. Always `url`.\n"},"url":{"type":"string","description":"The URL of the source.\n"}},"required":["type","url"]}}},"required":["type","query"]},"WebSearchActionOpenPage":{"type":"object","title":"Open page action","description":"Action type \"open_page\" - Opens a specific URL from search results.\n","properties":{"type":{"type":"string","enum":["open_page"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL opened by the model.\n"}},"required":["type","url"]},"WebSearchActionFind":{"type":"object","title":"Find action","description":"Action type \"find\": Searches for a pattern within a loaded page.\n","properties":{"type":{"type":"string","enum":["find"],"description":"The action type.\n"},"url":{"type":"string","format":"uri","description":"The URL of the page searched for the pattern.\n"},"pattern":{"type":"string","description":"The pattern or text to search for within the page.\n"}},"required":["type","url","pattern"]},"FunctionToolCall":{"type":"object","title":"Function tool call","description":"A tool call to run a function. Used when the model requests your code to execute a function.\n","properties":{"id":{"type":"string","description":"The unique ID of the function tool call.\n"},"type":{"type":"string","enum":["function_call"],"default":"function_call","description":"The type of the function tool call. Always `function_call`.\n"},"call_id":{"type":"string","description":"The unique ID of the function tool call generated by the model.\n"},"name":{"type":"string","description":"The name of the function to run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments to pass to the function.\n"},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"]},"FunctionCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function tool call generated by the model."},"type":{"type":"string","enum":["function_call_output"],"description":"The type of the function tool call output. Always `function_call_output`.","default":"function_call_output"},"output":{"description":"Text, image, or file output of the function tool call.","anyOf":[{"type":"string","maxLength":10485760,"description":"A JSON string of the output of the function tool call."},{"items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContentParam"},{"$ref":"#/components/schemas/InputImageContentParamAutoParam"},{"$ref":"#/components/schemas/InputFileContentParam"}]},"type":"array"}]},"status":{"$ref":"#/components/schemas/FunctionCallItemStatus","description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function tool call output","description":"The output of a function tool call."},"InputTextContentParam":{"properties":{"type":{"type":"string","enum":["input_text"],"description":"The type of the input item. Always `input_text`.","default":"input_text"},"text":{"type":"string","maxLength":10485760,"description":"The text input to the model."}},"type":"object","required":["type","text"],"title":"Input text","description":"A text input to the model."},"InputImageContentParamAutoParam":{"properties":{"type":{"type":"string","enum":["input_image"],"description":"The type of the input item. Always `input_image`.","default":"input_image"},"image_url":{"type":"string","maxLength":20971520,"nullable":true,"description":"The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL."},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"detail":{"$ref":"#/components/schemas/DetailEnum","nullable":true,"description":"The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`."}},"type":"object","required":["type"],"title":"Input image","description":"An image input to the model."},"DetailEnum":{"type":"string","enum":["low","high","auto"]},"InputFileContentParam":{"properties":{"type":{"type":"string","enum":["input_file"],"description":"The type of the input item. Always `input_file`.","default":"input_file"},"file_id":{"type":"string","nullable":true,"description":"The ID of the file to be sent to the model."},"filename":{"type":"string","nullable":true,"description":"The name of the file to be sent to the model."},"file_data":{"type":"string","maxLength":33554432,"nullable":true,"description":"The base64-encoded data of the file to be sent to the model."},"file_url":{"type":"string","nullable":true,"description":"The URL of the file to be sent to the model."}},"type":"object","required":["type"],"title":"Input file","description":"A file input to the model."},"ReasoningItem":{"type":"object","description":"A description of the chain of thought used by a reasoning model while generating a response.\nInclude these items in your input for subsequent turns if you are manually managing context.\n","title":"Reasoning","properties":{"type":{"type":"string","description":"The type of the object. Always `reasoning`.\n","enum":["reasoning"],"default":"reasoning"},"id":{"type":"string","description":"The unique identifier of the reasoning content.\n"},"encrypted_content":{"type":"string","description":"The encrypted content of the reasoning item - populated when a response is\ngenerated with `reasoning.encrypted_content` in the `include` parameter.\n","nullable":true},"summary":{"type":"array","description":"Reasoning summary content.\n","items":{"$ref":"#/components/schemas/Summary"}},"content":{"type":"array","description":"Reasoning text content.\n","items":{"$ref":"#/components/schemas/ReasoningTextContent"}},"status":{"type":"string","description":"The status of the item. One of `in_progress`, `completed`, or\n`incomplete`. Populated when items are returned via API.\n","enum":["in_progress","completed","incomplete"]}},"required":["id","summary","type"]},"Summary":{"properties":{"type":{"type":"string","enum":["summary_text"],"description":"The type of the object. Always `summary_text`.","default":"summary_text"},"text":{"type":"string","description":"A summary of the reasoning output from the model so far."}},"type":"object","required":["type","text"],"title":"Summary text","description":"A summary text from the model."},"ReasoningTextContent":{"properties":{"type":{"type":"string","enum":["reasoning_text"],"description":"The type of the reasoning text. Always `reasoning_text`.","default":"reasoning_text"},"text":{"type":"string","description":"The reasoning text from the model."}},"type":"object","required":["type","text"],"title":"ReasoningTextContent","description":"Reasoning text from the model."},"CompactionSummaryItemParam":{"properties":{"id":{"type":"string","description":"The ID of the compaction item.","nullable":true},"type":{"type":"string","enum":["compaction"],"description":"The type of the item. Always `compaction`.","default":"compaction"},"encrypted_content":{"type":"string","maxLength":10485760}},"type":"object","required":["type","encrypted_content"],"title":"Compaction item","description":"A compaction item generated by the `v1/responses/compact` API."},"ImageGenToolCall":{"type":"object","title":"Image generation call","description":"An image generation request made by the model.\n","properties":{"type":{"type":"string","enum":["image_generation_call"],"default":"image_generation_call","description":"The type of the image generation call. Always `image_generation_call`.\n"},"id":{"type":"string","description":"The unique ID of the image generation call.\n"},"status":{"type":"string","enum":["in_progress","completed","generating","failed"],"description":"The status of the image generation call.\n"},"result":{"type":"string","description":"The generated image encoded in base64.\n","nullable":true}},"required":["type","id","status","result"]},"CodeInterpreterToolCall":{"type":"object","title":"Code interpreter tool call","description":"A tool call to run code.\n","properties":{"type":{"type":"string","enum":["code_interpreter_call"],"default":"code_interpreter_call","description":"The type of the code interpreter tool call. Always `code_interpreter_call`.\n"},"id":{"type":"string","description":"The unique ID of the code interpreter tool call.\n"},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"],"description":"The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.\n"},"container_id":{"type":"string","description":"The ID of the container used to run the code.\n"},"code":{"type":"string","description":"The code to run, or null if not available.\n","nullable":true},"outputs":{"type":"array","items":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/CodeInterpreterOutputLogs"},{"$ref":"#/components/schemas/CodeInterpreterOutputImage"}]},"discriminator":{"propertyName":"type"},"description":"The outputs generated by the code interpreter, such as logs or images.\nCan be null if no outputs are available.\n","nullable":true}},"required":["type","id","status","container_id","code","outputs"]},"CodeInterpreterOutputLogs":{"properties":{"type":{"type":"string","enum":["logs"],"description":"The type of the output. Always `logs`.","default":"logs"},"logs":{"type":"string","description":"The logs output from the code interpreter."}},"type":"object","required":["type","logs"],"title":"Code interpreter output logs","description":"The logs output from the code interpreter."},"CodeInterpreterOutputImage":{"properties":{"type":{"type":"string","enum":["image"],"description":"The type of the output. Always `image`.","default":"image"},"url":{"type":"string","description":"The URL of the image output from the code interpreter."}},"type":"object","required":["type","url"],"title":"Code interpreter output image","description":"The image output from the code interpreter."},"LocalShellToolCall":{"type":"object","title":"Local shell call","description":"A tool call to run a command on the local shell.\n","properties":{"type":{"type":"string","enum":["local_shell_call"],"default":"local_shell_call","description":"The type of the local shell call. Always `local_shell_call`.\n"},"id":{"type":"string","description":"The unique ID of the local shell call.\n"},"call_id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"action":{"$ref":"#/components/schemas/LocalShellExecAction"},"status":{"type":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the local shell call.\n"}},"required":["type","id","call_id","action","status"]},"LocalShellExecAction":{"properties":{"type":{"type":"string","enum":["exec"],"description":"The type of the local shell action. Always `exec`.","default":"exec"},"command":{"items":{"type":"string"},"type":"array","description":"The command to run."},"timeout_ms":{"type":"integer","nullable":true,"description":"Optional timeout in milliseconds for the command."},"working_directory":{"type":"string","nullable":true,"description":"Optional working directory to run the command in."},"env":{"additionalProperties":{"type":"string"},"type":"object","description":"Environment variables to set for the command."},"user":{"type":"string","nullable":true,"description":"Optional user to run the command as."}},"type":"object","required":["type","command","env"],"title":"Local shell exec action","description":"Execute a shell command on the server."},"LocalShellToolCallOutput":{"type":"object","title":"Local shell call output","description":"The output of a local shell tool call.\n","properties":{"type":{"type":"string","enum":["local_shell_call_output"],"default":"local_shell_call_output","description":"The type of the local shell tool call output. Always `local_shell_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the local shell tool call generated by the model.\n"},"output":{"type":"string","description":"A JSON string of the output of the local shell tool call.\n"},"status":{"ype":"string","enum":["in_progress","completed","incomplete"],"description":"The status of the item. One of `in_progress`, `completed`, or `incomplete`.\n","nullable":true}},"required":["id","type","call_id","output"]},"FunctionShellCallItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `function_shell_call`.","default":"shell_call"},"action":{"$ref":"#/components/schemas/FunctionShellActionParam","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/FunctionShellCallItemStatus","nullable":true}},"type":"object","required":["call_id","type","action"],"title":"Function shell tool call","description":"A tool representing a request to execute one or more shell commands."},"FunctionShellActionParam":{"properties":{"commands":{"items":{"type":"string"},"type":"array","description":"Ordered shell commands for the execution environment to run."},"timeout_ms":{"type":"integer","description":"Maximum wall-clock time in milliseconds to allow the shell commands to run.","nullable":true},"max_output_length":{"type":"integer","description":"Maximum number of UTF-8 characters to capture from combined stdout and stderr output.","nullable":true}},"type":"object","required":["commands"],"title":"Function shell action","description":"Commands and limits describing how to run the function shell tool call."},"FunctionShellCallItemStatus":{"type":"string","enum":["in_progress","completed","incomplete"],"title":"Function shell call status","description":"Status values reported for function shell tool calls."},"FunctionShellCallOutputItemParam":{"properties":{"id":{"type":"string","description":"The unique ID of the function shell tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the function shell tool call generated by the model."},"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the item. Always `function_shell_call_output`.","default":"shell_call_output"},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContentParam"},"type":"array","description":"Captured chunks of stdout and stderr output, along with their associated outcomes."},"max_output_length":{"type":"integer","description":"The maximum number of UTF-8 characters captured for this shell call's combined output.","nullable":true}},"type":"object","required":["call_id","type","output"],"title":"Function shell tool call output","description":"The streamed output items emitted by a function shell tool call."},"FunctionShellCallOutputContentParam":{"properties":{"stdout":{"type":"string","maxLength":10485760,"description":"Captured stdout output for this chunk of the shell call."},"stderr":{"type":"string","maxLength":10485760,"description":"Captured stderr output for this chunk of the shell call."},"outcome":{"$ref":"#/components/schemas/FunctionShellCallOutputOutcomeParam","description":"The exit or timeout outcome associated with this chunk."}},"type":"object","required":["stdout","stderr","outcome"],"title":"Function shell output chunk","description":"Captured stdout and stderr for a portion of a function shell tool call output."},"FunctionShellCallOutputOutcomeParam":{"title":"Function shell call outcome","description":"The exit or timeout outcome associated with this chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcomeParam"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcomeParam"}]},"FunctionShellCallOutputTimeoutOutcomeParam":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcomeParam":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"The exit code returned by the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCallItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatusParam","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"$ref":"#/components/schemas/ApplyPatchOperationParam","description":"The specific create, delete, or update instruction for the apply_patch tool call."}},"type":"object","required":["type","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call representing a request to create, delete, or update files using diff patches."},"ApplyPatchCallStatusParam":{"type":"string","enum":["in_progress","completed"],"title":"Apply patch call status","description":"Status values reported for apply_patch tool calls."},"ApplyPatchOperationParam":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperationParam"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperationParam"}]},"ApplyPatchCreateFileOperationParam":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"The operation type. Always `create_file`.","default":"create_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to create relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply when creating the file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction for creating a new file via the apply_patch tool."},"ApplyPatchDeleteFileOperationParam":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"The operation type. Always `delete_file`.","default":"delete_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to delete relative to the workspace root."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction for deleting an existing file via the apply_patch tool."},"ApplyPatchUpdateFileOperationParam":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"The operation type. Always `update_file`.","default":"update_file"},"path":{"type":"string","minLength":1,"description":"Path of the file to update relative to the workspace root."},"diff":{"type":"string","maxLength":10485760,"description":"Unified diff content to apply to the existing file."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction for updating an existing file via the apply_patch tool."},"ApplyPatchToolCallOutputItemParam":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API.","nullable":true},"call_id":{"type":"string","maxLength":64,"minLength":1,"description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatusParam","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","maxLength":10485760,"description":"Optional human-readable log text from the apply patch tool (e.g., patch results or errors).","nullable":true}},"type":"object","required":["type","call_id","status"],"title":"Apply patch tool call output","description":"The streamed output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatusParam":{"type":"string","enum":["completed","failed"],"title":"Apply patch call output status","description":"Outcome values reported for apply_patch tool call outputs."},"MCPListTools":{"type":"object","title":"MCP list tools","description":"A list of tools available on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_list_tools"],"default":"mcp_list_tools","description":"The type of the item. Always `mcp_list_tools`.\n"},"id":{"type":"string","description":"The unique ID of the list.\n"},"server_label":{"type":"string","description":"The label of the MCP server.\n"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/MCPListToolsTool"},"description":"The tools available on the server.\n"},"error":{"type":"string","description":"Error message if the server could not list tools.\n","nullable":true}},"required":["type","id","server_label","tools"]},"MCPListToolsTool":{"type":"object","title":"MCP list tools tool","description":"A tool available on an MCP server.\n","properties":{"name":{"type":"string","description":"The name of the tool.\n"},"description":{"type":"string","description":"The description of the tool.\n","nullable":true},"input_schema":{"type":"object","description":"The JSON schema describing the tool's input.\n"},"annotations":{"type":"object","description":"Additional annotations about the tool.\n","nullable":true}},"required":["name","input_schema"]},"MCPApprovalRequest":{"type":"object","title":"MCP approval request","description":"A request for human approval of a tool invocation.\n","properties":{"type":{"type":"string","enum":["mcp_approval_request"],"default":"mcp_approval_request","description":"The type of the item. Always `mcp_approval_request`.\n"},"id":{"type":"string","description":"The unique ID of the approval request.\n"},"server_label":{"type":"string","description":"The label of the MCP server making the request.\n"},"name":{"type":"string","description":"The name of the tool to run.\n"},"arguments":{"type":"string","description":"A JSON string of arguments for the tool.\n"}},"required":["type","id","server_label","name","arguments"]},"MCPApprovalResponse":{"type":"object","title":"MCP approval response","description":"A response to an MCP approval request.\n","properties":{"type":{"type":"string","enum":["mcp_approval_response"],"default":"mcp_approval_response","description":"The type of the item. Always `mcp_approval_response`.\n"},"id":{"type":"string","description":"The unique ID of the approval response\n","nullable":true},"approval_request_id":{"type":"string","description":"The ID of the approval request being answered.\n"},"approve":{"type":"boolean","description":"Whether the request was approved.\n"},"reason":{"type":"string","description":"Optional reason for the decision.\n","nullable":true}},"required":["type","request_id","approve","approval_request_id"]},"MCPToolCall":{"type":"object","title":"MCP tool call","description":"An invocation of a tool on an MCP server.\n","properties":{"type":{"type":"string","enum":["mcp_call"],"default":"mcp_call","description":"The type of the item. Always `mcp_call`.\n"},"id":{"type":"string","description":"The unique ID of the tool call.\n"},"server_label":{"type":"string","description":"The label of the MCP server running the tool.\n"},"name":{"type":"string","description":"The name of the tool that was run.\n"},"arguments":{"type":"string","description":"A JSON string of the arguments passed to the tool.\n"},"output":{"type":"string","description":"The output from the tool call.\n","nullable":true},"error":{"type":"string","description":"The error from the tool call, if any.\n","nullable":true},"status":{"$ref":"#/components/schemas/MCPToolCallStatus","description":"The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.\n"},"approval_request_id":{"type":"string","description":"Unique identifier for the MCP tool call approval request.\nInclude this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.\n","nullable":true}},"required":["type","id","server_label","name","arguments"]},"MCPToolCallStatus":{"type":"string","enum":["in_progress","completed","incomplete","calling","failed"]},"CustomToolCallOutput":{"type":"object","title":"Custom tool call output","description":"The output of a custom tool call from your code, being sent back to the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output","description":"The type of the custom tool call output. Always `custom_tool_call_output`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call output in the platform.\n"},"call_id":{"type":"string","description":"The call ID, used to map this custom tool call output to a custom tool call.\n"},"output":{"description":"The output from the custom tool call generated by your code.\nCan be a string or an list of output content.\n","anyOf":[{"type":"string","description":"A string of the output of the custom tool call.\n","title":"string output"},{"type":"array","items":{"$ref":"#/components/schemas/FunctionAndCustomToolCallOutput"},"title":"output content list","description":"Text, image, or file output of the custom tool call.\n"}]}},"required":["type","call_id","output"]},"FunctionAndCustomToolCallOutput":{"discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/InputTextContent"},{"$ref":"#/components/schemas/InputImageContent"},{"$ref":"#/components/schemas/InputFileContent"}]},"CustomToolCall":{"type":"object","title":"Custom tool call","description":"A call to a custom tool created by the model.\n","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call","description":"The type of the custom tool call. Always `custom_tool_call`.\n"},"id":{"type":"string","description":"The unique ID of the custom tool call in the platform.\n"},"call_id":{"type":"string","description":"An identifier used to map this custom tool call to a tool call output.\n"},"name":{"type":"string","description":"The name of the custom tool being called.\n"},"input":{"type":"string","description":"The input for the custom tool call generated by the model.\n"}},"required":["type","call_id","name","input"]},"ItemReferenceParam":{"properties":{"type":{"type":"string","nullable":true,"enum":["item_reference"],"description":"The type of item to reference. Always `item_reference`.","default":"item_reference"},"id":{"type":"string","description":"The ID of the item to reference."}},"type":"object","required":["id"],"title":"Item reference","description":"An internal identifier for an item to reference."},"CompactResource":{"properties":{"id":{"type":"string","description":"The unique identifier for the compacted response."},"object":{"type":"string","enum":["response.compaction"],"description":"The object type. Always `response.compaction`.","default":"response.compaction"},"output":{"type":"array","description":"The compacted list of output items. This is a list of all user messages, followed by a single compaction item.","items":{"$ref":"#/components/schemas/OutputItem"}},"created_at":{"type":"integer","description":"Unix timestamp (in seconds) when the compacted conversation was created."},"usage":{"$ref":"#/components/schemas/ResponseUsage","description":"Token accounting for the compaction pass, including cached, reasoning, and total tokens."}},"type":"object","required":["id","object","output","created_at","usage"],"title":"The compacted response object"},"OutputItem":{"anyOf":[{"$ref":"#/components/schemas/OutputMessage"},{"$ref":"#/components/schemas/FileSearchToolCall"},{"$ref":"#/components/schemas/FunctionToolCall"},{"$ref":"#/components/schemas/WebSearchToolCall"},{"$ref":"#/components/schemas/ComputerToolCall"},{"$ref":"#/components/schemas/ReasoningItem"},{"$ref":"#/components/schemas/ImageGenToolCall"},{"$ref":"#/components/schemas/CodeInterpreterToolCall"},{"$ref":"#/components/schemas/LocalShellToolCall"},{"$ref":"#/components/schemas/FunctionShellCall"},{"$ref":"#/components/schemas/FunctionShellCallOutput"},{"$ref":"#/components/schemas/ApplyPatchToolCall"},{"$ref":"#/components/schemas/ApplyPatchToolCallOutput"},{"$ref":"#/components/schemas/MCPToolCall"},{"$ref":"#/components/schemas/MCPListTools"},{"$ref":"#/components/schemas/MCPApprovalRequest"},{"$ref":"#/components/schemas/CustomToolCall"}],"discriminator":{"propertyName":"type"},"properties":{"type":{"type":"string","description":"The type of the input item."}},"required":["type"]},"FunctionShellCall":{"properties":{"type":{"type":"string","enum":["shell_call"],"description":"The type of the item. Always `shell_call`.","default":"shell_call"},"id":{"type":"string","description":"The unique ID of the function shell tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the function shell tool call generated by the model."},"action":{"$ref":"#/components/schemas/FunctionShellAction","description":"The shell commands and limits that describe how to run the tool call."},"status":{"$ref":"#/components/schemas/LocalShellCallStatus","description":"The status of the shell call. One of `in_progress`, `completed`, or `incomplete`."},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","action","status"],"title":"Function shell tool call","description":"A tool call that executes one or more shell commands in a managed environment."},"FunctionShellAction":{"properties":{"commands":{"items":{"type":"string","description":"A list of commands to run."},"type":"array"},"timeout_ms":{"type":"integer","description":"Optional timeout in milliseconds for the commands.","nullable":true},"max_output_length":{"type":"integer","description":"Optional maximum number of characters to return from each command.","nullable":true}},"type":"object","required":["commands","timeout_ms","max_output_length"],"title":"Shell exec action","description":"Execute a shell command."},"LocalShellCallStatus":{"type":"string","enum":["in_progress","completed","incomplete"]},"FunctionShellCallOutput":{"properties":{"type":{"type":"string","enum":["shell_call_output"],"description":"The type of the shell call output. Always `shell_call_output`.","default":"shell_call_output"},"id":{"type":"string","description":"The unique ID of the shell call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the shell tool call generated by the model."},"output":{"items":{"$ref":"#/components/schemas/FunctionShellCallOutputContent"},"type":"array","description":"An array of shell call output contents"},"max_output_length":{"type":"integer","description":"The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output.","nullable":true},"created_by":{"type":"string"}},"type":"object","required":["type","id","call_id","output","max_output_length"],"title":"Shell call output","description":"The output of a shell tool call."},"FunctionShellCallOutputContent":{"properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"outcome":{"title":"Function shell call outcome","description":"Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/FunctionShellCallOutputTimeoutOutcome"},{"$ref":"#/components/schemas/FunctionShellCallOutputExitOutcome"}]},"created_by":{"type":"string"}},"type":"object","required":["stdout","stderr","outcome"],"title":"Shell call output content","description":"The content of a shell call output."},"FunctionShellCallOutputTimeoutOutcome":{"properties":{"type":{"type":"string","enum":["timeout"],"description":"The outcome type. Always `timeout`.","default":"timeout"}},"type":"object","required":["type"],"title":"Function shell timeout outcome","description":"Indicates that the function shell call exceeded its configured time limit."},"FunctionShellCallOutputExitOutcome":{"properties":{"type":{"type":"string","enum":["exit"],"description":"The outcome type. Always `exit`.","default":"exit"},"exit_code":{"type":"integer","description":"Exit code from the shell process."}},"type":"object","required":["type","exit_code"],"title":"Function shell exit outcome","description":"Indicates that the shell commands finished and returned an exit code."},"ApplyPatchToolCall":{"properties":{"type":{"type":"string","enum":["apply_patch_call"],"description":"The type of the item. Always `apply_patch_call`.","default":"apply_patch_call"},"id":{"type":"string","description":"The unique ID of the apply patch tool call. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallStatus","description":"The status of the apply patch tool call. One of `in_progress` or `completed`."},"operation":{"title":"Apply patch operation","description":"One of the create_file, delete_file, or update_file operations applied via apply_patch.","discriminator":{"propertyName":"type"},"anyOf":[{"$ref":"#/components/schemas/ApplyPatchCreateFileOperation"},{"$ref":"#/components/schemas/ApplyPatchDeleteFileOperation"},{"$ref":"#/components/schemas/ApplyPatchUpdateFileOperation"}]},"created_by":{"type":"string","description":"The ID of the entity that created this tool call."}},"type":"object","required":["type","id","call_id","status","operation"],"title":"Apply patch tool call","description":"A tool call that applies file diffs by creating, deleting, or updating files."},"ApplyPatchCallStatus":{"type":"string","enum":["in_progress","completed"]},"ApplyPatchCreateFileOperation":{"properties":{"type":{"type":"string","enum":["create_file"],"description":"Create a new file with the provided diff.","default":"create_file"},"path":{"type":"string","description":"Path of the file to create."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch create file operation","description":"Instruction describing how to create a file via the apply_patch tool."},"ApplyPatchDeleteFileOperation":{"properties":{"type":{"type":"string","enum":["delete_file"],"description":"Delete the specified file.","default":"delete_file"},"path":{"type":"string","description":"Path of the file to delete."}},"type":"object","required":["type","path"],"title":"Apply patch delete file operation","description":"Instruction describing how to delete a file via the apply_patch tool."},"ApplyPatchUpdateFileOperation":{"properties":{"type":{"type":"string","enum":["update_file"],"description":"Update an existing file with the provided diff.","default":"update_file"},"path":{"type":"string","description":"Path of the file to update."},"diff":{"type":"string","description":"Diff to apply."}},"type":"object","required":["type","path","diff"],"title":"Apply patch update file operation","description":"Instruction describing how to update a file via the apply_patch tool."},"ApplyPatchToolCallOutput":{"properties":{"type":{"type":"string","enum":["apply_patch_call_output"],"description":"The type of the item. Always `apply_patch_call_output`.","default":"apply_patch_call_output"},"id":{"type":"string","description":"The unique ID of the apply patch tool call output. Populated when this item is returned via API."},"call_id":{"type":"string","description":"The unique ID of the apply patch tool call generated by the model."},"status":{"$ref":"#/components/schemas/ApplyPatchCallOutputStatus","description":"The status of the apply patch tool call output. One of `completed` or `failed`."},"output":{"type":"string","description":"Optional textual output returned by the apply patch tool.","nullable":true},"created_by":{"type":"string","description":"The ID of the entity that created this tool call output."}},"type":"object","required":["type","id","call_id","status"],"title":"Apply patch tool call output","description":"The output emitted by an apply patch tool call."},"ApplyPatchCallOutputStatus":{"type":"string","enum":["completed","failed"]},"ResponseUsage":{"type":"object","description":"Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used.\n","properties":{"input_tokens":{"type":"integer","description":"The number of input tokens."},"input_tokens_details":{"type":"object","description":"A detailed breakdown of the input tokens.","properties":{"cached_tokens":{"type":"integer","description":"The number of tokens retrieved from cache. See prompt caching for details.\n"},"cache_write_tokens":{"type":"integer","description":"The number of tokens written to cache. Nexos extension.\n"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","description":"The number of output tokens."},"output_tokens_details":{"type":"object","description":"A detailed breakdown of the output tokens.","properties":{"reasoning_tokens":{"type":"integer","description":"The number of reasoning tokens."}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","description":"The total number of tokens used."},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]}}},"paths":{"/v1/responses/compact":{"post":{"tags":["Responses"],"summary":"Compact a response","description":"Compact conversation","operationId":"CompactConversation","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactResponseMethodPublicBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/CompactResponseMethodPublicBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactResource"}}}}}}}}}
````


# Audio

Generate audio or text from audio or text input.

## Create speech

> Generate speech audio from text.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Audio","description":"Generate audio or text from audio or text input."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"SpeechRequest":{"type":"object","additionalProperties":false,"properties":{"model":{"type":"string"},"input":{"type":"string","description":"The text to generate audio for.","maxLength":4096},"voice":{"description":"The voice to use when generating the audio.","type":"string","enum":["alloy","ash","coral","echo","fable","onyx","nova","sage","shimmer"]},"response_format":{"description":"The format to output audio in.","default":"mp3","type":"string","enum":["mp3","opus","aac","flac","wav","pcm"]},"speed":{"description":"The speed of the generated audio.","type":"number","default":1,"minimum":0.25,"maximum":4}},"required":["model","input","voice"]}},"responses":{"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/audio/speech":{"post":{"operationId":"post-audio-speech-v1","summary":"Create speech","tags":["Audio"],"description":"Generate speech audio from text.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechRequest"}}}},"responses":{"200":{"description":"Successful response with an audio speech.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```

## Create transcription

> Transcribe audio to text.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Audio","description":"Generate audio or text from audio or text input."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"TranscriptionRequest":{"type":"object","additionalProperties":false,"properties":{"file":{"description":"The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\n","type":"string","format":"binary"},"model":{"type":"string"},"language":{"description":"The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.\n","type":"string"},"prompt":{"description":"An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should match the audio language.\n","type":"string"},"response_format":{"description":"The format of the transcript output. Note: the non-JSON formats (`text`, `srt`,\n`vtt`) are currently returned wrapped in a JSON object (`{\"html-message\": \"...\"}`)\nwith `Content-Type: application/json`, not as a plain-text body.\n","type":"string","enum":["json","text","srt","verbose_json","vtt"],"default":"json"},"temperature":{"description":"The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n","type":"number","default":0},"timestamp_granularities[]":{"description":"The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency. Note: the currently available Whisper deployment returns only `segments` — `word` granularity is accepted but the `words` array is not populated.\n","type":"array","items":{"type":"string","enum":["word","segment"]},"default":["segment"]}},"required":["file","model"]},"TranscriptionResponseJson":{"type":"object","description":"Represents a transcription response returned by model, based on the provided input.","properties":{"text":{"type":"string","description":"The transcribed text."},"usage":{"$ref":"#/components/schemas/TranscriptionUsageDuration"}}},"TranscriptionUsageDuration":{"type":"object","description":"Usage information billed by audio duration.","properties":{"type":{"type":"string","description":"The usage type, which is always `duration`.","enum":["duration"]},"seconds":{"type":"integer","description":"Duration of the input audio in seconds, rounded up for billing."}}},"TranscriptionResponseVerboseJson":{"type":"object","description":"Represents a verbose json transcription response returned by model, based on the provided input.","properties":{"task":{"type":"string","description":"The task performed (always `transcribe`)."},"language":{"type":"string","description":"The language of the input audio."},"duration":{"type":"number","description":"The duration of the input audio in seconds."},"text":{"type":"string","description":"The transcribed text."},"words":{"type":"array","description":"Extracted words and their corresponding timestamps.","items":{"$ref":"#/components/schemas/TranscriptionWord"}},"segments":{"type":"array","description":"Segments of the transcribed text and their corresponding details.","items":{"$ref":"#/components/schemas/TranscriptionSegment"}},"usage":{"$ref":"#/components/schemas/TranscriptionUsageDuration"}}},"TranscriptionWord":{"type":"object","properties":{"word":{"type":"string","description":"The text content of the word."},"start":{"type":"number","format":"float","description":"Start time of the word in seconds."},"end":{"type":"number","format":"float","description":"End time of the word in seconds."}}},"TranscriptionSegment":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of the segment."},"seek":{"type":"integer","description":"Seek offset of the segment."},"start":{"type":"number","format":"float","description":"Start time of the segment in seconds."},"end":{"type":"number","format":"float","description":"End time of the segment in seconds."},"text":{"type":"string","description":"Text content of the segment."},"tokens":{"type":"array","items":{"type":"integer"},"description":"Array of token IDs for the text content."},"temperature":{"type":"number","format":"float","description":"Temperature parameter used for generating the segment."},"avg_logprob":{"type":"number","format":"float","description":"Average logprob of the segment. If the value is lower than -1, consider the logprobs failed."},"compression_ratio":{"type":"number","format":"float","description":"Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed."},"no_speech_prob":{"type":"number","format":"float","description":"Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent."}}}},"responses":{"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/audio/transcriptions":{"post":{"operationId":"post-audio-transcriptions-v1","summary":"Create transcription","tags":["Audio"],"description":"Transcribe audio to text.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TranscriptionRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TranscriptionResponseJson"},{"$ref":"#/components/schemas/TranscriptionResponseVerboseJson"}]}}}},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```

## Create translation

> Translate audio to English text.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Audio","description":"Generate audio or text from audio or text input."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"TranslationRequest":{"type":"object","additionalProperties":false,"properties":{"file":{"description":"The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\n","type":"string","format":"binary"},"model":{"type":"string"},"prompt":{"description":"An optional text to guide the model's style or continue a previous audio segment. The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting) should be in English.\n","type":"string"},"response_format":{"description":"The format of the translated transcript output. Note: the non-JSON formats\n(`text`, `srt`, `vtt`) are currently returned wrapped in a JSON object\n(`{\"html-message\": \"...\"}`) with `Content-Type: application/json`, not as a\nplain-text body.\n","type":"string","enum":["json","text","srt","verbose_json","vtt"],"default":"json"},"temperature":{"description":"The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n","type":"number","default":0}},"required":["file","model"]},"TranslationResponseJson":{"type":"object","description":"Represents a translation response returned by model, based on the provided input.","properties":{"text":{"type":"string","description":"The translated text."}}},"TranslationResponseVerboseJson":{"type":"object","description":"Represents a verbose translation response returned by model, based on the provided input.","properties":{"task":{"type":"string","description":"The task performed (always `translate`)."},"language":{"type":"string","description":"The language of the output translation (always `english`)."},"duration":{"type":"number","description":"The duration of the input audio in seconds."},"text":{"type":"string","description":"The translated text."},"segments":{"type":"array","description":"Segments of the translated text and their corresponding details.","items":{"$ref":"#/components/schemas/TranscriptionSegment"}}}},"TranscriptionSegment":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of the segment."},"seek":{"type":"integer","description":"Seek offset of the segment."},"start":{"type":"number","format":"float","description":"Start time of the segment in seconds."},"end":{"type":"number","format":"float","description":"End time of the segment in seconds."},"text":{"type":"string","description":"Text content of the segment."},"tokens":{"type":"array","items":{"type":"integer"},"description":"Array of token IDs for the text content."},"temperature":{"type":"number","format":"float","description":"Temperature parameter used for generating the segment."},"avg_logprob":{"type":"number","format":"float","description":"Average logprob of the segment. If the value is lower than -1, consider the logprobs failed."},"compression_ratio":{"type":"number","format":"float","description":"Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed."},"no_speech_prob":{"type":"number","format":"float","description":"Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent."}}}},"responses":{"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/audio/translations":{"post":{"operationId":"post-audio-translations-v1","summary":"Create translation","tags":["Audio"],"description":"Translate audio to English text.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TranslationRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TranslationResponseJson"},{"$ref":"#/components/schemas/TranslationResponseVerboseJson"}]}}}},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```


# Images

Generate or edit images from image or text input.

## Create image

> Generate images from a text prompt.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Images","description":"Generate or edit images from image or text input."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"ImagesGenerationsRequest":{"type":"object","additionalProperties":false,"properties":{"prompt":{"description":"A text description of the desired image(s).","type":"string"},"model":{"type":"string"},"n":{"type":"integer","minimum":1,"maximum":10,"nullable":true,"description":"The number of images to generate. Must be between 1 and 10."},"quality":{"description":"The quality of the generated images. Supported values depend on the model: GPT Image models accept `low`, `medium`, `high`, and `auto`; `standard` and `hd` are DALL-E values and are rejected by GPT Image models.\n","type":"string","enum":["auto","low","medium","high","standard","hd"],"nullable":true},"response_format":{"description":"The format of the generated images. The currently available models (GPT Image, Imagen) ignore this parameter and always return base64-encoded images (`b64_json`); `url` only applies to models that support hosted image URLs.\n","type":"string","enum":["url","b64_json"],"nullable":true},"size":{"description":"The size of the generated images. Supported values depend on the model: GPT Image models accept `1024x1024`, `1536x1024`, `1024x1536`, and `auto`; the remaining values are DALL-E sizes.\n","type":"string","enum":["auto","1024x1024","1536x1024","1024x1536","256x256","512x512","1792x1024","1024x1792"],"nullable":true},"style":{"description":"The style of the generated images. DALL-E parameter; accepted but ignored by GPT Image models.","type":"string","enum":["vivid","natural"],"nullable":true}},"required":["prompt","model"]},"ImagesResponseBody":{"type":"object","properties":{"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the images were created.\n"},"data":{"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string","description":"The base64-encoded JSON of the generated image. Always returned by GPT Image models,\notherwise returned if response_format is b64_json.\n"},"revised_prompt":{"type":"string","description":"The prompt that was used to generate the image, if there was any revision to the prompt.\n"},"url":{"type":"string","description":"The URL of the generated image, if response_format is url. Not returned by GPT Image models.\n"}}}},"background":{"type":"string","description":"The background setting of the generated images. Returned by GPT Image models."},"output_format":{"type":"string","description":"The output format of the generated images. Returned by GPT Image models."},"quality":{"type":"string","description":"The quality of the generated images. Returned by GPT Image models."},"size":{"type":"string","description":"The size of the generated images. Returned by GPT Image models."},"provider":{"type":"string","description":"The upstream provider that served the request (e.g. `vertex-ai`). Returned for some providers."},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}}}},"required":["created","data"]}},"responses":{"ImagesResponse":{"description":"Represents an image response returned by model, based on the provided input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagesResponseBody"}}}},"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/images/generations":{"post":{"operationId":"post-images-generations-v1","summary":"Create image","tags":["Images"],"description":"Generate images from a text prompt.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagesGenerationsRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/ImagesResponse"},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```

## Edit images

> Edit or extend images based on image and text input, using GPT Image models.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Images","description":"Generate or edit images from image or text input."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"ImagesEditsRequest":{"allOf":[{"$ref":"#/components/schemas/ImagesEditsFormFields"},{"type":"object","properties":{"image":{"description":"The image(s) to edit. Send one `image` part for a single image, or repeated\n`image[]` parts for multiple images (up to 16). Each image must be a png,\nwebp, or jpg file less than 50MB. Total request size is limited to 100MB.\n","type":"array","maxItems":16,"items":{"type":"string","format":"binary"}},"mask":{"description":"An additional image whose fully transparent areas (e.g. where alpha is zero)\nindicate where `image` should be edited. If multiple images are provided, the\nmask is applied to the first image. Must be a valid PNG file, less than 4MB,\nand have the same dimensions as the first image.\n","type":"string","format":"binary"}},"required":["image"]}]},"ImagesEditsFormFields":{"type":"object","properties":{"prompt":{"description":"A text description of the desired image(s). The maximum length is 32000 characters.","type":"string","maxLength":32000},"model":{"type":"string"},"n":{"type":"integer","minimum":1,"maximum":10,"nullable":true,"description":"The number of images to generate. Must be between 1 and 10."},"size":{"description":"The size of the generated images. The standard sizes are `1024x1024`, `1536x1024`, and `1024x1536`; `auto` lets the model pick. GPT Image 2.5 models also accept arbitrary `WIDTHxHEIGHT` strings (both dimensions divisible by 16, aspect ratio between 1:3 and 3:1, max 3840x2160).\n","type":"string","nullable":true},"quality":{"description":"The quality of the generated images. GPT Image models support `low`, `medium`, and `high`; GPT Image 2.5 models additionally support `xhigh` and `max`. Defaults to `auto`.\n","type":"string","enum":["low","medium","high","xhigh","max","auto"],"nullable":true},"background":{"description":"The background of the generated image(s). `transparent` requires `output_format` png or webp. Defaults to `auto`.\n","type":"string","enum":["transparent","opaque","auto"],"nullable":true},"output_format":{"description":"The format of the generated images. Defaults to `png`.","type":"string","enum":["png","jpeg","webp"],"nullable":true},"output_compression":{"description":"The compression level (0-100%) for the generated images. Only applies to the `webp` and `jpeg` output formats. Defaults to 100.\n","type":"integer","minimum":0,"maximum":100,"nullable":true},"input_fidelity":{"description":"Control how much effort the model exerts to match the style and features, especially facial features, of input images. Defaults to `low`.\n","type":"string","enum":["low","high"],"nullable":true},"user":{"description":"A unique identifier representing your end-user, which can help to monitor and detect abuse.","type":"string"},"stream":{"description":"Edit the image in streaming mode. When true, the response is sent as server-sent events (`text/event-stream`): `image_edit.partial_image` events (see `partial_images`) followed by a final `image_edit.completed` event carrying the edited image and token usage. Defaults to false.\n","type":"boolean","nullable":true},"partial_images":{"description":"The number of partial images to generate in streaming mode, between 0 and 3. Only used when `stream` is true. When 0, the response is a single image sent in one streaming event. The final image may arrive before all partial images if it is generated more quickly.\n","type":"integer","minimum":0,"maximum":3,"nullable":true}},"required":["prompt","model"]},"ImagesResponseBody":{"type":"object","properties":{"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the images were created.\n"},"data":{"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string","description":"The base64-encoded JSON of the generated image. Always returned by GPT Image models,\notherwise returned if response_format is b64_json.\n"},"revised_prompt":{"type":"string","description":"The prompt that was used to generate the image, if there was any revision to the prompt.\n"},"url":{"type":"string","description":"The URL of the generated image, if response_format is url. Not returned by GPT Image models.\n"}}}},"background":{"type":"string","description":"The background setting of the generated images. Returned by GPT Image models."},"output_format":{"type":"string","description":"The output format of the generated images. Returned by GPT Image models."},"quality":{"type":"string","description":"The quality of the generated images. Returned by GPT Image models."},"size":{"type":"string","description":"The size of the generated images. Returned by GPT Image models."},"provider":{"type":"string","description":"The upstream provider that served the request (e.g. `vertex-ai`). Returned for some providers."},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"image_tokens":{"type":"integer"},"text_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}}}},"required":["created","data"]},"ImageEditStreamEvent":{"description":"Server-sent events returned when an image edit request runs with `stream: true`.\nZero to three `image_edit.partial_image` events are followed by a final\n`image_edit.completed` event carrying the edited image and token usage.\n","oneOf":[{"type":"object","required":["type","b64_json","created_at","size","quality","background","output_format","partial_image_index"],"properties":{"type":{"type":"string","enum":["image_edit.partial_image"],"description":"The type of the event. Always `image_edit.partial_image`."},"b64_json":{"type":"string","description":"Base64-encoded partial image data, suitable for rendering as an image."},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) when the event was created."},"size":{"type":"string","description":"The image dimensions as a `WIDTHxHEIGHT` string."},"quality":{"type":"string","enum":["low","medium","high","xhigh","max","auto"],"description":"The quality setting for the requested image."},"background":{"type":"string","enum":["transparent","opaque","auto"],"description":"The background setting for the requested image."},"output_format":{"type":"string","enum":["png","webp","jpeg"],"description":"The output format for the requested image."},"partial_image_index":{"type":"integer","description":"0-based index of the partial image."}}},{"type":"object","required":["type","b64_json","created_at","size","quality","background","output_format","usage"],"properties":{"type":{"type":"string","enum":["image_edit.completed"],"description":"The type of the event. Always `image_edit.completed`."},"b64_json":{"type":"string","description":"Base64-encoded final edited image data, suitable for rendering as an image."},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) when the event was created."},"size":{"type":"string","description":"The image dimensions as a `WIDTHxHEIGHT` string."},"quality":{"type":"string","enum":["low","medium","high","xhigh","max","auto"],"description":"The quality setting for the edited image."},"background":{"type":"string","enum":["transparent","opaque","auto"],"description":"The background setting for the edited image."},"output_format":{"type":"string","enum":["png","webp","jpeg"],"description":"The output format for the edited image."},"usage":{"type":"object","required":["total_tokens","input_tokens","output_tokens","input_tokens_details"],"properties":{"total_tokens":{"type":"integer","description":"The total number of tokens (images and text) used for the image edit."},"input_tokens":{"type":"integer","description":"The number of tokens (images and text) in the input prompt."},"output_tokens":{"type":"integer","description":"The number of image tokens in the output image."},"input_tokens_details":{"type":"object","required":["text_tokens","image_tokens"],"properties":{"text_tokens":{"type":"integer","description":"The number of text tokens in the input prompt."},"image_tokens":{"type":"integer","description":"The number of image tokens in the input prompt."}}},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}}}}}]}},"responses":{"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/images/edits":{"post":{"operationId":"post-images-edits-v1","summary":"Edit images","tags":["Images"],"description":"Edit or extend images based on image and text input, using GPT Image models.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImagesEditsRequest"}}}},"responses":{"200":{"description":"The edited image(s) — a JSON object, or a stream of events when `stream: true`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagesResponseBody"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/ImageEditStreamEvent"}}}},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```


# Embeddings

Create vector embeddings for input text.

## Create embeddings

> Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Embeddings","description":"Create vector embeddings for input text."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"EmbeddingsRequest":{"type":"object","properties":{"model":{"type":"string"},"input":{"description":"Input text to get embeddings for.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"integer"}},{"type":"array","items":{"type":"array","items":{"type":"integer"}}}]},"encoding_format":{"type":"string","description":"The format to return the embeddings in. Can be either float or base64.","enum":["float","base64"],"default":"float"},"dimensions":{"type":"integer","description":"The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.","minimum":1}},"required":["model","prompt"]}},"responses":{"EmbeddingsResponse":{"description":"Represents an embedding response returned by model, based on the provided input.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"list\""},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","description":"The object type, which is always \"embedding\""},"embedding":{"type":"array","items":{"type":"number","format":"float"},"description":"The embedding vector"},"index":{"type":"integer","description":"The index of the embedding in the list"}}}},"model":{"type":"string","description":"The model used for generating embeddings"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"The number of tokens used in the prompt"},"total_tokens":{"type":"integer","description":"The total number of tokens used"},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}}}}}}}},"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/embeddings":{"post":{"operationId":"post-embeddings-v1","summary":"Create embeddings","tags":["Embeddings"],"description":"Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/EmbeddingsResponse"},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```


# Rerank

Rerank documents by relevance to a query.

## Rerank documents

> Rerank documents by relevance to a query.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Rerank","description":"Rerank documents by relevance to a query."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"RerankRequest":{"type":"object","properties":{"model":{"type":"string","description":"Reranking model identifier."},"query":{"type":"string","description":"Query used to rank the documents."},"documents":{"type":"array","description":"Documents to rank by relevance to the query.","minItems":1,"items":{"oneOf":[{"type":"string"},{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Document text."}},"additionalProperties":true}]}},"top_n":{"type":"integer","description":"Maximum number of results to return.","minimum":1},"return_documents":{"type":"boolean","description":"Whether to include document text in the results.","default":false},"max_tokens_per_doc":{"type":"integer","description":"Maximum number of tokens per document. Supported by Cohere.","minimum":1},"priority":{"type":"integer","description":"Provider request-priority hint. Supported by Cohere."},"rank_fields":{"type":"array","description":"Object fields used for ranking. Supported by Pinecone.","items":{"type":"string"}},"truncation":{"type":"boolean","description":"Whether to truncate oversized documents. Supported by Voyage."},"parameters":{"type":"object","description":"Additional provider-specific parameters.","additionalProperties":true}},"required":["model","query","documents"]},"RerankResponseResultDocument":{"type":"object","description":"Returned document content and provider-specific metadata.","required":["text"],"properties":{"text":{"type":"string","description":"Document text."}},"additionalProperties":true},"RerankResponseMeta":{"type":"object","description":"Provider response metadata.","properties":{"billed_units":{"type":"object","description":"Units billed by the provider.","properties":{"search_units":{"type":"number","format":"double","description":"Search units billed for the request."}}},"api_version":{"type":"object","description":"API version reported by the provider.","additionalProperties":true}},"additionalProperties":true},"RerankResponseUsage":{"type":"object","description":"Provider-specific usage information.","properties":{"billed_units":{"type":"object","description":"Units billed by the provider, when reported at the top level.","properties":{"search_units":{"type":"number","format":"double","description":"Search units billed for the request."}}},"prompt_tokens":{"type":"integer","description":"The number of tokens used in the prompt"},"completion_tokens":{"type":"integer","description":"The number of completion tokens reported by the provider"},"total_tokens":{"type":"integer","description":"The total number of tokens used"},"prompt_tokens_details":{"type":"object","description":"Breakdown of the tokens used in the prompt","properties":{"cached_tokens":{"type":"integer","description":"The number of cached tokens in the prompt"},"cache_write_tokens":{"type":"integer","description":"The number of prompt tokens written to the cache"}}},"nexos_credits_cost":{"type":"number","format":"double","description":"Cost of the request in nexos credits."}},"additionalProperties":true}},"responses":{"RerankResponse":{"description":"Represents a reranking response returned by the selected model.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Request identifier."},"object":{"type":"string","description":"Response object type."},"model":{"type":"string","description":"The reranking model used."},"provider":{"type":"string","description":"Provider that handled the request."},"results":{"type":"array","description":"Documents sorted by relevance.","items":{"type":"object","properties":{"index":{"type":"integer","description":"Original index of the document."},"relevance_score":{"type":"number","format":"double","description":"Provider-dependent relevance score."},"document":{"$ref":"#/components/schemas/RerankResponseResultDocument"}}}},"meta":{"$ref":"#/components/schemas/RerankResponseMeta"},"usage":{"$ref":"#/components/schemas/RerankResponseUsage"}}}}}},"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/rerank":{"post":{"operationId":"post-rerank-v1","summary":"Rerank documents","tags":["Rerank"],"description":"Rerank documents by relevance to a query.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerankRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/RerankResponse"},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```


# Decisions

Get typed answers to questions about text and image inputs.

## Create a decision

> Get typed answers to questions about text and image inputs.\
> \
> \*\*Note:\*\* Currently supported only with \`GPT 6 Luna\` from the OpenAI provider.<br>

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Decisions","description":"Get typed answers to questions about text and image inputs."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"DecisionsRequest":{"type":"object","description":"Request for typed answers to questions about the input.","properties":{"model":{"type":"string","description":"Decision model identifier. Currently only `GPT 6 Luna` from the OpenAI provider is supported."},"input":{"description":"Text string or a list of user messages with text and inline base64 images.","oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/DecisionInputMessage"}}]},"questions":{"type":"array","description":"Questions to answer about the input.","minItems":1,"items":{"$ref":"#/components/schemas/DecisionQuestion"}}},"required":["model","input","questions"],"additionalProperties":true},"DecisionInputMessage":{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/DecisionInputContentPart"}}]}},"required":["role","content"]},"DecisionInputContentPart":{"type":"object","properties":{"type":{"type":"string","enum":["input_text","input_image"]},"text":{"type":"string","description":"Text content. Used with `input_text`."},"image_url":{"type":"string","description":"Inline base64 data URL. Used with `input_image`. Remote URLs are not supported."}},"required":["type"],"additionalProperties":true},"DecisionQuestion":{"oneOf":[{"$ref":"#/components/schemas/DecisionPredicateQuestion"},{"$ref":"#/components/schemas/DecisionChoiceQuestion"},{"$ref":"#/components/schemas/DecisionScoreQuestion"}],"discriminator":{"propertyName":"type","mapping":{"predicate":"#/components/schemas/DecisionPredicateQuestion","choice":"#/components/schemas/DecisionChoiceQuestion","score":"#/components/schemas/DecisionScoreQuestion"}}},"DecisionPredicateQuestion":{"type":"object","description":"Returns the probability that a condition is true.","properties":{"type":{"type":"string","enum":["predicate"]},"name":{"type":"string"},"instructions":{"type":"string"}},"required":["type","name","instructions"]},"DecisionChoiceQuestion":{"type":"object","description":"Returns one option plus probabilities for each option.","properties":{"type":{"type":"string","enum":["choice"]},"name":{"type":"string"},"instructions":{"type":"string"},"choices":{"type":"array","minItems":2,"items":{"type":"object","properties":{"value":{"type":"string"},"description":{"type":"string"}},"required":["value"]}}},"required":["type","name","instructions","choices"]},"DecisionScoreQuestion":{"type":"object","description":"Returns a weighted position on ordered levels.","properties":{"type":{"type":"string","enum":["score"]},"name":{"type":"string"},"instructions":{"type":"string"},"levels":{"type":"array","minItems":2,"items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"}},"required":["label"]}}},"required":["type","name","instructions","levels"]},"DecisionAnswer":{"type":"object","properties":{"type":{"type":"string","enum":["predicate","choice","score","refusal"]},"name":{"type":"string"},"probability":{"type":"number","description":"Probability that the condition is true. Predicate only."},"choice":{"type":"string","description":"Selected option value. Choice only."},"score":{"type":"number","description":"Weighted average position on the levels. Score only."},"confidence":{"type":"number","description":"Answer confidence. Choice and score only."},"probabilities":{"type":"array","description":"Probability per option or level. Choice and score only.","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"probability":{"type":"number"}},"additionalProperties":true}}},"required":["type","name"],"additionalProperties":true},"DecisionsUsage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}},"additionalProperties":true}},"responses":{"DecisionsResponse":{"description":"Typed answers to the requested questions.","content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"type":"array","items":{"$ref":"#/components/schemas/DecisionAnswer"}},"usage":{"$ref":"#/components/schemas/DecisionsUsage"}},"required":["answers"],"additionalProperties":true}}}},"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/decisions":{"post":{"operationId":"post-decisions-v1","summary":"Create a decision","tags":["Decisions"],"description":"Get typed answers to questions about text and image inputs.\n\n**Note:** Currently supported only with `GPT 6 Luna` from the OpenAI provider.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionsRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/DecisionsResponse"},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"422":{"description":"Upstream validation error."},"500":{"description":"Server error."}}}}}}
```


# System One

Evaluate typed questions with a System One model.

## Evaluate typed questions with System One

> Evaluate typed questions with a TypeSafe AI System One model.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"SystemOne","description":"Evaluate typed questions with a System One model."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"SystemOneRequest":{"type":"object","description":"TypeSafe AI System One evaluation request.","properties":{"model":{"type":"string"},"state":{"description":"State supplied to the evaluation.","oneOf":[{"type":"string"},{"type":"object","additionalProperties":true},{"type":"array","items":{"type":"string"}}]},"questions":{"type":"object","description":"Map of typed evaluation questions.","additionalProperties":true}},"required":["model","state","questions"],"additionalProperties":true},"SystemOneUsage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}},"additionalProperties":true}},"responses":{"SystemOneResponse":{"description":"TypeSafe AI System One evaluation response.","content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"answers":{"type":"object","additionalProperties":true},"usage":{"$ref":"#/components/schemas/SystemOneUsage"}},"required":["model","answers"],"additionalProperties":true}}}},"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/systemone":{"post":{"operationId":"post-systemone-v1","summary":"Evaluate typed questions with System One","tags":["SystemOne"],"description":"Evaluate typed questions with a TypeSafe AI System One model.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemOneRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/SystemOneResponse"},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"422":{"description":"Upstream validation error."},"500":{"description":"Server error."}}}}}}
```


# Storage

Upload and manage media files.

## List uploaded media files

> List uploaded files.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"FilePurposeType":{"type":"string","description":"The intended purpose of the file. Only \"batch\" is supported — uploaded files may only be used as input for the Batch API.","enum":["batch"]},"ListFilesResponse":{"type":"object","description":"A list of uploaded files.","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/file_FileResponse"}},"object":{"type":"string","enum":["list"]}},"required":["data"]},"file_FileResponse":{"type":"object","description":"The File object represents a document that has been uploaded to OpenAI.","properties":{"bytes":{"type":"integer","description":"The size of the file, in bytes."},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the file was created."},"filename":{"type":"string","description":"The name of the file."},"id":{"type":"string","description":"The file identifier, which can be referenced in the API endpoints."},"purpose":{"type":"string","description":"The intended purpose of the file.","enum":["assistants","assistants_output","batch","batch_output","fine-tune","fine-tune-results","vision"]},"status":{"type":"string","description":"The status of the file.","enum":["error","processed","uploaded"]},"object":{"type":"string","enum":["file"]}}}},"responses":{"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/storage":{"get":{"operationId":"get-storage-files-v1","summary":"List uploaded media files","tags":["Storage"],"description":"List uploaded files.","parameters":[{"name":"after","in":"query","description":"A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"A limit on the number of objects to be returned. Limit can range between 1 and 10,000, and the default is 10,000.","required":false,"schema":{"type":"integer","format":"uint32","default":10000}},{"name":"order","in":"query","description":"Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"purpose","in":"query","description":"Only return files with the given purpose.","required":false,"schema":{"$ref":"#/components/schemas/FilePurposeType"}}],"responses":{"200":{"description":"Successful response with list of files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFilesResponse"}}}},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```

## Upload media file

> Upload a media file for later use.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"upload_file_UploadFileRequest":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The File object (not file name) to be uploaded."},"purpose":{"$ref":"#/components/schemas/FilePurposeType"}},"required":["file","purpose"]},"FilePurposeType":{"type":"string","description":"The intended purpose of the file. Only \"batch\" is supported — uploaded files may only be used as input for the Batch API.","enum":["batch"]},"file_FileResponse":{"type":"object","description":"The File object represents a document that has been uploaded to OpenAI.","properties":{"bytes":{"type":"integer","description":"The size of the file, in bytes."},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the file was created."},"filename":{"type":"string","description":"The name of the file."},"id":{"type":"string","description":"The file identifier, which can be referenced in the API endpoints."},"purpose":{"type":"string","description":"The intended purpose of the file.","enum":["assistants","assistants_output","batch","batch_output","fine-tune","fine-tune-results","vision"]},"status":{"type":"string","description":"The status of the file.","enum":["error","processed","uploaded"]},"object":{"type":"string","enum":["file"]}}}},"responses":{"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/storage":{"post":{"operationId":"post-storage-files-v1","summary":"Upload media file","tags":["Storage"],"description":"Upload a media file for later use.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/upload_file_UploadFileRequest"}}}},"responses":{"200":{"description":"Successful response with file upload details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/file_FileResponse"}}}},"400":{"description":"Invalid request data."},"402":{"$ref":"#/components/responses/OutOfCredits"},"500":{"description":"Server error."}}}}}}
```

## Get storage file

> Retrieve file details by ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"file_FileResponse":{"type":"object","description":"The File object represents a document that has been uploaded to OpenAI.","properties":{"bytes":{"type":"integer","description":"The size of the file, in bytes."},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the file was created."},"filename":{"type":"string","description":"The name of the file."},"id":{"type":"string","description":"The file identifier, which can be referenced in the API endpoints."},"purpose":{"type":"string","description":"The intended purpose of the file.","enum":["assistants","assistants_output","batch","batch_output","fine-tune","fine-tune-results","vision"]},"status":{"type":"string","description":"The status of the file.","enum":["error","processed","uploaded"]},"object":{"type":"string","enum":["file"]}}}},"responses":{"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/storage/{file_id}":{"get":{"operationId":"get-storage-file-v1","summary":"Get storage file","tags":["Storage"],"description":"Retrieve file details by ID.","parameters":[{"name":"file_id","description":"The ID of the file to use for this request.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response with file details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/file_FileResponse"}}}},"402":{"$ref":"#/components/responses/OutOfCredits"},"404":{"description":"File not found."},"500":{"description":"Server error."}}}}}}
```

## Delete storage file

> Delete a file by ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"deletion_status_DeletionStatusResponse":{"type":"object","description":"The status of a file deletion.","properties":{"id":{"type":"string","description":"The file identifier."},"deleted":{"type":"boolean","description":"Indicates whether the file has been deleted."}},"required":["id","deleted"]}},"responses":{"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/storage/{file_id}":{"delete":{"operationId":"delete-storage-file-v1","summary":"Delete storage file","tags":["Storage"],"description":"Delete a file by ID.","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response with deletion status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/deletion_status_DeletionStatusResponse"}}}},"402":{"$ref":"#/components/responses/OutOfCredits"},"404":{"description":"File not found."},"500":{"description":"Server error."}}}}}}
```

## Get storage file contents

> Download file contents by ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Storage","description":"Upload and manage media files."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"OutOfCredits":{"description":"The company has run out of AI credits. Returned when the company's budget limit has been reached.\n","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}}}}},"paths":{"/v1/storage/{file_id}/content":{"get":{"operationId":"get-storage-file-contents-v1","summary":"Get storage file contents","tags":["Storage"],"description":"Download file contents by ID.","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response with file contents","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"402":{"$ref":"#/components/responses/OutOfCredits"},"404":{"description":"File not found."},"500":{"description":"Server error."}}}}}}
```


# Models

List available models.

## List models

> List all models available to the user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"UserModelsResponse":{"description":"A list of models available to use for the current user.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserModel"}},"total":{"type":"integer"}},"required":["object","data","total"]}}}}},"schemas":{"UserModel":{"type":"object","properties":{"id":{"type":"string","description":"The model identifier, which can be referenced in the API endpoints. This is the model's display name as shown in the console; matching in the `model` request field is case-insensitive but otherwise exact.\n"},"nexos_model_id":{"type":"string","description":"Internal model identifier, which also can be referenced in the API endpoints."},"object":{"type":"string","description":"The object type, which is always \"model\"."},"created":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was created."},"updated":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was updated."},"owned_by":{"type":"string","description":"The organization that owns the model."},"developer":{"type":"string","description":"Company that developed the model."},"data_retention_period_days":{"type":"integer","format":"int32","minimum":0,"nullable":true,"description":"Number of days the provider retains request and response data. Null when the provider has no retention policy configured.\n"},"is_used_for_training":{"type":"boolean","description":"Whether the provider uses request and response data to train its models."},"name":{"type":"string","description":"Model name","deprecated":true},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout (milliseconds)"},"stream_timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout when streaming is enabled (milliseconds)"},"max_tokens":{"type":"integer","format":"int32","minimum":1,"description":"Maximum number of tokens the model can generate in a single request."},"context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"deprecated":true,"description":"Deprecated alias for max_context_length, always equal to it. Use max_context_length instead. Null when the model's context window is unknown."},"max_context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"description":"The model's total context window, in tokens. Independent of max_tokens and max_input_tokens. Null when the model's context window is unknown."},"min_cache_context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"description":"Smallest prompt the provider will cache, in tokens. This is a caching floor, not a floor on accepted input. Null when the provider documents no floor."},"retirement_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true,"description":"Model retirement date. Null when no retirement date has been announced."},"health":{"$ref":"#/components/schemas/ModelHealth"},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"endpoints":{"$ref":"#/components/schemas/Endpoints"},"input_modalities":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Input types the model accepts. The list is non-exhaustive: values seen so far are `text`, `image`, `audio`, `video`, `pdf`, `vision`, `assistant_prefill` and `embedding_image`, and consumers must tolerate values not listed here. Only types the model is known to accept appear, so a type missing from the list is not necessarily unsupported. `null` means no input type is known for this model; an empty list means the model is known to accept none of them."},"output_modalities":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Output types the model produces. The list is non-exhaustive: values seen so far are `text`, `image` and `audio`, and consumers must tolerate values not listed here. Only types the model is known to produce appear, so a type missing from the list is not necessarily unsupported. `null` means no output type is known for this model; an empty list means the model is known to produce none of them."},"supports_tools":{"type":"boolean","nullable":true,"description":"Whether the model supports function / tool calling. `null` means the capability is unknown, which is not the same as `false`."},"supports_structured_outputs":{"type":"boolean","nullable":true,"description":"Whether the model supports schema-constrained JSON output. `null` means the capability is unknown, which is not the same as `false`."},"supports_streaming":{"type":"boolean","nullable":true,"description":"Whether the model supports streaming responses. `null` means the capability is unknown, which is not the same as `false`."},"supports_reasoning":{"type":"boolean","nullable":true,"description":"Whether the model supports reasoning. `null` means the capability is unknown, which is not the same as `false`."},"region":{"$ref":"#/components/schemas/ModelRegion"},"provider":{"type":"string","description":"Provider hosting the model. Falls back to the provider identifier when the hosting provider is not set."},"icon_url":{"type":"string","description":"URL of the provider icon."},"capabilities":{"description":"Advanced request parameters supported by the model.","allOf":[{"$ref":"#/components/schemas/Capabilities"}]},"features":{"description":"Public features supported by the model.","allOf":[{"$ref":"#/components/schemas/PublicModelFeatures"}]},"latency":{"$ref":"#/components/schemas/ModelLatency"}},"required":["id","object","created","updated","name","owned_by","data_retention_period_days","is_used_for_training","retirement_date","latency","health"]},"ModelHealth":{"type":"object","nullable":true,"description":"Availability of the model, derived from a rolling 7-day window of gateway requests. Null when no signal has been collected yet, which is not the same as `down`.","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/ModelHealthStatus"},"uptime":{"type":"number","format":"float","nullable":true,"description":"Percentage of requests that succeeded over the rolling 7-day window. Null when the window holds too few requests to judge.\n"},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"When the health figures were last computed."}}},"ModelHealthStatus":{"type":"string","description":"Current availability of the model, derived from a rolling 7-day window of gateway requests. Always present within a `health` object; an absent `health` means no signal has been collected yet, which is not the same as `down`.\n","enum":["operational","degraded","down"]},"ModelPricing":{"properties":{"input_cost_per_token":{"type":"string"},"output_cost_per_token":{"type":"string"},"input_cost_per_second":{"type":"string"},"output_cost_per_second":{"type":"string"},"cache_write_cost_per_token":{"type":"string"},"cache_write_cost_per_token_1h_ttl":{"type":"string"},"cache_read_cost_per_token":{"type":"string"},"output_cost_first_megapixel":{"type":"string","description":"USD for the first output megapixel of an image generation request. A megapixel is 1024x1024. Billable megapixels are rounded up with a minimum of one, matching the vendor invoice.\n"},"output_cost_per_additional_megapixel":{"type":"string","description":"USD for each output megapixel beyond the first, on models priced by output resolution. Only meaningful together with output_cost_first_megapixel.\n"},"input_cost_per_reference_megapixel":{"type":"string","description":"USD per megapixel of reference image supplied as input.\n"},"max_billable_megapixel":{"type":"string","description":"Upper bound, in megapixels, on the billable area of a single image generation request. A request larger than this is billed at the cap.\n"}},"type":"object","title":"Model Pricing"},"Endpoints":{"type":"array","items":{"type":"string","description":"Array of endpoints supported by model","enum":["chat_completion","messages","completion","responses","realtime","assistants","batches","fine_tuning","embeddings","image_generation","image_edit","speech_generation","transcription","translation","moderation"]}},"ModelRegion":{"type":"string","description":"Region the model is hosted in, as configured on the base model.","enum":["EU","US","UK","CA","APAC","LATAM","MENA","AUNZ","EEA_CH_UK","OTHER"]},"Capabilities":{"type":"array","items":{"type":"string","enum":["prompt_caching","prompt_cache_key","safety_identifier","response_schema","system_messages","tool_choice","agentic_tool_calling_loops"]}},"PublicModelFeatures":{"type":"array","items":{"type":"string","enum":["streaming","structured_output","reasoning","thinking","extended_thinking"]}},"ModelLatency":{"type":"object","nullable":true,"description":"Latency figures observed for the model over the last 24 hours of gateway requests. Null when the window held too few requests to compute any of them.","properties":{"ttft_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median time to first token, in milliseconds. For a non-streaming request the total duration stands in for it. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"ttft_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile time to first token, in milliseconds. For a non-streaming request the total duration stands in for it. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"e2e_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median end-to-end request duration, in milliseconds. Measured at the gateway, so it includes gateway overhead. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"e2e_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile end-to-end request duration, in milliseconds. Measured at the gateway, so it includes gateway overhead. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"time_per_output_token_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median time per output token, in milliseconds. Lower is faster. Only streaming requests that produced output tokens count, so it is null when the window holds too few of them, or while the figure is temporarily unavailable."},"time_per_output_token_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile time per output token, in milliseconds. Lower is faster. Only streaming requests that produced output tokens count, so it is null when the window holds too few of them, or while the figure is temporarily unavailable."},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"End of the window the figures were computed over."}},"required":["ttft_p50_ms","ttft_p95_ms","e2e_p50_ms","e2e_p95_ms","time_per_output_token_p50_ms","time_per_output_token_p95_ms","updated_at"]}}},"paths":{"/v1/models":{"get":{"operationId":"get-user-models-v1","summary":"List models","description":"List all models available to the user.","tags":["Models"],"responses":{"200":{"$ref":"#/components/responses/UserModelsResponse"},"404":{"description":"User not found."}}}}}}
```

## List all models

> List all models including ones not available for the current user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"AllModelsResponse":{"description":"A list all models including ones not available for the current user.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/GlobalModel"}}},"required":["object","data"]}}}}},"schemas":{"GlobalModel":{"type":"object","properties":{"id":{"type":"string","description":"Internal model identifier, which also can be referenced in the API endpoints."},"object":{"type":"string","description":"The object type, which is always \"global_model\"."},"created":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was created."},"updated":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was updated."},"owned_by":{"type":"string","description":"The organization that owns the model."},"name":{"type":"string","description":"Model name"},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout (milliseconds)"},"stream_timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout when streaming is enabled (milliseconds)"},"max_tokens":{"type":"integer","format":"int32","minimum":1,"description":"Maximum number of tokens the model can generate in a single request."},"context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"deprecated":true,"description":"Deprecated alias for max_context_length, always equal to it. Use max_context_length instead. Null when the model's context window is unknown."},"max_context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"description":"The model's total context window, in tokens. Independent of max_tokens and max_input_tokens. Null when the model's context window is unknown."},"min_cache_context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"description":"Smallest prompt the provider will cache, in tokens. This is a caching floor, not a floor on accepted input. Null when the provider documents no floor."},"retirement_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true,"description":"Model retirement date. Null when no retirement date has been announced."},"health":{"$ref":"#/components/schemas/ModelHealth"},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"endpoints":{"$ref":"#/components/schemas/Endpoints"},"input_modalities":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Input types the model accepts. The list is non-exhaustive: values seen so far are `text`, `image`, `audio`, `video`, `pdf`, `vision`, `assistant_prefill` and `embedding_image`, and consumers must tolerate values not listed here. Only types the model is known to accept appear, so a type missing from the list is not necessarily unsupported. `null` means no input type is known for this model; an empty list means the model is known to accept none of them."},"output_modalities":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Output types the model produces. The list is non-exhaustive: values seen so far are `text`, `image` and `audio`, and consumers must tolerate values not listed here. Only types the model is known to produce appear, so a type missing from the list is not necessarily unsupported. `null` means no output type is known for this model; an empty list means the model is known to produce none of them."},"supports_tools":{"type":"boolean","nullable":true,"description":"Whether the model supports function / tool calling. `null` means the capability is unknown, which is not the same as `false`."},"supports_structured_outputs":{"type":"boolean","nullable":true,"description":"Whether the model supports schema-constrained JSON output. `null` means the capability is unknown, which is not the same as `false`."},"supports_streaming":{"type":"boolean","nullable":true,"description":"Whether the model supports streaming responses. `null` means the capability is unknown, which is not the same as `false`."},"supports_reasoning":{"type":"boolean","nullable":true,"description":"Whether the model supports reasoning. `null` means the capability is unknown, which is not the same as `false`."},"region":{"$ref":"#/components/schemas/ModelRegion"},"developer":{"type":"string","description":"Company that developed the model."},"data_retention_period_days":{"type":"integer","format":"int32","minimum":0,"nullable":true,"description":"Number of days the provider retains request and response data. Null when the provider has no retention policy configured.\n"},"is_used_for_training":{"type":"boolean","description":"Whether the provider uses request and response data to train its models."},"available":{"type":"boolean","description":"If true, model is already assigned to user's team."},"provider":{"type":"string","description":"Provider hosting the model. Falls back to the provider identifier when the hosting provider is not set."},"icon_url":{"type":"string","description":"URL of the provider icon."},"capabilities":{"description":"Advanced request parameters supported by the model.","allOf":[{"$ref":"#/components/schemas/Capabilities"}]},"features":{"description":"Public features supported by the model.","allOf":[{"$ref":"#/components/schemas/PublicModelFeatures"}]},"latency":{"$ref":"#/components/schemas/ModelLatency"}},"required":["id","object","created","updated","name","owned_by","available","region","data_retention_period_days","is_used_for_training","retirement_date","latency","health"]},"ModelHealth":{"type":"object","nullable":true,"description":"Availability of the model, derived from a rolling 7-day window of gateway requests. Null when no signal has been collected yet, which is not the same as `down`.","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/ModelHealthStatus"},"uptime":{"type":"number","format":"float","nullable":true,"description":"Percentage of requests that succeeded over the rolling 7-day window. Null when the window holds too few requests to judge.\n"},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"When the health figures were last computed."}}},"ModelHealthStatus":{"type":"string","description":"Current availability of the model, derived from a rolling 7-day window of gateway requests. Always present within a `health` object; an absent `health` means no signal has been collected yet, which is not the same as `down`.\n","enum":["operational","degraded","down"]},"ModelPricing":{"properties":{"input_cost_per_token":{"type":"string"},"output_cost_per_token":{"type":"string"},"input_cost_per_second":{"type":"string"},"output_cost_per_second":{"type":"string"},"cache_write_cost_per_token":{"type":"string"},"cache_write_cost_per_token_1h_ttl":{"type":"string"},"cache_read_cost_per_token":{"type":"string"},"output_cost_first_megapixel":{"type":"string","description":"USD for the first output megapixel of an image generation request. A megapixel is 1024x1024. Billable megapixels are rounded up with a minimum of one, matching the vendor invoice.\n"},"output_cost_per_additional_megapixel":{"type":"string","description":"USD for each output megapixel beyond the first, on models priced by output resolution. Only meaningful together with output_cost_first_megapixel.\n"},"input_cost_per_reference_megapixel":{"type":"string","description":"USD per megapixel of reference image supplied as input.\n"},"max_billable_megapixel":{"type":"string","description":"Upper bound, in megapixels, on the billable area of a single image generation request. A request larger than this is billed at the cap.\n"}},"type":"object","title":"Model Pricing"},"Endpoints":{"type":"array","items":{"type":"string","description":"Array of endpoints supported by model","enum":["chat_completion","messages","completion","responses","realtime","assistants","batches","fine_tuning","embeddings","image_generation","image_edit","speech_generation","transcription","translation","moderation"]}},"ModelRegion":{"type":"string","description":"Region the model is hosted in, as configured on the base model.","enum":["EU","US","UK","CA","APAC","LATAM","MENA","AUNZ","EEA_CH_UK","OTHER"]},"Capabilities":{"type":"array","items":{"type":"string","enum":["prompt_caching","prompt_cache_key","safety_identifier","response_schema","system_messages","tool_choice","agentic_tool_calling_loops"]}},"PublicModelFeatures":{"type":"array","items":{"type":"string","enum":["streaming","structured_output","reasoning","thinking","extended_thinking"]}},"ModelLatency":{"type":"object","nullable":true,"description":"Latency figures observed for the model over the last 24 hours of gateway requests. Null when the window held too few requests to compute any of them.","properties":{"ttft_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median time to first token, in milliseconds. For a non-streaming request the total duration stands in for it. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"ttft_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile time to first token, in milliseconds. For a non-streaming request the total duration stands in for it. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"e2e_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median end-to-end request duration, in milliseconds. Measured at the gateway, so it includes gateway overhead. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"e2e_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile end-to-end request duration, in milliseconds. Measured at the gateway, so it includes gateway overhead. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"time_per_output_token_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median time per output token, in milliseconds. Lower is faster. Only streaming requests that produced output tokens count, so it is null when the window holds too few of them, or while the figure is temporarily unavailable."},"time_per_output_token_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile time per output token, in milliseconds. Lower is faster. Only streaming requests that produced output tokens count, so it is null when the window holds too few of them, or while the figure is temporarily unavailable."},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"End of the window the figures were computed over."}},"required":["ttft_p50_ms","ttft_p95_ms","e2e_p50_ms","e2e_p95_ms","time_per_output_token_p50_ms","time_per_output_token_p95_ms","updated_at"]}}},"paths":{"/v1/models/all":{"get":{"operationId":"get-all-models-v1","summary":"List all models","description":"List all models including ones not available for the current user.","tags":["Models"],"responses":{"200":{"$ref":"#/components/responses/AllModelsResponse"},"404":{"description":"User not found."}}}}}}
```

## Get fallbacks configuration for particular model

> Fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"ModelFallbacksConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the model"},"fallback_ids":{"$ref":"#/components/schemas/ModelFallbacks"},"created_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was last updated."}},"required":["id"]},"ModelFallbacks":{"type":"array","items":{"type":"string","format":"uuid","description":"The ID of the model to associate with the company."}}}},"paths":{"/v1/management/models/{model}/fallbacks":{"get":{"operationId":"get-model-fallbacks-v1","summary":"Get fallbacks configuration for particular model","description":"Fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"responses":{"200":{"description":"Model fallbacks configuration found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksConfiguration"}}}},"400":{"description":"Invalid request."}}}}}}
```

## Add fallbacks configuration for particular model

> Add fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"ModelFallbacksRequest":{"type":"object","properties":{"models":{"$ref":"#/components/schemas/ModelFallbacks"}},"required":["models"]},"ModelFallbacks":{"type":"array","items":{"type":"string","format":"uuid","description":"The ID of the model to associate with the company."}},"ModelFallbacksConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the model"},"fallback_ids":{"$ref":"#/components/schemas/ModelFallbacks"},"created_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was last updated."}},"required":["id"]}}},"paths":{"/v1/management/models/{model}/fallbacks":{"post":{"operationId":"post-model-fallbacks-v1","summary":"Add fallbacks configuration for particular model","description":"Add fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksRequest"}}}},"responses":{"201":{"description":"Model fallbacks configuration successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksConfiguration"}}}},"400":{"description":"Invalid request or fallback configurations already associated with the model."},"404":{"description":"Model not found."}}}}}}
```

## Delete model fallbacks configuration

> Delete model fallbacks configuration

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}}},"paths":{"/v1/management/models/{model}/fallbacks":{"delete":{"operationId":"delete-model-fallbacks-v1","summary":"Delete model fallbacks configuration","description":"Delete model fallbacks configuration","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"responses":{"204":{"description":"Model fallbacks configuration deleted successfully"},"400":{"description":"Invalid request."}}}}}}
```

## Update fallbacks configuration for particular model

> Update the fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"ModelFallbacksRequest":{"type":"object","properties":{"models":{"$ref":"#/components/schemas/ModelFallbacks"}},"required":["models"]},"ModelFallbacks":{"type":"array","items":{"type":"string","format":"uuid","description":"The ID of the model to associate with the company."}},"ModelFallbacksConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the model"},"fallback_ids":{"$ref":"#/components/schemas/ModelFallbacks"},"created_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was last updated."}},"required":["id"]}}},"paths":{"/v1/management/models/{model}/fallbacks":{"patch":{"operationId":"update-model-fallbacks-v1","summary":"Update fallbacks configuration for particular model","description":"Update the fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksRequest"}}}},"responses":{"200":{"description":"Model fallbacks configuration successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksConfiguration"}}}},"400":{"description":"Invalid request."}}}}}}
```


# Team Management

Manage teams, API keys, and models.

## List teams

> Returns the caller's team, or all teams in the company when the caller is an owner.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"TeamListResponse":{"description":"A list of teams.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Team"}},"total":{"type":"integer"}}}}}},"PermissionDenied":{"description":"Permission denied."}},"schemas":{"Team":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the team."},"name":{"type":"string","description":"The name of the team."},"created_at":{"type":"string","format":"date-time","description":"The time the team was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the team was last updated."},"default_model_id":{"type":"string","description":"Default model to be used for team."},"is_default_team":{"type":"boolean","description":"Default team is created after creating a company. Default team cannot be removed by user."}},"required":["id","name"]}}},"paths":{"/v1/teams":{"get":{"operationId":"list-teams-v1","tags":["Team Management"],"summary":"List teams","description":"Returns the caller's team, or all teams in the company when the caller is an owner.","responses":{"200":{"$ref":"#/components/responses/TeamListResponse"},"403":{"$ref":"#/components/responses/PermissionDenied"}}}}}}
```

## Create a team

> Create a new team in the caller's company. Only owners can create teams.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"TeamRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team."}},"required":["name"]},"Team":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the team."},"name":{"type":"string","description":"The name of the team."},"created_at":{"type":"string","format":"date-time","description":"The time the team was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the team was last updated."},"default_model_id":{"type":"string","description":"Default model to be used for team."},"is_default_team":{"type":"boolean","description":"Default team is created after creating a company. Default team cannot be removed by user."}},"required":["id","name"]}},"responses":{"PermissionDenied":{"description":"Permission denied."}}},"paths":{"/v1/teams":{"post":{"operationId":"create-team-v1","tags":["Team Management"],"summary":"Create a team","description":"Create a new team in the caller's company. Only owners can create teams.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRequest"}}}},"responses":{"201":{"description":"Team created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"400":{"description":"Invalid request data."},"403":{"$ref":"#/components/responses/PermissionDenied"},"409":{"description":"Team with the provided name already exists."}}}}}}
```

## Get a team

> Retrieve a team by ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"Team":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the team."},"name":{"type":"string","description":"The name of the team."},"created_at":{"type":"string","format":"date-time","description":"The time the team was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the team was last updated."},"default_model_id":{"type":"string","description":"Default model to be used for team."},"is_default_team":{"type":"boolean","description":"Default team is created after creating a company. Default team cannot be removed by user."}},"required":["id","name"]}},"responses":{"PermissionDenied":{"description":"Permission denied."}}},"paths":{"/v1/teams/{teamId}":{"get":{"operationId":"get-team-v1","tags":["Team Management"],"summary":"Get a team","description":"Retrieve a team by ID.","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}}],"responses":{"200":{"description":"Team details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"Team not found."}}}}}}
```

## Delete a team

> Remove a team by ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"PermissionDenied":{"description":"Permission denied."}}},"paths":{"/v1/teams/{teamId}":{"delete":{"operationId":"delete-team-v1","tags":["Team Management"],"summary":"Delete a team","description":"Remove a team by ID.","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}},{"name":"fallback_team_id","in":"query","required":false,"description":"The ID of the team to transfer users to if the team being deleted has associated users. This parameter is required if the team has users; otherwise, it is ignored. A team_owner caller cannot supply this parameter and receives a 403 if they do.","schema":{"type":"string"}}],"responses":{"204":{"description":"Team deleted."},"400":{"description":"Invalid request data. Returned when the team still has members and no fallback team is provided, or when the provided fallback team belongs to a different company."},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"Team not found."},"409":{"description":"Team with API keys cannot be deleted."}}}}}}
```

## Update a team

> Partially update details of an existing team.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"UpdateTeamRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the team."},"default_model_id":{"type":"string","description":"Default model to be used for team."}}},"Team":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the team."},"name":{"type":"string","description":"The name of the team."},"created_at":{"type":"string","format":"date-time","description":"The time the team was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the team was last updated."},"default_model_id":{"type":"string","description":"Default model to be used for team."},"is_default_team":{"type":"boolean","description":"Default team is created after creating a company. Default team cannot be removed by user."}},"required":["id","name"]}},"responses":{"PermissionDenied":{"description":"Permission denied."}}},"paths":{"/v1/teams/{teamId}":{"patch":{"operationId":"update-team-v1","tags":["Team Management"],"summary":"Update a team","description":"Partially update details of an existing team.","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamRequest"}}}},"responses":{"200":{"description":"Team updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Team"}}}},"400":{"description":"Invalid request data."},"403":{"$ref":"#/components/responses/PermissionDenied"},"404":{"description":"Team not found, or the default model was not found."},"409":{"description":"Team with the provided name already exists."}}}}}}
```

## List team API keys

> Return all API keys that belong to the team.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/teams/{teamId}/api_keys":{"get":{"operationId":"list-team-api-keys-v1","tags":["Team Management"],"summary":"List team API keys","description":"Return all API keys that belong to the team.","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of team API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKey"}}}}}}}}}}
```

## Create team API key

> Create a new API key for the team.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"APIKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key (needs to be unique).","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled. Only applicable when updating a key."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires. Null means no expiration."}},"required":["name"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}},"responses":{"TeamAPIKeyResponse":{"description":"Team API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}}},"paths":{"/v1/teams/{teamId}/api_keys":{"post":{"operationId":"create-team-api-key-v1","tags":["Team Management"],"summary":"Create team API key","description":"Create a new API key for the team.","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/TeamAPIKeyResponse"}}}}}}
```

## Update many team API keys

> Update multiple team API keys in a single request.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"APIKeyBulkUpdateRequest":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyBulkUpdateItem"},"maxItems":100}},"required":["items"]},"APIKeyBulkUpdateItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the key to update."},"name":{"type":"string","description":"The name of the key.","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires."},"remove":{"type":"boolean","description":"If you want to remove api key, set this to true - other cases skip."}},"required":["id"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/teams/{teamId}/api_keys/bulk":{"post":{"operationId":"update-many-team-api-keys-v1","tags":["Team Management"],"summary":"Update many team API keys","description":"Update multiple team API keys in a single request.","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyBulkUpdateRequest"}}}},"responses":{"200":{"description":"Updated API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKey"}}}}}}}}}}
```

## Delete team API key

> Permanently delete a team API key.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}}},"paths":{"/v1/teams/{teamId}/api_keys/{keyId}":{"delete":{"operationId":"delete-team-api-key-v1","tags":["Team Management"],"summary":"Delete team API key","description":"Permanently delete a team API key.","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"responses":{"204":{"description":"API key deleted successfully."},"400":{"description":"Bad request"},"404":{"description":"Team/Key not found."}}}}}}
```

## Update team API key

> Update a team API key.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"APIKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key (needs to be unique).","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled. Only applicable when updating a key."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires. Null means no expiration."}},"required":["name"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}},"responses":{"TeamAPIKeyResponse":{"description":"Team API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}}},"paths":{"/v1/teams/{teamId}/api_keys/{keyId}":{"patch":{"operationId":"update-team-api-key-v1","tags":["Team Management"],"summary":"Update team API key","description":"Update a team API key.","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/TeamAPIKeyResponse"},"400":{"description":"Invalid request."},"404":{"description":"Team/Key not found."}}}}}}
```

## Regenerate team API key

> Regenerate the value of a team API key.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"TeamAPIKeyResponse":{"description":"Team API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/teams/{teamId}/api_keys/{keyId}/regenerate":{"patch":{"operationId":"regenerate-team-api-key-v1","deprecated":true,"tags":["Team Management"],"summary":"Regenerate team API key","description":"Regenerate the value of a team API key.","parameters":[{"name":"teamId","in":"path","required":true,"description":"The ID of the team.","schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/TeamAPIKeyResponse"},"400":{"description":"Invalid request."},"404":{"description":"Team/Key not found."}}}}}}
```

## Rotate API key

> Rotates the API key used to authenticate this request. Returns a new key value.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Team Management","description":"Manage teams, API keys, and models."},{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"RotateAPIKeyResponse":{"description":"Rotated API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/apikey/rotate":{"patch":{"operationId":"rotate-api-key-v1","tags":["Team Management","User Management"],"summary":"Rotate API key","description":"Rotates the API key used to authenticate this request. Returns a new key value.","responses":{"200":{"$ref":"#/components/responses/RotateAPIKeyResponse"},"401":{"description":"Unauthorized — request not authenticated via API key."},"500":{"description":"Internal server error."}}}}}}
```


# User Management

Manage user API keys.

## List user API keys

> Return all API keys that belong to the current user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/user/api_keys":{"get":{"operationId":"list-user-api-keys-v1","tags":["User Management"],"summary":"List user API keys","description":"Return all API keys that belong to the current user.","responses":{"200":{"description":"List of user API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKey"}}}}}}}}}}
```

## Create user API key

> Create a new API key for the current user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"APIKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key (needs to be unique).","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled. Only applicable when updating a key."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires. Null means no expiration."}},"required":["name"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}},"responses":{"UserAPIKeyResponse":{"description":"User API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}}},"paths":{"/v1/user/api_keys":{"post":{"operationId":"create-user-api-key-v1","tags":["User Management"],"summary":"Create user API key","description":"Create a new API key for the current user.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}}},"responses":{"201":{"$ref":"#/components/responses/UserAPIKeyResponse"}}}}}}
```

## Update many user API keys

> Update multiple user API keys in a single request.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"APIKeyBulkUpdateRequest":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyBulkUpdateItem"},"maxItems":100}},"required":["items"]},"APIKeyBulkUpdateItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The UUID of the key to update."},"name":{"type":"string","description":"The name of the key.","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires."},"remove":{"type":"boolean","description":"If you want to remove api key, set this to true - other cases skip."}},"required":["id"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/user/api_keys/bulk":{"post":{"operationId":"update-many-user-api-keys-v1","tags":["User Management"],"summary":"Update many user API keys","description":"Update multiple user API keys in a single request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyBulkUpdateRequest"}}}},"responses":{"200":{"description":"Updated API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKey"}}}}}}}}}}
```

## Delete user API key

> Permanently delete a user API key.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}}},"paths":{"/v1/user/api_keys/{keyId}":{"delete":{"operationId":"delete-user-api-key-v1","tags":["User Management"],"summary":"Delete user API key","description":"Permanently delete a user API key.","parameters":[{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"responses":{"204":{"description":"API key deleted successfully."},"400":{"description":"Bad request"},"404":{"description":"User/Key not found."}}}}}}
```

## Update user API key

> Update a user API key.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"APIKeyRequest":{"type":"object","properties":{"name":{"type":"string","description":"The name of the key (needs to be unique).","minLength":1,"maxLength":255},"enabled":{"type":"boolean","description":"Whether the API key is enabled. Only applicable when updating a key."},"expiration_date":{"type":"string","format":"date-time","nullable":true,"description":"The date when the key expires. Null means no expiration."}},"required":["name"]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}},"responses":{"UserAPIKeyResponse":{"description":"User API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}}},"paths":{"/v1/user/api_keys/{keyId}":{"patch":{"operationId":"update-user-api-key-v1","tags":["User Management"],"summary":"Update user API key","description":"Update a user API key.","parameters":[{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/UserAPIKeyResponse"},"400":{"description":"Invalid request."},"404":{"description":"User/Key not found."}}}}}}
```

## Regenerate user API key

> Regenerate the value of a user API key.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"User Management","description":"Manage user API keys."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"UserAPIKeyResponse":{"description":"User API Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKey"}}}}},"schemas":{"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/user/api_keys/{keyId}/regenerate":{"patch":{"operationId":"regenerate-user-api-key-v1","deprecated":true,"tags":["User Management"],"summary":"Regenerate user API key","description":"Regenerate the value of a user API key.","parameters":[{"name":"keyId","in":"path","required":true,"description":"The ID of the key.","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/UserAPIKeyResponse"},"400":{"description":"Invalid request."},"404":{"description":"User/Key not found."}}}}}}
```


# Agent Management

Manage agents.

## List agents for a specific user

> Retrieve list of agents for a specific user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Agent Management","description":"Manage agents."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"AgentSortByField":{"type":"string","enum":["name","created_at"]},"AgentSortOrder":{"type":"string","enum":["asc","desc"],"description":"Sort order, must be used together with sort_by.field."},"Agent":{"description":"Represents an AI agent.","type":"object","properties":{"id":{"type":"string","description":"Unique identifier."},"name":{"type":"string","description":"Agent name."},"description":{"type":"string","description":"Agent description.","nullable":true},"instructions":{"type":"string","description":"Agent instructions."},"model":{"type":"string","description":"Model name."},"created_at":{"type":"string","format":"date-time","description":"The time the agent was created."}},"required":["id","created_at","name","model"]}},"responses":{"AgentListResponse":{"description":"A list of agents.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}},"total":{"type":"integer","format":"int64"}}}}}}}},"paths":{"/v1/agents":{"get":{"operationId":"get-agents-v1","summary":"List agents for a specific user","tags":["Agent Management"],"description":"Retrieve list of agents for a specific user.","parameters":[{"name":"limit","in":"query","required":false,"description":"The number of items to return.","schema":{"type":"integer","format":"int64","default":100,"minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"description":"The number of items to skip.","schema":{"type":"integer","format":"int64"}},{"name":"sort_by.field","in":"query","schema":{"$ref":"#/components/schemas/AgentSortByField"},"description":"Field to sort by, must be used together with sort_by.order."},{"name":"sort_by.order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AgentSortOrder"},"description":"Sort order, must be used together with sort_by.field."},{"name":"include_shared","in":"query","required":false,"description":"Whether to include agents shared with the user.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"$ref":"#/components/responses/AgentListResponse"},"404":{"description":"Agent not found."}}}}}}
```


# Assistant Management

Manage assistants.

## List assistants for a specific user. Deprecated, use /v1/agents instead.

> Deprecated: Use /v1/agents instead. Retrieve list of assistants for a specific user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Assistant Management","description":"Manage assistants."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"SortByField":{"type":"string","enum":["name","created_at"]},"SortOrder":{"type":"string","enum":["asc","desc"],"description":"Sort order, must be used together with sort_by.field."},"Assistant":{"description":"Represents an AI assistant.","type":"object","properties":{"id":{"type":"string","description":"Unique identifier."},"name":{"type":"string","description":"Assistant name."},"description":{"type":"string","description":"Assistant description.","nullable":true},"instructions":{"type":"string","description":"Assistant instructions."},"model":{"type":"string","description":"Model name."},"created_at":{"type":"string","format":"date-time","description":"The time the assistant was created."}},"required":["id","created_at","name","model"]}},"responses":{"AssistantListResponse":{"description":"A list of assistants.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Assistant"}},"total":{"type":"integer","format":"int64"}}}}}}}},"paths":{"/v1/assistants":{"get":{"operationId":"get-assistants-v1","deprecated":true,"summary":"List assistants for a specific user. Deprecated, use /v1/agents instead.","tags":["Assistant Management"],"description":"Deprecated: Use /v1/agents instead. Retrieve list of assistants for a specific user.","parameters":[{"name":"limit","in":"query","required":false,"description":"The number of items to return.","schema":{"type":"integer","format":"int64","default":100,"minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"description":"The number of items to skip.","schema":{"type":"integer","format":"int64"}},{"name":"sort_by.field","in":"query","schema":{"$ref":"#/components/schemas/SortByField"},"description":"Field to sort by, must be used together with sort_by.order."},{"name":"sort_by.order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder"},"description":"Sort order, must be used together with sort_by.field."},{"name":"include_shared","in":"query","required":false,"description":"Whether to include assistants shared with the user.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"$ref":"#/components/responses/AssistantListResponse"},"404":{"description":"Assistant not found."}}}}}}
```


# Company Management

List company API keys and their usage.

## List all company API keys with last usage time

> Returns all API keys (user and team) for the company with pagination and sorting.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Company Management","description":"List company API keys and their usage."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"CompanyAPIKeysResponse":{"description":"Paginated list of all API keys for the company","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CompanyAPIKey"}},"total":{"type":"integer","format":"int64"}}}}}}},"schemas":{"CompanyAPIKey":{"type":"object","properties":{"uuid":{"type":"string","description":"UUID of the API key."},"name":{"type":"string","description":"Name of the API key."},"api_key":{"type":"string","description":"Masked API key value."},"key_owner":{"type":"string","description":"Display name of the key owner (user name or team name)."},"owner_uuid":{"type":"string","description":"UUID of the key owner (user UUID or team UUID)."},"last_used_at":{"type":"string","format":"date-time","description":"Last time the key was used."},"status":{"type":"string","description":"Status of the API key.","enum":["active","disabled","removed","user_deleted","team_deleted","budget_exceeded"]},"type":{"type":"string","description":"Type of the API key owner.","enum":["user","team"]},"budget_used":{"type":"number","format":"float","description":"Current budget used for the owner."},"budget_limit":{"type":"number","format":"float","description":"Budget limit set for the owner, if any."}},"required":["uuid","name","api_key","key_owner","status","type","owner_uuid"]}}},"paths":{"/v1/companies/{companyId}/api_keys/with_usage":{"get":{"operationId":"get-company-api-keys-with-usage-v1","tags":["Company Management"],"summary":"List all company API keys with last usage time","description":"Returns all API keys (user and team) for the company with pagination and sorting.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The UUID of the company.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page.","schema":{"type":"integer","format":"int32"}},{"name":"offset","in":"query","required":false,"description":"Number of records to skip.","schema":{"type":"integer","format":"int32","minimum":0}},{"name":"sort_by_field","in":"query","required":false,"description":"Sort field: name, key_owner, last_used_at, status.","schema":{"type":"string","enum":["name","key_owner","budget_used","budget_limit","status","last_used_at"]}},{"name":"sort_by_order","in":"query","required":false,"description":"Sort order: asc, desc.","schema":{"type":"string","enum":["asc","desc"]}},{"name":"name","in":"query","required":false,"description":"Filter by API key name (partial match).","schema":{"type":"string"}},{"name":"owner_uuid","in":"query","required":false,"description":"Filter by owner UUID (user or team).","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/CompanyAPIKeysResponse"}}}}}}
```

## List company user API keys aggregated by owner

> Returns the company's user API keys aggregated by owner, with usage and budget information.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Company Management","description":"List company API keys and their usage."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"UserAPIKeyOwnersResponse":{"description":"Paginated list of user API key owners with keys count","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserAPIKeyOwner"}},"total":{"type":"integer","format":"int64"}}}}}}},"schemas":{"UserAPIKeyOwner":{"type":"object","properties":{"owner_uuid":{"type":"string","description":"UUID of the owner (user)."},"owner_name":{"type":"string","description":"Display name of the owner."},"key_count":{"type":"integer","format":"int64","description":"Number of API keys belonging to this owner."},"status":{"type":"string","description":"Dynamic status of the API key owner.","enum":["active","disabled","removed","user_deleted","team_deleted","budget_exceeded"]},"budget_used":{"type":"number","format":"float","description":"Current budget used for the user."},"budget_limit":{"type":"number","format":"float","description":"Budget limit set for the user, if any."}},"required":["owner_uuid","owner_name","key_count","status"]}}},"paths":{"/v1/companies/{companyId}/users/api_keys/with_usage":{"get":{"operationId":"get-company-user-api-keys-with-usage-v1","tags":["Company Management"],"summary":"List company user API keys aggregated by owner","description":"Returns the company's user API keys aggregated by owner, with usage and budget information.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The UUID of the company.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return.","schema":{"type":"integer","format":"int32","minimum":1}},{"name":"offset","in":"query","required":false,"description":"Number of items to skip.","schema":{"type":"integer","format":"int32","minimum":0}},{"name":"sort_by_field","in":"query","required":false,"description":"Field to sort by: owner_name, status, key_count, budget_used, budget_limit.","schema":{"type":"string","enum":["owner_name","key_count","budget_used","budget_limit"]}},{"name":"sort_by_order","in":"query","required":false,"description":"Sort order: asc, desc.","schema":{"type":"string","enum":["asc","desc"]}},{"name":"owner_name","in":"query","required":false,"description":"Filter by owner name (partial match).","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/UserAPIKeyOwnersResponse"}}}}}}
```

## List user API keys with last usage time

> Returns all API keys of a specific user in the company, with last usage time.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Company Management","description":"List company API keys and their usage."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"UserAPIKeysWithUsageResponse":{"description":"Paginated list of user API keys with usage","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyWithOwner"}},"total":{"type":"integer","format":"int64"}}}}}}},"schemas":{"APIKeyWithOwner":{"allOf":[{"$ref":"#/components/schemas/APIKey"},{"type":"object","properties":{"owner_uuid":{"type":"string","description":"UUID of the owner (user or team)."},"owner_name":{"type":"string","description":"Display name of the owner."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used. Null if the key has never been used."},"removed":{"type":"boolean","description":"Whether the API key owner has been removed."},"status":{"type":"string","description":"Dynamic status of the API key.","enum":["active","disabled","removed","user_deleted","team_deleted","budget_exceeded"]},"budget_used":{"type":"number","format":"float","description":"Current budget used for the key owner."},"budget_limit":{"type":"number","format":"float","description":"Budget limit set for the user, if any."}},"required":["owner_uuid","owner_name","status"]}]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/companies/{companyId}/users/{userId}/api_keys/with_usage":{"get":{"operationId":"list-user-api-keys-with-usage-v1","tags":["Company Management"],"summary":"List user API keys with last usage time","description":"Returns all API keys of a specific user in the company, with last usage time.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The UUID of the company.","schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"description":"The UUID of the user.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return.","schema":{"type":"integer","format":"int32","minimum":1}},{"name":"offset","in":"query","required":false,"description":"Number of items to skip.","schema":{"type":"integer","format":"int32","minimum":0}},{"name":"name","in":"query","required":false,"description":"Filter by API key name (partial match).","schema":{"type":"string"}},{"name":"sort_by_field","in":"query","required":false,"description":"Field to sort by: name, owner_name, last_used_at, status, budget_limit, budget_used.","schema":{"type":"string","enum":["name","last_used_at","owner_name","status"]}},{"name":"sort_by_order","in":"query","required":false,"description":"Sort order: asc, desc.","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"$ref":"#/components/responses/UserAPIKeysWithUsageResponse"}}}}}}
```

## List company team API keys aggregated by team

> Returns the company's team API keys aggregated by team, with usage and budget information.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Company Management","description":"List company API keys and their usage."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"TeamAPIKeyOwnersResponse":{"description":"Paginated list of team API key owners with keys count","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TeamAPIKeyOwner"}},"total":{"type":"integer","format":"int64"}}}}}}},"schemas":{"TeamAPIKeyOwner":{"type":"object","properties":{"owners":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyOwnerInfo"},"description":"List of team members associated with the key group."},"key_count":{"type":"integer","format":"int64","description":"Number of API keys belonging to this team."},"team_uuid":{"type":"string","description":"UUID of the team."},"team_name":{"type":"string","description":"Name of the team."},"status":{"type":"string","description":"Dynamic status of the API key owner.","enum":["active","disabled","removed","user_deleted","team_deleted","budget_exceeded"]},"budget_used":{"type":"number","format":"float","description":"Current budget used for the team."},"budget_limit":{"type":"number","format":"float","description":"Budget limit set for the team, if any."}},"required":["owners","key_count","status"]},"APIKeyOwnerInfo":{"type":"object","properties":{"owner_uuid":{"type":"string","description":"UUID of the owner (user)."},"owner_name":{"type":"string","description":"Display name of the owner."}},"required":["owner_uuid","owner_name"]}}},"paths":{"/v1/companies/{companyId}/teams/api_keys/with_usage":{"get":{"operationId":"get-company-team-api-keys-with-usage-v1","tags":["Company Management"],"summary":"List company team API keys aggregated by team","description":"Returns the company's team API keys aggregated by team, with usage and budget information.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The UUID of the company.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return.","schema":{"type":"integer","format":"int32","minimum":1}},{"name":"offset","in":"query","required":false,"description":"Number of items to skip.","schema":{"type":"integer","format":"int32","minimum":0}},{"name":"sort_by_field","in":"query","required":false,"description":"Field to sort by: team_name, status, key_count, budget_used, budget_limit.","schema":{"type":"string","enum":["team_name","key_count","budget_used","budget_limit"]}},{"name":"sort_by_order","in":"query","required":false,"description":"Sort order: asc, desc.","schema":{"type":"string","enum":["asc","desc"]}},{"name":"team_name","in":"query","required":false,"description":"Filter by team name (partial match).","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/TeamAPIKeyOwnersResponse"}}}}}}
```

## List team API keys with last usage time

> Returns all API keys of a specific team in the company, with last usage time.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Company Management","description":"List company API keys and their usage."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"TeamAPIKeysWithUsageResponse":{"description":"Paginated list of team API keys with usage","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyWithOwner"}},"total":{"type":"integer","format":"int64"}}}}}}},"schemas":{"APIKeyWithOwner":{"allOf":[{"$ref":"#/components/schemas/APIKey"},{"type":"object","properties":{"owner_uuid":{"type":"string","description":"UUID of the owner (user or team)."},"owner_name":{"type":"string","description":"Display name of the owner."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used. Null if the key has never been used."},"removed":{"type":"boolean","description":"Whether the API key owner has been removed."},"status":{"type":"string","description":"Dynamic status of the API key.","enum":["active","disabled","removed","user_deleted","team_deleted","budget_exceeded"]},"budget_used":{"type":"number","format":"float","description":"Current budget used for the key owner."},"budget_limit":{"type":"number","format":"float","description":"Budget limit set for the user, if any."}},"required":["owner_uuid","owner_name","status"]}]},"APIKey":{"type":"object","properties":{"api_key":{"type":"string","description":"API Key for use with completions API"},"id":{"type":"string","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Display name for the API key"},"enabled":{"type":"boolean","description":"Whether the API key is enabled."},"removed":{"type":"boolean","description":"Whether the API key has been soft-deleted"},"created_at":{"type":"string","format":"date-time","description":"The time the key was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the key was last updated."},"last_used_at":{"type":"string","format":"date-time","description":"The time the key was last used."},"expiration_date":{"type":"string","format":"date-time","description":"The date when the key expires. Null if the key does not expire."}},"required":["id","api_key","name","enabled","removed"]}}},"paths":{"/v1/companies/{companyId}/teams/{teamId}/api_keys/with_usage":{"get":{"operationId":"list-team-api-keys-with-usage-v1","tags":["Company Management"],"summary":"List team API keys with last usage time","description":"Returns all API keys of a specific team in the company, with last usage time.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The UUID of the company.","schema":{"type":"string"}},{"name":"teamId","in":"path","required":true,"description":"The UUID of the team.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return.","schema":{"type":"integer","format":"int32","minimum":1}},{"name":"offset","in":"query","required":false,"description":"Number of items to skip.","schema":{"type":"integer","format":"int32","minimum":0}},{"name":"name","in":"query","required":false,"description":"Filter by API key name (partial match).","schema":{"type":"string"}},{"name":"sort_by_field","in":"query","required":false,"description":"Field to sort by: name, owner_name, last_used_at.","schema":{"type":"string","enum":["name","last_used_at","owner_name"]}},{"name":"sort_by_order","in":"query","required":false,"description":"Sort order: asc, desc.","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"$ref":"#/components/responses/TeamAPIKeysWithUsageResponse"}}}}}}
```


# Budget Limit Management

Manage company budget limits.

## List budget limits for a company. Deprecated, use /v1/companies/budget\_limits instead.

> Deprecated: Use /v1/companies/budget\_limits instead. Retrieve all budget limits for a specific company.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Budget Limit Management","description":"Manage company budget limits."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"CompanyBudgetLimitListResponse":{"description":"A list of company budget limits.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CompanyBudgetLimit"}},"total":{"type":"integer"}}}}}}},"schemas":{"CompanyBudgetLimit":{"type":"object","properties":{"company_uuid":{"type":"string","description":"The UUID of the company."},"company_subscription_uuid":{"type":"string","description":"The UUID of the company subscription."},"target_type":{"type":"string","description":"The target type of the budget limit. Only team limits can be set.","enum":["company","team","user","api_key"]},"target_uuid":{"type":"string","description":"The UUID of the target (team, user or API key)."},"limit_type":{"deprecated":true,"type":"string","description":"Deprecated, pass company_subscription_uuid.","enum":["general","public-api"]},"is_renewed":{"type":"boolean","description":"Whether the budget limit is renewed periodically."},"value":{"type":"number","format":"double","description":"The budget limit value."},"allow_use_additional":{"type":"boolean","description":"Whether additional (extra) credits may be used once the limit is reached."},"max_extra_credits_value":{"type":"number","format":"double","nullable":true,"description":"The maximum amount of extra credits that may be used."},"created_at":{"type":"string","format":"date-time","description":"When the budget limit was created."},"updated_at":{"type":"string","format":"date-time","description":"When the budget limit was last updated."}},"required":["company_uuid","target_type","target_uuid","company_subscription_uuid","is_renewed","allow_use_additional","created_at","updated_at"]}}},"paths":{"/v1/companies/{companyId}/budget_limits":{"get":{"operationId":"get-company-budget-limits-by-id-v1","deprecated":true,"summary":"List budget limits for a company. Deprecated, use /v1/companies/budget_limits instead.","tags":["Budget Limit Management"],"description":"Deprecated: Use /v1/companies/budget_limits instead. Retrieve all budget limits for a specific company.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The UUID of the company.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return.","schema":{"type":"integer","format":"uint32","minimum":1}},{"name":"offset","in":"query","required":false,"description":"Number of items to skip.","schema":{"type":"integer","format":"uint32","minimum":0}}],"responses":{"200":{"$ref":"#/components/responses/CompanyBudgetLimitListResponse"},"500":{"description":"Server error."},"4XX":{"description":"Client error."}}}}}}
```

## List budget limits for a company

> Retrieve all budget limits for a specific company.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Budget Limit Management","description":"Manage company budget limits."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"CompanyBudgetLimitListResponse":{"description":"A list of company budget limits.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CompanyBudgetLimit"}},"total":{"type":"integer"}}}}}}},"schemas":{"CompanyBudgetLimit":{"type":"object","properties":{"company_uuid":{"type":"string","description":"The UUID of the company."},"company_subscription_uuid":{"type":"string","description":"The UUID of the company subscription."},"target_type":{"type":"string","description":"The target type of the budget limit. Only team limits can be set.","enum":["company","team","user","api_key"]},"target_uuid":{"type":"string","description":"The UUID of the target (team, user or API key)."},"limit_type":{"deprecated":true,"type":"string","description":"Deprecated, pass company_subscription_uuid.","enum":["general","public-api"]},"is_renewed":{"type":"boolean","description":"Whether the budget limit is renewed periodically."},"value":{"type":"number","format":"double","description":"The budget limit value."},"allow_use_additional":{"type":"boolean","description":"Whether additional (extra) credits may be used once the limit is reached."},"max_extra_credits_value":{"type":"number","format":"double","nullable":true,"description":"The maximum amount of extra credits that may be used."},"created_at":{"type":"string","format":"date-time","description":"When the budget limit was created."},"updated_at":{"type":"string","format":"date-time","description":"When the budget limit was last updated."}},"required":["company_uuid","target_type","target_uuid","company_subscription_uuid","is_renewed","allow_use_additional","created_at","updated_at"]}}},"paths":{"/v1/companies/budget_limits":{"get":{"operationId":"get-company-budget-limits-v1","summary":"List budget limits for a company","tags":["Budget Limit Management"],"description":"Retrieve all budget limits for a specific company.","parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return.","schema":{"type":"integer","format":"uint32","minimum":1}},{"name":"offset","in":"query","required":false,"description":"Number of items to skip.","schema":{"type":"integer","format":"uint32","minimum":0}}],"responses":{"200":{"$ref":"#/components/responses/CompanyBudgetLimitListResponse"},"500":{"description":"Server error."},"4XX":{"description":"Client error."}}}}}}
```

## Set the budget limit of a team

> Creates or updates the budget limit settings of a team. Only Company Owners can call this endpoint.\
> The call sets \`is\_renewed\`, \`allow\_use\_additional\` and \`max\_extra\_credits\_value\`. The limit value itself\
> cannot be changed here: an existing limit keeps its stored value and a newly created one starts at 0.\
> Workspace-wide and per-user limits cannot be changed.<br>

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Budget Limit Management","description":"Manage company budget limits."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"UpsertCompanyBudgetLimitRequest":{"type":"object","description":"Creates or updates the budget limit settings of a team. The limit value cannot be set here:\nan existing limit keeps its value, a newly created one starts at 0.\n","properties":{"target_uuid":{"type":"string","description":"The UUID of the team."},"is_renewed":{"type":"boolean","description":"Whether the budget limit is renewed periodically."},"allow_use_additional":{"type":"boolean","description":"Whether the key may use additional (extra) credits once its limit is reached."},"max_extra_credits_value":{"type":"number","format":"double","description":"The maximum amount of extra credits the key may use. When omitted, the currently stored cap is kept.\nAn existing cap can be replaced but not removed.\n","minimum":0,"maximum":100000000},"remove":{"type":"boolean","description":"Not supported. Removing a limit is rejected; omit this field or set it to false."}},"required":["target_uuid"]},"CompanyBudgetLimit":{"type":"object","properties":{"company_uuid":{"type":"string","description":"The UUID of the company."},"company_subscription_uuid":{"type":"string","description":"The UUID of the company subscription."},"target_type":{"type":"string","description":"The target type of the budget limit. Only team limits can be set.","enum":["company","team","user","api_key"]},"target_uuid":{"type":"string","description":"The UUID of the target (team, user or API key)."},"limit_type":{"deprecated":true,"type":"string","description":"Deprecated, pass company_subscription_uuid.","enum":["general","public-api"]},"is_renewed":{"type":"boolean","description":"Whether the budget limit is renewed periodically."},"value":{"type":"number","format":"double","description":"The budget limit value."},"allow_use_additional":{"type":"boolean","description":"Whether additional (extra) credits may be used once the limit is reached."},"max_extra_credits_value":{"type":"number","format":"double","nullable":true,"description":"The maximum amount of extra credits that may be used."},"created_at":{"type":"string","format":"date-time","description":"When the budget limit was created."},"updated_at":{"type":"string","format":"date-time","description":"When the budget limit was last updated."}},"required":["company_uuid","target_type","target_uuid","company_subscription_uuid","is_renewed","allow_use_additional","created_at","updated_at"]}},"responses":{"CompanyBudgetLimitResponse":{"description":"A company budget limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBudgetLimit"}}}}}},"paths":{"/v1/companies/budget_limits":{"put":{"operationId":"put-company-budget-limits-v1","summary":"Set the budget limit of a team","tags":["Budget Limit Management"],"description":"Creates or updates the budget limit settings of a team. Only Company Owners can call this endpoint.\nThe call sets `is_renewed`, `allow_use_additional` and `max_extra_credits_value`. The limit value itself\ncannot be changed here: an existing limit keeps its stored value and a newly created one starts at 0.\nWorkspace-wide and per-user limits cannot be changed.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCompanyBudgetLimitRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/CompanyBudgetLimitResponse"},"500":{"description":"Server error."},"4XX":{"description":"Client error."}}}}}}
```

## Set budget limits of teams in bulk

> Creates or updates the budget limit settings of up to 100 teams. Only Company Owners can call this endpoint.\
> For each item the call sets \`is\_renewed\`, \`allow\_use\_additional\` and \`max\_extra\_credits\_value\`. The limit value\
> itself cannot be changed here: an existing limit keeps its stored value and a newly created one starts at 0.\
> Nothing is written if any item is invalid.<br>

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Budget Limit Management","description":"Manage company budget limits."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"BulkUpsertCompanyBudgetLimitRequest":{"type":"object","description":"Updates the budget limit settings of several teams in one request. Nothing is written if any item is invalid.","properties":{"items":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/UpsertCompanyBudgetLimitRequest"}}},"required":["items"]},"UpsertCompanyBudgetLimitRequest":{"type":"object","description":"Creates or updates the budget limit settings of a team. The limit value cannot be set here:\nan existing limit keeps its value, a newly created one starts at 0.\n","properties":{"target_uuid":{"type":"string","description":"The UUID of the team."},"is_renewed":{"type":"boolean","description":"Whether the budget limit is renewed periodically."},"allow_use_additional":{"type":"boolean","description":"Whether the key may use additional (extra) credits once its limit is reached."},"max_extra_credits_value":{"type":"number","format":"double","description":"The maximum amount of extra credits the key may use. When omitted, the currently stored cap is kept.\nAn existing cap can be replaced but not removed.\n","minimum":0,"maximum":100000000},"remove":{"type":"boolean","description":"Not supported. Removing a limit is rejected; omit this field or set it to false."}},"required":["target_uuid"]},"CompanyBudgetLimit":{"type":"object","properties":{"company_uuid":{"type":"string","description":"The UUID of the company."},"company_subscription_uuid":{"type":"string","description":"The UUID of the company subscription."},"target_type":{"type":"string","description":"The target type of the budget limit. Only team limits can be set.","enum":["company","team","user","api_key"]},"target_uuid":{"type":"string","description":"The UUID of the target (team, user or API key)."},"limit_type":{"deprecated":true,"type":"string","description":"Deprecated, pass company_subscription_uuid.","enum":["general","public-api"]},"is_renewed":{"type":"boolean","description":"Whether the budget limit is renewed periodically."},"value":{"type":"number","format":"double","description":"The budget limit value."},"allow_use_additional":{"type":"boolean","description":"Whether additional (extra) credits may be used once the limit is reached."},"max_extra_credits_value":{"type":"number","format":"double","nullable":true,"description":"The maximum amount of extra credits that may be used."},"created_at":{"type":"string","format":"date-time","description":"When the budget limit was created."},"updated_at":{"type":"string","format":"date-time","description":"When the budget limit was last updated."}},"required":["company_uuid","target_type","target_uuid","company_subscription_uuid","is_renewed","allow_use_additional","created_at","updated_at"]}},"responses":{"CompanyBudgetLimitListResponse":{"description":"A list of company budget limits.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CompanyBudgetLimit"}},"total":{"type":"integer"}}}}}}}},"paths":{"/v1/companies/budget_limits/bulk":{"put":{"operationId":"put-company-budget-limits-bulk-v1","summary":"Set budget limits of teams in bulk","tags":["Budget Limit Management"],"description":"Creates or updates the budget limit settings of up to 100 teams. Only Company Owners can call this endpoint.\nFor each item the call sets `is_renewed`, `allow_use_additional` and `max_extra_credits_value`. The limit value\nitself cannot be changed here: an existing limit keeps its stored value and a newly created one starts at 0.\nNothing is written if any item is invalid.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertCompanyBudgetLimitRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/CompanyBudgetLimitListResponse"},"500":{"description":"Server error."},"4XX":{"description":"Client error."}}}}}}
```


# Usage

Query metered LLM consumption (requests, tokens, cost).

## Get usage report

> Returns metered LLM consumption (requests, tokens, cost) for the caller's scope as a daily or hourly UTC series or range totals, optionally grouped by team or API key. A bare call returns the last 30 days for the calling key's scope (last 7 days with granularity=hour). Range caps: 90 days; 31 days when group\_by is combined with granularity=day; 7 days when granularity=hour. Dates are calendar days in the requested \`timezone\` (UTC by default) and buckets are aligned to that timezone's day and hour boundaries; cost is USD. Rows for the current day (or hour) are partial; hourly series end at the current hour, future hours are omitted.\
> \
> Access levels gate how you may slice. A company owner's key reaches every team, API key, and user in the company and may use all group\_by dimensions. A team API key reaches only its own team: team\_id must name that team, api\_key\_id only keys belonging to it, and group\_by is limited to api\_key; it may not filter by user. A team owner's personal key reaches its own team the same way, while a member's personal key reaches only that member's own keys; either may filter user\_id to itself alone. group\_by=user otherwise requires a company owner's key. Any team\_id, api\_key\_id, user\_id, or group\_by beyond the caller's reach fails the whole request with 403 — results are never silently truncated. Filters that match nothing within the caller's scope return zero-filled rows.\
> \
> User grouping aggregates usage attributed to a user's identity across all their API keys. Requests that carry no user identity (e.g. shared team API keys) are not attributable and count toward the \`\_\_other\_\_\` group, as does usage of users beyond the 100 highest-spending users in the window and beyond \`limit\`. order\_by ranks within those top spenders.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Usage","description":"Query metered LLM consumption (requests, tokens, cost)."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"UsageResponse":{"description":"Usage report for the requested scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageReport"}}}},"ErrorResponse":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"object","title":"Detail"}},"required":["detail"]}}}}},"schemas":{"UsageReport":{"type":"object","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"granularity":{"type":"string","enum":["day","hour","total"]},"group_by":{"type":"string","enum":["team","api_key","user"]},"totals":{"$ref":"#/components/schemas/UsageMetrics"},"items":{"type":"array","description":"Bucketed series for the requested scope (granularity=day or hour).","items":{"$ref":"#/components/schemas/UsageItem"}},"groups":{"type":"array","description":"Present when group_by is set; ranked by order_by descending.","items":{"$ref":"#/components/schemas/UsageGroup"}},"top_models":{"type":"array","description":"Range-level top models; present when include=top_models.","items":{"$ref":"#/components/schemas/UsageTopModel"}}},"required":["from","to","granularity","totals"]},"UsageMetrics":{"type":"object","description":"Full metric set for a scope. tokens_total includes all cache, image, reasoning and audio tokens (input + output + cache writes + cache reads + image input + image output + image cache reads + reasoning + audio input + audio output). The tokens_image_* buckets are disjoint from tokens_input and tokens_cache_read. cost_total is USD and already includes image spend.","properties":{"requests":{"type":"integer","format":"int64"},"tokens_input":{"type":"integer","format":"int64"},"tokens_output":{"type":"integer","format":"int64"},"tokens_cache_write":{"type":"integer","format":"int64"},"tokens_cache_write_1h":{"type":"integer","format":"int64"},"tokens_cache_read":{"type":"integer","format":"int64"},"tokens_image_input":{"type":"integer","format":"int64","description":"Image input tokens; their own bucket, not part of tokens_input."},"tokens_image_output":{"type":"integer","format":"int64","description":"Image output tokens."},"tokens_image_cache_read":{"type":"integer","format":"int64","description":"Cached image input tokens on image generation; not part of tokens_cache_read."},"tokens_reasoning":{"type":"integer","format":"int64","description":"Reasoning tokens; not part of tokens_output. Zero for usage before 2026-10-26, when they were counted inside tokens_output."},"tokens_audio_input":{"type":"integer","format":"int64","description":"Audio input tokens; not part of tokens_input. Zero for usage before 2026-10-26, when they were counted inside tokens_input."},"tokens_audio_output":{"type":"integer","format":"int64","description":"Audio output tokens; not part of tokens_output. Zero for usage before 2026-10-26, when they were counted inside tokens_output."},"tokens_total":{"type":"integer","format":"int64"},"cost_total":{"type":"number","format":"double"}},"required":["requests","tokens_input","tokens_output","tokens_cache_write","tokens_cache_write_1h","tokens_cache_read","tokens_image_input","tokens_image_output","tokens_image_cache_read","tokens_reasoning","tokens_audio_input","tokens_audio_output","tokens_total","cost_total"]},"UsageItem":{"allOf":[{"type":"object","properties":{"date":{"type":"string","description":"Bucket start in the report `timezone`: a calendar day `YYYY-MM-DD`, or the hour start in RFC3339 with the zone's offset (`2026-08-09T13:00:00+02:00`) for granularity=hour."},"top_models":{"type":"array","description":"Present when include=top_models.","items":{"$ref":"#/components/schemas/UsageTopModel"}}},"required":["date"]},{"$ref":"#/components/schemas/UsageMetrics"}]},"UsageTopModel":{"allOf":[{"type":"object","properties":{"model":{"type":"string","description":"Model name, or `__other__` for the rollup row."}},"required":["model"]},{"$ref":"#/components/schemas/UsageMetrics"}]},"UsageGroup":{"type":"object","properties":{"dimensions":{"$ref":"#/components/schemas/UsageGroupDimensions"},"totals":{"$ref":"#/components/schemas/UsageMetrics"},"items":{"type":"array","description":"Bucketed series for this group. granularity=day: one zero-filled row per day; granularity=hour: sparse — only buckets with usage.","items":{"$ref":"#/components/schemas/UsageItem"}}},"required":["dimensions","totals"]},"UsageGroupDimensions":{"type":"object","description":"Exactly one identity pair is set, matching group_by. The synthetic rollup group uses id `__other__`.","properties":{"team_id":{"type":"string"},"team_name":{"type":"string"},"api_key_id":{"type":"string"},"api_key_name":{"type":"string"},"user_id":{"type":"string"},"user_email":{"type":"string"}}}}},"paths":{"/v1/usage":{"get":{"operationId":"get-usage-v1","tags":["Usage"],"summary":"Get usage report","description":"Returns metered LLM consumption (requests, tokens, cost) for the caller's scope as a daily or hourly UTC series or range totals, optionally grouped by team or API key. A bare call returns the last 30 days for the calling key's scope (last 7 days with granularity=hour). Range caps: 90 days; 31 days when group_by is combined with granularity=day; 7 days when granularity=hour. Dates are calendar days in the requested `timezone` (UTC by default) and buckets are aligned to that timezone's day and hour boundaries; cost is USD. Rows for the current day (or hour) are partial; hourly series end at the current hour, future hours are omitted.\n\nAccess levels gate how you may slice. A company owner's key reaches every team, API key, and user in the company and may use all group_by dimensions. A team API key reaches only its own team: team_id must name that team, api_key_id only keys belonging to it, and group_by is limited to api_key; it may not filter by user. A team owner's personal key reaches its own team the same way, while a member's personal key reaches only that member's own keys; either may filter user_id to itself alone. group_by=user otherwise requires a company owner's key. Any team_id, api_key_id, user_id, or group_by beyond the caller's reach fails the whole request with 403 — results are never silently truncated. Filters that match nothing within the caller's scope return zero-filled rows.\n\nUser grouping aggregates usage attributed to a user's identity across all their API keys. Requests that carry no user identity (e.g. shared team API keys) are not attributable and count toward the `__other__` group, as does usage of users beyond the 100 highest-spending users in the window and beyond `limit`. order_by ranks within those top spenders.","parameters":[{"name":"from","in":"query","required":false,"description":"Inclusive range start, YYYY-MM-DD, a calendar date in `timezone`. Defaults to `to` minus 30 days (minus 6 days when granularity=hour).","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"description":"Inclusive range end, YYYY-MM-DD, a calendar date in `timezone`. Defaults to today there; must not be in the future.","schema":{"type":"string","format":"date"}},{"name":"timezone","in":"query","required":false,"description":"[IANA timezone](https://timeapi.io/documentation/iana-timezones) the report is expressed in, e.g. `Europe/Warsaw`. Defaults to `UTC`. `from` and `to` are read as calendar dates in this timezone, `to` defaults to today there, and every date and hourly timestamp in the response is rendered with that timezone's offset. Unknown names are rejected with 400.","schema":{"type":"string"}},{"name":"granularity","in":"query","required":false,"description":"`day` — one zero-filled row per calendar day in `timezone`; `hour` — one zero-filled row per hour in `timezone` up to the current hour, future hours omitted (range capped at 7 days); `total` — range totals only. A range ending today yields a variable-length hourly series (up to the current hour); request a fully-past range for a fixed 24-rows-per-day series. This describes the top-level items; group items are zero-filled for `day` but sparse for `hour` (only buckets with usage).","schema":{"type":"string","enum":["day","hour","total"],"default":"day"}},{"name":"group_by","in":"query","required":false,"description":"Adds a `groups` array sliced by the given dimension. `user` requires a company owner's key.","schema":{"type":"string","enum":["team","api_key","user"]}},{"name":"team_id","in":"query","required":false,"description":"Restrict to these teams (repeatable, max 100).","schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"api_key_id","in":"query","required":false,"description":"Restrict to these API keys (repeatable, max 100). Combines with team_id as AND — a key outside the filtered teams yields zero-filled rows, not an error.","schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"user_id","in":"query","required":false,"description":"Restrict to usage attributed to these users (repeatable, max 100). Company owner's key required; a member's key may name only itself. Combines with other filters as AND.","schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"order_by","in":"query","required":false,"description":"Ranks groups descending; only meaningful with group_by.","schema":{"type":"string","enum":["cost_total","tokens_total","requests"],"default":"cost_total"}},{"name":"limit","in":"query","required":false,"description":"Max groups returned (1-100), ranked by order_by.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":25}},{"name":"include_other","in":"query","required":false,"description":"When limit truncates, append one synthetic `__other__` group aggregating the rest so group totals reconcile with response totals.","schema":{"type":"boolean","default":true}},{"name":"include","in":"query","required":false,"description":"`top_models` — adds range-level and per-day top-models breakdowns. Each day ranks its own top models independently; the `__other__` row aggregates the rest so model rows reconcile with day and range totals.","schema":{"type":"array","items":{"type":"string","enum":["top_models"]}}},{"name":"top_models_limit","in":"query","required":false,"description":"Max model rows (1-20); the `__other__` rollup row does not count.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":20,"default":5}},{"name":"top_models_rank_by","in":"query","required":false,"description":"Ranking dimension for top models.","schema":{"type":"string","enum":["cost_total","tokens_total","requests"],"default":"cost_total"}}],"responses":{"200":{"$ref":"#/components/responses/UsageResponse"},"400":{"$ref":"#/components/responses/ErrorResponse"},"401":{"$ref":"#/components/responses/ErrorResponse"},"403":{"$ref":"#/components/responses/ErrorResponse"}}}}}}
```


# Integrations




---

[Next Page](https://docs.nexos.ai/llms-full.txt/1)

