# Getting started

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>Workspace</h3></td><td><p>Manage your AI models, users, and governance from one place.</p><p><strong>Admins:</strong> set guardrails, usage, control access.<br><strong>Users:</strong> get setup guidance.</p></td><td><a href="/pages/zgqod3G43wPHe6GtfpTZ">/pages/zgqod3G43wPHe6GtfpTZ</a></td></tr><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="/pages/9O7kckdlbtObPjsZS2Qq">/pages/9O7kckdlbtObPjsZS2Qq</a></td></tr></tbody></table>


# Workspace

nexos.ai is a chat interface that allows users to interact with different AI models. Users can create chats, select models based on their capabilities, and interact through text, files, etc.

### 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="/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/dJDWB5byK2K6YX9vqfxA">/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/dJDWB5byK2K6YX9vqfxA</a></td></tr><tr><td align="center"><strong>Projects</strong></td><td><a href="/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/knXmSeV8uuKFbvn1HN1q">/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/knXmSeV8uuKFbvn1HN1q</a></td></tr><tr><td align="center"><strong>Agents</strong></td><td><a href="/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/aMDXV3Kb7HK9A9Id0hfO">/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/aMDXV3Kb7HK9A9Id0hfO</a></td></tr><tr><td align="center"><strong>nexos.ai in Messaging Apps</strong></td><td><a href="/pages/IeMOudJlnyRw9YWbOzfI">/pages/IeMOudJlnyRw9YWbOzfI</a></td></tr><tr><td align="center"><strong>Troubleshooting</strong></td><td><a href="/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/qAkEKquBfb61qck6VWPB">/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/qAkEKquBfb61qck6VWPB</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="/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/8bphb9SAafbJQgmrsa9M">/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/8bphb9SAafbJQgmrsa9M</a></td></tr><tr><td align="center"><strong>Observability</strong></td><td><a href="/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/QfpGuQbtaNEzEicH1RGW">/spaces/DcOhapgXnoeDvgGQ8Jm4/pages/QfpGuQbtaNEzEicH1RGW</a></td></tr></tbody></table>


# Chat

{% 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="/files/5ZAh8CloHbidYhmSdwa7" alt=""><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="/files/wXhsOCdphw4tOtAIjLVW" alt=""><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="/files/djQeXIL00N1i4oJ8cdbc" alt="" 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 %}

### Compare models

Compare model capabilities & choose models that fit your needs best.

{% stepper %}
{% step %}

#### Select models

Choose multiple models you want to test from the model search, and enter your prompt.
{% endstep %}

{% step %}

#### Send prompt and compare

Review responses from all selected models side by side

<figure><img src="/files/QriUTh4SQ0vZJI7NCckY" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


# 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="/files/pLr6CuY7bh1ImXDOuKFS" 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**
* **Projects** (great when your files live in a Project)&#x20;
* **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, Projects, 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”).
* If you’re working on a Project, keep related files together so the analysis stays consistent.


# 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="/files/bbjA2D6CUuAT48BsRb75" 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="/files/kAx0rNPC7tjHZf409raU" 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="/files/E8jgFMSojGJhvJIFSuBv" 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="/files/lCkwvzSvQZBYXOc9EbWf" 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="/files/nXnowweSI9cz54SBP2J6" 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="/files/jXqqp4Sqaa9Uhrd2kDPG" 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="/files/HLilrG8rbS3DmDFOx4Op" 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


# Projects

Use Projects to organize conversations, ground answers in your data, and work on specific topics. Each Project acts as a container with its own files, chat history, and model set.Add the name that will be used for the project

{% stepper %}
{% step %}

### Create a project

Click "Create project" button below "Project name" input or create icon on the top right side of the menu.
{% endstep %}

{% step %}

### Add files

Attach files to your project to provide source material that will be indexed and used in your chats. \
nexos uses Retrieval-Augmented Generation (RAG) to pull relevant context from your files when responding.

* **Supported file types**: csv, xls, xlsx, json, docx, doc, pptx, ppt, txt, xml, tiff,  pdf
* **File size limits**: Up to 30MB per file
* **Vectorization**: Files are chunked, embedded, and stored securely in your project’s context index

{% hint style="info" %}
Only use trusted models when working with sensitive or proprietary content. While files stay scoped to your project, responses depend on the model’s ability to handle data securely.
{% endhint %}
{% endstep %}

{% step %}

### Model selection & chat

You have full control over which model powers your conversation.

* Select from available LLMs (OpenAI, Anthropic, Mistral, etc.)
* Use the **“Model Settings”** dropdown inside each chat
* Switch models anytime to compare outputs or adjust cost-performance tradeoffs

#### Begin your conversation

Enter your prompt in the chat interface. Use files (click "+ Add file") to enhance results with current information. Upload images (click + sign) to include additional context in your conversation anytime. See example below:&#x20;

<figure><img src="/files/0cFvtgHUMiwHpfjBai8K" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### &#x20;Sharing

Projects can be shared with teams or users.

* **View access** – others can see and use the Project without changes
* **Edit access** – collaborators can update files, settings, and structure

This makes Projects a shared workspace, so everyone works from the same context.

### Video walk-through

{% embed url="<https://youtu.be/XuWOLnr7MfE>" %}


# 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](/workspace/projects), 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 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 %}


# 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="/files/GAmYZjMAYSBA2LNW1gTQ" 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="/files/3Qr84WHrl8cQeZryHAxN" 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>


# 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="/pages/HolnY3uihLaWhgRVl4Uj">/pages/HolnY3uihLaWhgRVl4Uj</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="/pages/8bphb9SAafbJQgmrsa9M">/pages/8bphb9SAafbJQgmrsa9M</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="/pages/QfpGuQbtaNEzEicH1RGW">/pages/QfpGuQbtaNEzEicH1RGW</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></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>Preferences</td><td><a href="/pages/cjMYqwx6FtUs4OiwzT54">/pages/cjMYqwx6FtUs4OiwzT54</a></td><td><a href="/pages/cjMYqwx6FtUs4OiwzT54">/pages/cjMYqwx6FtUs4OiwzT54</a></td></tr><tr><td>Account</td><td></td><td><a href="/pages/EIfAOzvwey6YLi2MV8Mk">/pages/EIfAOzvwey6YLi2MV8Mk</a></td></tr><tr><td>My Integrations</td><td></td><td><a href="/pages/CJC2rM7X6THxBgtEppjh">/pages/CJC2rM7X6THxBgtEppjh</a></td></tr><tr><td>Personalization</td><td></td><td><a href="/pages/6OL3OQztLb0Ixep9tIOw">/pages/6OL3OQztLb0Ixep9tIOw</a></td></tr><tr><td>API Keys</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="/files/PkurqPy7QVcxAjzNb9ub" 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>


# Account

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

### Open 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="/files/BkE2AJBFcfwXVJ4Oy5MK" alt="" 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="/files/C5uWBQBpx40EBWLjVTUK" alt="" 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

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

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="/files/iQylwSwRli6btwQAAVP1" alt="" 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**](http://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="/files/WmLGU7JZPvTJ2FSSQ4G7" alt=""><figcaption></figcaption></figure>

\
**Option 2 — directly in Microsoft Teams**

1. Open Apps in Teams
2. Search for [nexos.ai](http://nexos.ai)
3. Open the nexos.ai app and click Add.
4. [nexos.ai](http://nexos.ai) is ready to use in your chats

<figure><img src="/files/hhyDNwQQkGicrJiU586U" alt=""><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 %}

### Watch how it works:

{% 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="/files/PsqUICnx9WYNzvNcUnnR" 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="/files/dEh3ytX4akKyxqfc76iZ" 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>


# API Keys

### 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="/files/Fx6gZRTc0OcwlJzfLPqw" alt=""><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="/files/nmtwrwvVJWZk0gJtEzko" alt=""><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="/files/AONsuENveSXYRcyaDGWL" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
API access requires both a paid subscription plan and purchased API credits.&#x20;

API credits are not included in your subscription and must be purchased separately before API requests can be made.
{% endhint %}


# 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="/pages/vpWxAPRXo9uieEfI0Hw8">/pages/vpWxAPRXo9uieEfI0Hw8</a></td></tr><tr><td>Models</td><td><a href="/pages/pkG6ImmAYs74WeOmy4iC">/pages/pkG6ImmAYs74WeOmy4iC</a></td></tr><tr><td>API credits add-on</td><td><a href="/pages/Z2bkKN2JKKJCve7hjKXk">/pages/Z2bkKN2JKKJCve7hjKXk</a></td></tr><tr><td>Teams</td><td><a href="/pages/CT9TmU9cn1ds4lZTstCX">/pages/CT9TmU9cn1ds4lZTstCX</a></td></tr><tr><td>Users</td><td><a href="/pages/p7PONdQB5gEJi5HfnHON">/pages/p7PONdQB5gEJi5HfnHON</a></td></tr><tr><td>Billing</td><td><a href="/pages/wnCTqq075sUiaBklCeNB">/pages/wnCTqq075sUiaBklCeNB</a></td></tr></tbody></table>


# Guardrails

Guardrails control what your AI models can and cannot do. Set them up to prevent unwanted outputs and enforce your rules.

**How guardrails work**

* **Company guardrail** – Applied to all models by default, unless a custom or excluded guardrail is set.
* **Custom guardrail** – Applies to specific models and has higher priority than the company guardrail.
* **Excluded models** – Models in the exclusion list are not affected by any guardrail.

*Priority order:* Excluded → Custom → Company

{% stepper %}
{% step %}

### Name your guardrail

Use descriptive names that indicate purpose (e.g., "PII-Protection-Customer-Data" or "Content-Filter-Internal-Use")
{% endstep %}

{% step %}

### Add validators

Select from the validators library based on your security requirements. \
[Click here for more info on Regex](#regex-match-validator). \
[Click here for more info on No PII](#no-pii-validator).&#x20;
{% endstep %}

{% step %}

### Configure each validator

Set specific parameters for detection and response behavior
{% endstep %}

{% step %}

### Test configuration

Validate settings before deployment. Note: you can edit guardrails anytime.
{% endstep %}
{% endstepper %}

### Regex match validator

Controls content based on pattern matching. Configure as follows:

<table><thead><tr><th width="214.4332275390625">Configuration</th><th>Meaning</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Assign a descriptive identifier for the rule</td></tr><tr><td><strong>When Regex matches</strong></td><td><p><strong>Search:</strong> looks for pattern existence in content<br></p><p><strong>Extraction:</strong> identifies and extracts specific pattern matches</p></td></tr><tr><td><strong>Regex rule</strong></td><td>Define the pattern to match (e.g., credit card numbers, internal codes, sensitive identifiers)</td></tr><tr><td><strong>Trigger on</strong></td><td><strong>Input:</strong> validates user prompts and requests<br><strong>Output:</strong> validates AI model responses<br><strong>Both:</strong> validates both input and output</td></tr><tr><td><strong>Guardrail behavior</strong></td><td><strong>Fix:</strong> automatically removes or replaces sensitive data<br><strong>Filter:</strong> removes sensitive content with generic replacement<br><strong>Exception:</strong> blocks the request entirely and returns error</td></tr></tbody></table>

### No PII Validator

Detects and anonymizes Personally Identifiable Information. Configuration includes:

<table><thead><tr><th width="216.3828125">Configuration</th><th>Meaning</th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>Assign identifier for the PII protection rule</td></tr><tr><td><strong>Entities</strong></td><td>Select specific PII types to detect (credit card numbers, crypto addresses, etc) </td></tr><tr><td><strong>Trigger on</strong></td><td>Choose Input, Output, or Both</td></tr><tr><td><strong>Guardrail behavior</strong></td><td><p><strong>Fix:</strong> Replaces PII with generic placeholders</p><p><strong>Exception:</strong> Blocks content containing PII</p></td></tr></tbody></table>


# 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="/files/p76PyyXGdscnKOqV5Yv1" 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="/files/3f0rSg7h7ZYS9YLH5Hx6" 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="/files/g0nMKCBaSbBwJnkIP7hV" 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="/files/Eb0HV8jpN5AS5MwSFZox" 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="/files/qxV7Zg7IYxWfIiHjOOaI" 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](/workspace/settings/user-settings/api-keys).
{% endstep %}

{% step %}

### Delete a team

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

<figure><img src="/files/7DRqEJ9KHVXeqZAl2dhH" 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="/files/DfxuGnj4pPQPqATGznpP" 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="/files/siWrziTa3ujA4QN5btLC" 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>


# Billing

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="/files/IDrL2RcqoREARGp6N5Rj" alt="" 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="/files/t3TNSm7gAtqM5aKjaA5q" alt="" 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="/files/6taYPkHKE9wTUXFOOaxF" alt="" 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>


# API credits add-on

## API credits - purchase and usage

API credits let you prepay for API usage in nexos.ai. Your API requests will work as long as you have 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="/files/zhDynneGs6XIQgg8196Y" alt=""><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="/files/dJ2uFNQyKeFYmBZBwlZA" alt=""><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="/files/wv1hWw4GmOIKvns8KpD1" alt="" 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="/files/Gax8ydMMszPVGOg8H6KD" alt="" 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="/files/JiDlWqmwi6cF98TaZrJp" alt=""><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="/files/HNXAb3K55NnHGAy1i4Z2" alt=""><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="/files/OsOJbVG69ftyRN7hpN4S" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

### Common questions

#### 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.


# Observability

### 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="/files/qPYppdbbuBiUk8fff2PG" alt=""><figcaption></figcaption></figure>


# Integrations

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

The **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.

### What you will find on this page

* **Popular integrations**\
  A set of commonly used integrations (based on what other teams use) so you can quickly start with the most popular options.

<figure><img src="/files/buS1jhkohQllTw5UhBhS" 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 and BigQuery.

<figure><img src="/files/s69aBEWKYQwQgvH1Bo6S" 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).

### 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).

### 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="/files/jpuMpfIIbwWItwLRzgfA" alt="" 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”).


# 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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Atlassian** in the list.
4. Set the integration to **Active** (enabled).

After it’s enabled here, team members can connect their own Atlassian accounts.

<figure><img src="/files/EJx3fYkSyYzWTl3vcoyN" alt="" width="563"><figcaption></figcaption></figure>

### Connecting your account

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

<figure><img src="/files/0FI3XyrhEzL2fiUHsq2k" alt="" width="563"><figcaption></figcaption></figure>

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.

<figure><img src="/files/iOr0s6ARi7oY3c2LCQhL" alt="" width="563"><figcaption></figcaption></figure>

6. Return to nexos.ai. Atlassian should now show as connected in **My Integrations**.

<figure><img src="/files/kCjsondA0kMt0elKKOjB" alt="" width="563"><figcaption></figcaption></figure>

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

1. Open **Chat**.
2. Select the **Tools** icon.
3. Turn **Atlassian** **toggle** **on** to use it in that conversation.

<figure><img src="/files/uUb0Gs5nspHuWahg90ZG" alt="" width="563"><figcaption></figcaption></figure>

### Use Atlassian 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 **Atlassian** **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="/files/7zEzG3VsIsaEykgaabHL" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
**Alternative (quick method)**\
You can also tell the agent in plain language to add the Atlassian 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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **GitHub** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/E9JXDeA3h6QFZSQORFJA" 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&#x20;

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

<figure><img src="/files/yXwLQBFWXvwYoB2XlObX" 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 Integrations**.

<figure><img src="/files/BNt2lZ3iOU6CQVmFa9ZU" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
3. Turn **GitHub** **on** 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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Google Calendar** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/XxyRmKQRMvLo5zFT6T9U" 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&#x20;

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

<figure><img src="/files/3OuoxzkwA66XCSKR9VKQ" 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 Integrations**.

<figure><img src="/files/xcGZHa7khdCdHuythUY8" alt="" width="563"><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
3. Turn **Google Calendar** **on** to use it in that conversation.

<figure><img src="/files/6XrFSiAilcR72C1DLssi" alt="" width="563"><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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Google Drive** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/IrKJ36rLvxjbyJ4ZzDJz" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/NQNSuA9R4rfBLwNGOllK" 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 Integrations**.

<figure><img src="/files/jPE2K1DmkpXtEDbZ8uNo" alt="" width="563"><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
3. Turn **Google Drive** **on** to use it in that conversation.

<figure><img src="/files/GzM8TIEEWgxpdWQ3Hzzg" alt="" width="563"><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 %}


# Google Mail

### 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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Google Mail** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/Cez7ExUruoKopVLGQS52" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/izsqIttNjfFuzseYhpkO" 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 Integrations**.

<figure><img src="/files/fCgCe0fcWEMEMEvlZBPO" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
3. Turn **Google Mail** **on** to use it in that conversation.

<figure><img src="/files/RKFZ0RUQ5qI7ZY6bJIJI" alt="" width="563"><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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
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 (individual user) from **My Integrations**

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

<figure><img src="/files/y9PwzoiIFFt87J7D80om" 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 **Chat** (or an Agent chat).
2. Select the **Tools** icon.
3. Turn **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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Looker** in the list.
4. In **Configuration**, fill in the required fields:
   * **Base URL**
   * **Client ID**
   * **Client Secret**

<figure><img src="/files/P2k78Ns6cRDkCXatxCOK" alt="" width="563"><figcaption></figcaption></figure>

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

<figure><img src="/files/oLIZx9eE24KNrckBUby8" 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 (individual user) from **My Integrations**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Integrations**.
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 Integrations**.

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
3. Turn **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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Microsoft Calendar** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/jpdEe1VXqSPMSw2QEYJz" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/KKcJUaY7OTi8FrDRaK20" 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 Integrations**.

<figure><img src="/files/dRwVYEu7wChdaiXyavvX" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Microsoft OneDrive** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/6VScrBeCdd9CIx8NjN1h" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/sO4JN6vbZorEsl1y04QU" 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 Integrations**.

<figure><img src="/files/HAdKhuavbVQvDpTENLwc" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Microsoft Outlook** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/nDJyJVtB4ZXzhED1GVP6" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/s7y7offokY6aI2VxLZVj" 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 Integrations**.

<figure><img src="/files/33gRAzRJdb0UWLDEnb75" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Microsoft SharePoint** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/8FVsZJBKgKlj1UKFTbDp" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/8Spd8ypsGrzLPWbRgH4B" 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 Integrations**.

<figure><img src="/files/SPoU95XOwSrLGugTD0vN" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Microsoft Teams** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/iDz5EPKgReAZjaFE5bFM" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/XciOaUrZrDV4Kw8qL0rY" 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 Integrations**.

<figure><img src="/files/msYSiS2XbdWDMFPtFNfD" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
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

### Overview

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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Slack** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/kfFrdHl6zJP0y6Z9c0Lh" alt="" 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 (individual user) from **My Integrations**

1. Open **Settings** (select your email/profile at the bottom of the left sidebar, then **Settings**).
2. Select **My Integrations**.
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 Integrations**.

<figure><img src="/files/Bjc891pZLr2m2bI9epQ0" alt="" width="563"><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
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”).

{% 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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Google Ads** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/TZak7AVunWM1S3e3DTkX" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/iWJaHLVHyrfwavzUFvCE" 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 Integrations**.

<figure><img src="/files/26Y0LN6dI8MT2wQrzuTH" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **Google BigQuery** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/ljcL7TrG3WgNsMnXeat4" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/5J1a0SwjXltLrgaB2mEm" 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 Integrations**.

<figure><img src="/files/IUpUnjfF67G1JW9bwFdx" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
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 (organization admin)

1. Open **Settings**.
2. Go to **Organization** → **Integrations**.
3. Find **GitLab** in the list.
4. Set the integration to **Active** (enabled).

<figure><img src="/files/qaAotzpjg79CDLjfkuIl" 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 (individual user) from **My Integrations**

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

<figure><img src="/files/WBrsgFG0tAq5Rnq3X4qb" 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 Integrations**.

<figure><img src="/files/2QLUK0fDyBWWvfoaRJV9" alt=""><figcaption></figcaption></figure>

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

1. Open **Chat** (or an Agent chat).
2. Select the **Tools** icon.
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 %}


# Gateway API


# Quickstart

## Quick start

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: <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.

### Team API Key

Within workspace:

1. Open **Settings**.
2. Select **Teams**.
3. Choose the team you want.
4. Open **API Keys**.
5. Select **Generate API Key**.

Make sure you save this API Key - you won't be able to access it again after closing the dialog.

{% hint style="info" %}
Each team can have its API Key with custom settings: models enabled, fallbacks, etc.
{% endhint %}

If needed, you can rotate the API Key within 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.

### User API Key

Within workspace:

1. Open **Settings** from the left sidebar.
2. Open **API Keys**.
3. Select **Generate API Key**.

Make sure you save this API Key - you won't be able to access it again after closing the dialog.

{% hint style="info" %}
Your API Key is set with custom settings: models enabled, fallbacks, etc. based on the team settings (made by org owner).
{% endhint %}

If needed, you can rotate the API Key within 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.

### Requirements

{% hint style="info" %}
API usage requires both a paid subscription and purchased API credits.

API credits are not included in your subscription.
{% endhint %}


# 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\`.<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: nexos-...` for a user key or `X-Api-Key: nexos-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"},"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"]}},"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"]},"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"}},"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."},"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"}}}},"guardrails":{"type":"object","description":"Results of the guardrail checks. Present when guardrails are configured for the company.\n","properties":{"validation_passed":{"type":"boolean","description":"Whether all guardrail checks passed."},"reask":{"type":"string","nullable":true,"description":"Reask prompt suggested by a failed guardrail, if any."},"error":{"type":"string","nullable":true,"description":"Guardrail processing error, if any."},"results":{"type":"array","description":"Individual guardrail check results.","items":{"type":"object","properties":{"type":{"type":"string","description":"The guardrail type (e.g. `detect_pii`)."},"result":{"type":"string","description":"The check outcome (e.g. `pass`)."},"target":{"type":"string","description":"Which side of the exchange was checked (`input` or `output`)."}}}}}}},"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","parameters":[{"in":"query","name":"fallbacks","schema":{"type":"string","enum":["true","false"]},"required":false,"description":"To use or not fallbacks in chat completion request"}],"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: nexos-...` for a user key or `X-Api-Key: nexos-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."},"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"},"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":{"type":"object","nullable":true,"description":"Additional details about why the model stopped, when available."},"usage":{"$ref":"#/components/schemas/Usage"},"container":{"$ref":"#/components/schemas/Container","nullable":true}},"required":["id","type","role","content","model","usage"]},"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"}},"required":["type","delta","usage"]},"MessageDelta":{"type":"object","description":"Top-level message delta carrying terminal stop_reason / stop_sequence.","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}}},"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","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/MessagesStreamEvent"}}}}}}}}}
```


# Responses

Create and manage model responses.

## Create a model response

> Creates a model 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: nexos-...` for a user key or `X-Api-Key: nexos-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","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"},"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."},"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","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponseRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/ResponseStreamEvent"}}}}},"description":"Creates a model response."}}}}
````

## 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: nexos-...` for a user key or `X-Api-Key: nexos-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"},"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."}}},"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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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"},"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."},"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: nexos-...` for a user key or `X-Api-Key: nexos-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"}}}}}}}}}
````

## Get input token counts

> Get input token counts.\
> \
> \*\*Note:\*\* this operation is currently rejected by the upstream providers of all\
> available models (it requires provider-side Responses API support that none of\
> the currently configured providers offer).<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: nexos-...` for a user key or `X-Api-Key: nexos-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":{"TokenCountsBody":{"properties":{"model":{"type":"string","description":"Model ID used to generate the response, like `gpt-4o` or `o3`.","nullable":true},"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},"tools":{"items":{"$ref":"#/components/schemas/responses_Tool"},"type":"array","description":"An array of tools the model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter.","nullable":true},"text":{"$ref":"#/components/schemas/ResponseTextParam","nullable":true},"reasoning":{"$ref":"#/components/schemas/Reasoning","description":"**gpt-5 and o-series models only**","nullable":true},"truncation":{"$ref":"#/components/schemas/TruncationEnum","description":"The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error."},"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},"conversation":{"$ref":"#/components/schemas/ConversationParam","nullable":true},"tool_choice":{"$ref":"#/components/schemas/ToolChoiceParam","nullable":true},"parallel_tool_calls":{"type":"boolean","description":"Whether to allow the model to run tool calls in parallel.","nullable":true}},"type":"object","required":[]},"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."},"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."},"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"},"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"},"TruncationEnum":{"type":"string","enum":["auto","disabled"]},"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."},"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."},"TokenCountsResource":{"properties":{"object":{"type":"string","enum":["response.input_tokens"],"default":"response.input_tokens"},"input_tokens":{"type":"integer"}},"type":"object","required":["object","input_tokens"],"title":"Token counts"}}},"paths":{"/v1/responses/input_tokens":{"post":{"tags":["Responses"],"summary":"Get input token counts","description":"Get input token counts.\n\n**Note:** this operation is currently rejected by the upstream providers of all\navailable models (it requires provider-side Responses API support that none of\nthe currently configured providers offer).\n","operationId":"GetInputTokenCounts","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCountsBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenCountsBody"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCountsResource"}}}}}}}}}
````


# Batches

Create and run large groups of requests asynchronously. Batches are only available for OpenAI models.

## Create batch

> Create and immediately start a batch from a file of requests that was uploaded beforehand.\
> \
> Batches are only available for OpenAI models.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Batches","description":"Create and run large groups of requests asynchronously. Batches are only available for OpenAI 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: nexos-...` for a user key or `X-Api-Key: nexos-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":{"BatchesRequest":{"type":"object","properties":{"input_file_id":{"type":"string","description":"The ID of an uploaded file that contains requests for the new batch.\n\nYour input file must be formatted as a JSONL file, and must be uploaded with the purpose set to \"batch\". The file can contain up to 50,000 requests, and can be up to 200 MB in size.\n"},"endpoint":{"type":"string","description":"The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.\n","enum":["/v1/chat/completions","/v1/embeddings","/v1/completions"]},"completion_window":{"type":"string","description":"The time frame within which the batch should be processed. Currently only \"24h\" is supported.\n","enum":["24h"],"default":"24h"},"metadata":{"type":"object","description":"Optional custom metadata for the batch. This can be useful for tracking and organizing batches.\n","additionalProperties":{"type":"string"}}},"required":["input_file_id","endpoint","completion_window"]},"Batch":{"type":"object","description":"A batch object representing a collection of requests processed together.\n","properties":{"id":{"type":"string","description":"The unique identifier of the batch.\n"},"object":{"type":"string","description":"The object type, which is always \"batch\".\n","enum":["batch"]},"endpoint":{"type":"string","description":"The endpoint used for the batch requests.\n","enum":["/v1/chat/completions","/v1/embeddings","/v1/completions"]},"errors":{"type":"object","description":"Details about any errors encountered during batch processing.\n","nullable":true,"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Error code indicating the type of error.\n"},"message":{"type":"string","description":"Human-readable error message.\n"},"param":{"type":"string","nullable":true,"description":"The parameter that caused the error, if applicable.\n"},"line":{"type":"integer","nullable":true,"description":"The line number in the input file where the error occurred.\n"}}}}}},"input_file_id":{"type":"string","description":"The ID of the input file used for the batch.\n"},"completion_window":{"type":"string","description":"The time frame within which the batch should be processed.\n"},"status":{"type":"string","description":"The current status of the batch.\n","enum":["validating","failed","in_progress","finalizing","completed","expired","cancelling","cancelled"]},"output_file_id":{"type":"string","nullable":true,"description":"The ID of the file containing the outputs of the batch requests. This is only available when the batch status is \"completed\".\n"},"error_file_id":{"type":"string","nullable":true,"description":"The ID of the file containing the errors of the batch requests. This is only available when there are errors in the batch.\n"},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the batch was created.\n"},"in_progress_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch started processing.\n"},"expires_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch will expire.\n"},"finalizing_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch started finalizing.\n"},"completed_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch was completed.\n"},"failed_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch failed.\n"},"expired_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch expired.\n"},"cancelling_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch cancellation was initiated.\n"},"cancelled_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch was cancelled.\n"},"request_counts":{"type":"object","description":"Statistics about the requests in the batch.\n","properties":{"total":{"type":"integer","description":"Total number of requests in the batch.\n"},"completed":{"type":"integer","description":"Number of requests that completed successfully.\n"},"failed":{"type":"integer","description":"Number of requests that failed.\n"}},"required":["total","completed","failed"]},"metadata":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to the batch. This can be useful for storing additional information about the batch in a structured format.\n","additionalProperties":{"type":"string"}}},"required":["id","object","endpoint","input_file_id","completion_window","status","created_at","request_counts"]}},"responses":{"BatchesResponse":{"description":"Batch retrieval response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}}}},"paths":{"/v1/batches":{"post":{"tags":["Batches"],"operationId":"post-batches-v1","summary":"Create batch","description":"Create and immediately start a batch from a file of requests that was uploaded beforehand.\n\nBatches are only available for OpenAI models.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchesRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/BatchesResponse"},"400":{"description":"Invalid request data."},"500":{"description":"Server error."}}}}}}
```

## Retrieve batch

> Look up a single batch by its ID, including its current status and metadata.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Batches","description":"Create and run large groups of requests asynchronously. Batches are only available for OpenAI 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: nexos-...` for a user key or `X-Api-Key: nexos-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":{"BatchesResponse":{"description":"Batch retrieval response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}}},"schemas":{"Batch":{"type":"object","description":"A batch object representing a collection of requests processed together.\n","properties":{"id":{"type":"string","description":"The unique identifier of the batch.\n"},"object":{"type":"string","description":"The object type, which is always \"batch\".\n","enum":["batch"]},"endpoint":{"type":"string","description":"The endpoint used for the batch requests.\n","enum":["/v1/chat/completions","/v1/embeddings","/v1/completions"]},"errors":{"type":"object","description":"Details about any errors encountered during batch processing.\n","nullable":true,"properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Error code indicating the type of error.\n"},"message":{"type":"string","description":"Human-readable error message.\n"},"param":{"type":"string","nullable":true,"description":"The parameter that caused the error, if applicable.\n"},"line":{"type":"integer","nullable":true,"description":"The line number in the input file where the error occurred.\n"}}}}}},"input_file_id":{"type":"string","description":"The ID of the input file used for the batch.\n"},"completion_window":{"type":"string","description":"The time frame within which the batch should be processed.\n"},"status":{"type":"string","description":"The current status of the batch.\n","enum":["validating","failed","in_progress","finalizing","completed","expired","cancelling","cancelled"]},"output_file_id":{"type":"string","nullable":true,"description":"The ID of the file containing the outputs of the batch requests. This is only available when the batch status is \"completed\".\n"},"error_file_id":{"type":"string","nullable":true,"description":"The ID of the file containing the errors of the batch requests. This is only available when there are errors in the batch.\n"},"created_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the batch was created.\n"},"in_progress_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch started processing.\n"},"expires_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch will expire.\n"},"finalizing_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch started finalizing.\n"},"completed_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch was completed.\n"},"failed_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch failed.\n"},"expired_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch expired.\n"},"cancelling_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch cancellation was initiated.\n"},"cancelled_at":{"type":"integer","nullable":true,"description":"The Unix timestamp (in seconds) for when the batch was cancelled.\n"},"request_counts":{"type":"object","description":"Statistics about the requests in the batch.\n","properties":{"total":{"type":"integer","description":"Total number of requests in the batch.\n"},"completed":{"type":"integer","description":"Number of requests that completed successfully.\n"},"failed":{"type":"integer","description":"Number of requests that failed.\n"}},"required":["total","completed","failed"]},"metadata":{"type":"object","nullable":true,"description":"Set of 16 key-value pairs that can be attached to the batch. This can be useful for storing additional information about the batch in a structured format.\n","additionalProperties":{"type":"string"}}},"required":["id","object","endpoint","input_file_id","completion_window","status","created_at","request_counts"]}}},"paths":{"/v1/batches/{batch_id}":{"get":{"tags":["Batches"],"operationId":"get-batch-v1","summary":"Retrieve batch","description":"Look up a single batch by its ID, including its current status and metadata.","parameters":[{"name":"batch_id","in":"path","required":true,"description":"The ID of the batch to retrieve","schema":{"type":"string"}},{"name":"model","in":"query","schema":{"type":"string"},"deprecated":true}],"responses":{"200":{"$ref":"#/components/responses/BatchesResponse"},"400":{"description":"Invalid batch ID format or malformed request"},"404":{"description":"Batch not found"},"500":{"description":"Internal server error"}}}}}}
```


# Files

Upload and manage files used by other endpoints.

## List files

> Return the list of files that have been uploaded.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Files","description":"Upload and manage files used by other endpoints."}],"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: nexos-...` for a user key or `X-Api-Key: nexos-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/FileResponse"}},"object":{"type":"string","description":"The object type, which is always list.","enum":["list"]},"hasMore":{"type":"boolean","description":"Indicates if there are more items to be fetched."},"firstId":{"type":"string","description":"The ID of the first item in the list."},"lastId":{"type":"string","description":"The ID of the last item in the list."}},"required":["data","object"]},"FileResponse":{"type":"object","description":"A document that has been uploaded and can be referenced by other endpoints.","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."},"expires_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the file will expire."},"filename":{"type":"string","description":"The name of the file."},"id":{"type":"string","description":"The file identifier, which can be referenced in the API endpoints."},"object":{"type":"string","description":"The object type, which is always \"file\".","enum":["file"]},"purpose":{"$ref":"#/components/schemas/FilePurposeType"},"status":{"type":"string","description":"Deprecated. The current status of the file.","deprecated":true,"enum":["uploaded","processed","error"]}}}}},"paths":{"/v1/files":{"get":{"operationId":"get-files-v1","summary":"List files","tags":["Files"],"description":"Return the list of files that have been uploaded.","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","minimum":1,"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"}}}},"500":{"description":"Server error."},"4XX":{"description":"Client error."}}}}}}
```

## Upload file

> Upload a file that other endpoints can reference, such as the request file consumed by the Batch API.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Files","description":"Upload and manage files used by other endpoints."}],"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: nexos-...` for a user key or `X-Api-Key: nexos-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":{"UploadFileRequest":{"type":"object","additionalProperties":false,"properties":{"file":{"description":"The File object (not file name) to be uploaded.\n","type":"string","format":"binary"},"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"]},"FileResponse":{"type":"object","description":"A document that has been uploaded and can be referenced by other endpoints.","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."},"expires_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the file will expire."},"filename":{"type":"string","description":"The name of the file."},"id":{"type":"string","description":"The file identifier, which can be referenced in the API endpoints."},"object":{"type":"string","description":"The object type, which is always \"file\".","enum":["file"]},"purpose":{"$ref":"#/components/schemas/FilePurposeType"},"status":{"type":"string","description":"Deprecated. The current status of the file.","deprecated":true,"enum":["uploaded","processed","error"]}}}}},"paths":{"/v1/files":{"post":{"operationId":"post-files-v1","summary":"Upload file","tags":["Files"],"description":"Upload a file that other endpoints can reference, such as the request file consumed by the Batch API.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadFileRequest"}}}},"responses":{"200":{"description":"Successful response with file upload details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"400":{"description":"Invalid request data."},"500":{"description":"Server error."}}}}}}
```

## Get file

> Return the metadata for a single file by its ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Files","description":"Upload and manage files used by other endpoints."}],"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: nexos-...` for a user key or `X-Api-Key: nexos-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":{"FileResponse":{"type":"object","description":"A document that has been uploaded and can be referenced by other endpoints.","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."},"expires_at":{"type":"integer","description":"The Unix timestamp (in seconds) for when the file will expire."},"filename":{"type":"string","description":"The name of the file."},"id":{"type":"string","description":"The file identifier, which can be referenced in the API endpoints."},"object":{"type":"string","description":"The object type, which is always \"file\".","enum":["file"]},"purpose":{"$ref":"#/components/schemas/FilePurposeType"},"status":{"type":"string","description":"Deprecated. The current status of the file.","deprecated":true,"enum":["uploaded","processed","error"]}}},"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"]}}},"paths":{"/v1/files/{file_id}":{"get":{"operationId":"get-file-v1","summary":"Get file","tags":["Files"],"description":"Return the metadata for a single file by its 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/FileResponse"}}}},"404":{"description":"File not found."},"500":{"description":"Server error."}}}}}}
```

## Delete file

> Permanently delete a single file by its ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Files","description":"Upload and manage files used by other endpoints."}],"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: nexos-...` for a user key or `X-Api-Key: nexos-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":{"DeletionStatusResponse":{"type":"object","description":"The status of a file deletion.","properties":{"id":{"type":"string","description":"The file identifier."},"object":{"type":"string","description":"The object type, which is always file.","enum":["file"]},"deleted":{"type":"boolean","description":"Indicates whether the file has been deleted."}},"required":["id","object","deleted"]}}},"paths":{"/v1/files/{file_id}":{"delete":{"operationId":"delete-file-v1","summary":"Delete file","tags":["Files"],"description":"Permanently delete a single file by its 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/DeletionStatusResponse"}}}},"404":{"description":"File not found."},"500":{"description":"Server error."}}}}}}
```

## Get file contents

> Download the raw contents of a single file by its ID.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Files","description":"Upload and manage files used by other endpoints."}],"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: nexos-...` for a user key or `X-Api-Key: nexos-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/files/{file_id}/content":{"get":{"operationId":"get-file-contents-v1","summary":"Get file contents","tags":["Files"],"description":"Download the raw contents of a single file by its 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"}}}},"404":{"description":"File not found."},"500":{"description":"Server error."}}}}}}
```


# 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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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 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 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: nexos-...` for a user key or `X-Api-Key: nexos-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"]}},"responses":{"ImagesResponse":{"description":"Represents an image response returned by model, based on the provided input.","content":{"application/json":{"schema":{"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"]}}}},"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."}}}}}}
```


# 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: nexos-...` for a user key or `X-Api-Key: nexos-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."}}}}}}
```


# 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: nexos-...` for a user key or `X-Api-Key: nexos-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"]},"list_files_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/list_files_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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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."},"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,"description":"Maximum number of context (input) tokens the model supports."},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"endpoints":{"$ref":"#/components/schemas/Endpoints"},"region":{"$ref":"#/components/schemas/ModelRegion"}},"required":["id","object","created","updated","name","owned_by"]},"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"}},"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","speech_generation","transcription","translation","moderation"]}},"ModelRegion":{"type":"string","description":"Region the model is hosted in.","enum":["EU","US","OTHER"]}}},"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: nexos-...` for a user key or `X-Api-Key: nexos-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,"description":"Maximum number of context (input) tokens the model supports."},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"endpoints":{"$ref":"#/components/schemas/Endpoints"},"region":{"$ref":"#/components/schemas/ModelRegion"},"provider":{"type":"string","description":"Company providing the model."},"available":{"type":"boolean","description":"If true, model is already assigned to user's team."}},"required":["id","object","created","updated","name","owned_by","available","region"]},"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"}},"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","speech_generation","transcription","translation","moderation"]}},"ModelRegion":{"type":"string","description":"Region the model is hosted in.","enum":["EU","US","OTHER"]}}},"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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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 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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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

> 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: nexos-...` for a user key or `X-Api-Key: nexos-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."},"target_type":{"type":"string","description":"The target type of the budget limit. Only team or user are supported for new limits.","enum":["company","team","user"]},"target_uuid":{"type":"string","description":"The UUID of the target (team or user)."},"limit_type":{"type":"string","description":"The type of budget limit.","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."},"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","limit_type","is_renewed","created_at","updated_at"]}}},"paths":{"/v1/companies/{companyId}/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":"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."}}}}}}
```

## Upsert a budget limit

> Create or update a budget limit for a 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: nexos-...` for a user key or `X-Api-Key: nexos-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","properties":{"target_type":{"type":"string","description":"The target type of the budget limit (only team or user are supported).","enum":["team","user"]},"target_uuid":{"type":"string","description":"The UUID of the target (team or user). Empty string for default budget"},"limit_type":{"type":"string","description":"The type of budget limit.","enum":["general","public-api"]},"is_renewed":{"type":"boolean","description":"Whether the budget limit is renewed periodically."},"value":{"type":"integer","format":"int64","description":"The budget limit value.","nullable":true}},"required":["target_type","target_uuid","limit_type","is_renewed","value"]},"CompanyBudgetLimit":{"type":"object","properties":{"company_uuid":{"type":"string","description":"The UUID of the company."},"target_type":{"type":"string","description":"The target type of the budget limit. Only team or user are supported for new limits.","enum":["company","team","user"]},"target_uuid":{"type":"string","description":"The UUID of the target (team or user)."},"limit_type":{"type":"string","description":"The type of budget limit.","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."},"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","limit_type","is_renewed","created_at","updated_at"]}},"responses":{"CompanyBudgetLimitResponse":{"description":"A single company budget limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyBudgetLimit"}}}}}},"paths":{"/v1/companies/{companyId}/budget_limits":{"put":{"operationId":"put-company-budget-limits-v1","summary":"Upsert a budget limit","tags":["Budget Limit Management"],"description":"Create or update a budget limit for a company.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The UUID of the company.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCompanyBudgetLimitRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/CompanyBudgetLimitResponse"},"400":{"description":"Invalid request data."}}}}}}
```

## Delete a budget limit

> Delete a specific budget limit for a 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: nexos-...` for a user key or `X-Api-Key: nexos-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":{"DeleteCompanyBudgetLimitRequest":{"type":"object","properties":{"target_type":{"type":"string","description":"The target type of the budget limit (only team or user are supported).","enum":["team","user"]},"target_uuid":{"type":"string","description":"The UUID of the target (team or user)."},"limit_type":{"type":"string","description":"The type of budget limit.","enum":["general","public-api"]}},"required":["target_type","limit_type","target_uuid"]}}},"paths":{"/v1/companies/{companyId}/budget_limits":{"delete":{"operationId":"delete-company-budget-limits-v1","summary":"Delete a budget limit","tags":["Budget Limit Management"],"description":"Delete a specific budget limit for a company.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The UUID of the company.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCompanyBudgetLimitRequest"}}}},"responses":{"204":{"description":"Budget limit deleted successfully."},"404":{"description":"Budget limit not found."}}}}}}
```

## Bulk upsert and delete budget limits

> Apply many budget-limit changes for a company in a single call. Each item is upserted by default; items with \`remove: true\` delete the matching row identified by \`(company\_uuid, target\_type, target\_uuid, limit\_type)\`.

```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: nexos-...` for a user key or `X-Api-Key: nexos-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","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BulkUpsertCompanyBudgetLimitItem"}}},"required":["items"]},"BulkUpsertCompanyBudgetLimitItem":{"type":"object","properties":{"target_type":{"type":"string","description":"The target type of the budget limit (only team or user are supported).","enum":["team","user"]},"target_uuid":{"type":"string","description":"The UUID of the target (team or user). Empty string for default budget."},"limit_type":{"type":"string","description":"The type of budget limit.","enum":["general","public-api"]},"is_renewed":{"type":"boolean","description":"Whether the budget limit is renewed periodically."},"value":{"type":"integer","format":"int64","description":"The budget limit value. Ignored when remove is true."},"remove":{"type":"boolean","description":"When true, the matching row is deleted instead of upserted."}},"required":["target_type","target_uuid","limit_type","is_renewed"]},"CompanyBudgetLimit":{"type":"object","properties":{"company_uuid":{"type":"string","description":"The UUID of the company."},"target_type":{"type":"string","description":"The target type of the budget limit. Only team or user are supported for new limits.","enum":["company","team","user"]},"target_uuid":{"type":"string","description":"The UUID of the target (team or user)."},"limit_type":{"type":"string","description":"The type of budget limit.","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."},"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","limit_type","is_renewed","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/{companyId}/budget_limits/bulk":{"put":{"operationId":"put-company-budget-limits-bulk-v1","summary":"Bulk upsert and delete budget limits","tags":["Budget Limit Management"],"description":"Apply many budget-limit changes for a company in a single call. Each item is upserted by default; items with `remove: true` delete the matching row identified by `(company_uuid, target_type, target_uuid, limit_type)`.","parameters":[{"name":"companyId","in":"path","required":true,"description":"The UUID of the company.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpsertCompanyBudgetLimitRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/CompanyBudgetLimitListResponse"},"400":{"description":"Invalid request data."}}}}}}
```


# Integrations


# Codex CLI

### What is Codex CLI? <a href="#what-is-codex-cli" id="what-is-codex-cli"></a>

Codex CLI is OpenAI's open-source command-line coding agent that runs locally from your terminal. It can read, change, and run code on your machine in the selected directory, providing a powerful AI-powered development assistant directly in your workflow. Built to help developers write features, answer questions about codebases, fix bugs, and propose pull requests for review, Codex CLI brings autonomous AI assistance to your local development environment.

**Key features:**

* **Local Code Execution**\
  Runs directly on your machine, reading and modifying files in your project directory with full access to your local environment.
* **Interactive Terminal Mode**\
  Supports interactive conversations, allowing you to resume previous sessions and iterate on tasks through natural-language interactions.
* **Multi-Model Support**\
  Works with various AI models and supports custom model providers via configuration file, enabling flexibility in choosing your preferred LLM backend.
* **Code Generation & Refactoring**\
  Instantly generates code snippets, refactors functions, and implements new features based on your prompts.
* **Intelligent Reasoning**\
  Leverages advanced reasoning capabilities to understand complex codebases and provide context-aware solutions.
* **Image Input Support**\
  Can process image inputs for visual context, enabling more comprehensive understanding of design specifications or diagrams.
* **Web Search Integration**\
  Built-in web search capability to find relevant documentation and solutions while coding.
* **Local Code Review**\
  Performs automated code reviews on your local changes before committing.
* **Version Control Integration**\
  Everything runs under version control, sandboxed and limited to the selected working directory for safety.
* **Custom Provider Configuration**\
  Supports custom model providers via config file without requiring source code modifications.

***

### How to Connect Codex CLI with nexos.ai <a href="#how-to-connect-codex-cli-with-nexos.ai" id="how-to-connect-codex-cli-with-nexos.ai"></a>

To connect **nexos.ai API** with **Codex CLI**, follow these steps:

#### 1. Install Codex CLI <a href="#id-1.-install-codex-cli" id="id-1.-install-codex-cli"></a>

**Option A: Using npm (All platforms)**

Install the Codex CLI globally using npm:

```
npm install -g @openai/codex
```

**Option B: Using Homebrew (macOS)**

On macOS, you can also install Codex CLI using Homebrew:

```
brew install codex
```

#### 2. Set Up Your API Key <a href="#id-2.-set-up-your-api-key" id="id-2.-set-up-your-api-key"></a>

Export your API key as an environment variable. Add this to your shell profile (e.g., `~/.bashrc`, `~/.zshrc`, or `~/.bash_profile`):

```
export NEXOS_AI_API_KEY="your-team-api-key-here"
```

Then reload your shell configuration:

```
source ~/.bashrc  # or ~/.zshrc depending on your shell
```

#### 3. Configure Codex CLI <a href="#id-3.-configure-codex-cli" id="id-3.-configure-codex-cli"></a>

Create or edit the configuration file at `~/.codex/config.toml`:

```
model = "<your-model-uuid-or-name>"

[model_providers.nexosai]
name = "nexos.ai"
base_url = "https://api.nexos.ai/v1"
env_key = "NEXOS_AI_API_KEY"
# Use "responses" for models supporting the responses endpoint (e.g., OpenAI models)
# Use "chat" for models that do not support the responses endpoint (e.g., some Claude models)
wire_api = "responses"
model_verbosity = "high"
```

**Configuration Options Explained:**

| **Option**        | **Description**                                                                                                                                     |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`           | The model UUID or name from nexos.ai that you want to use as default                                                                                |
| `name`            | Display name for the provider                                                                                                                       |
| `base_url`        | nexos.ai API endpoint: `https://api.nexos.ai/v1`                                                                                                    |
| `env_key`         | The environment variable name containing your API key                                                                                               |
| `wire_api`        | API format - use `"responses"` for models supporting the responses endpoint, or `"chat"` for models that only support the chat completions endpoint |
| `model_verbosity` | Level of model output detail (`"high"`, `"medium"`, or `"low"`)                                                                                     |

> **Note:** If you encounter issues with certain models, try switching `wire_api` from `"responses"` to `"chat"`. Some models (particularly non-OpenAI models) may not support the responses endpoint and require the chat completions API instead.

#### 4. (Optional) Configure Project Trust Levels <a href="#id-4.-optional-configure-project-trust-levels" id="id-4.-optional-configure-project-trust-levels"></a>

For specific project directories, you can set trust levels:

```
model = "<your-model-uuid-or-name>"

[projects."/Users/[user]/code/your-project"]
trust_level = "untrusted"

[model_providers.nexosai]
name = "nexos.ai"
base_url = "https://api.nexos.ai/v1"
env_key = "NEXOS_AI_API_KEY"
# Use "responses" for models supporting the responses endpoint (e.g., OpenAI models)
# Use "chat" for models that do not support the responses endpoint (e.g., some Claude models)
wire_api = "responses"
model_verbosity = "high"

```

**Trust levels:**

* `untrusted` - Codex will ask for confirmation before executing commands
* `trusted` - Allows automatic execution within the project scope

#### 5. Start Using Codex CLI <a href="#id-5.-start-using-codex-cli" id="id-5.-start-using-codex-cli"></a>

Navigate to your project directory and run Codex CLI with the nexos.ai provider:

```
codex --config model_provider="nexosai"
```

Or run with a specific prompt:

```
codex --config model_provider="nexosai" "explain this codebase structure"
```

> **Note:** The `--config model_provider="nexosai"` flag tells Codex CLI to use the [nexos.ai](http://nexos.ai/) provider defined in your configuration file.

***

### Using Different Models <a href="#using-different-models" id="using-different-models"></a>

#### Fetching Available Models <a href="#fetching-available-models" id="fetching-available-models"></a>

You can retrieve the list of all available models for you using the API:

```
curl -X GET "https://api.nexos.ai/v1/models" \
  -H "Authorization: Bearer $NEXOS_AI_API_KEY"
```

> **API Reference:** See the full API documentation at [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-models)

#### Configuring Models <a href="#configuring-models" id="configuring-models"></a>

You can use **either the model name or UUID** in your configuration. Update the `model` value in your `~/.codex/config.toml`:

```
# Using model UUID
model = "6ff8398f-9276-4756-a9f2-f66b069f1d32"

# Or any other model available in your nexos.ai workspace
model = "claude-opus-4-1-20250805"
```

***

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

| **Issue**               | **Solution**                                                                                                   |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- |
| Authentication errors   | Verify `NEXOS_AI_API_KEY` is correctly set in your environment                                                 |
| Model not found         | Use the models API endpoint to fetch available models and confirm the model name/UUID exists in your workspace |
| Config not loading      | Ensure the config file is at `~/.codex/config.toml` with correct TOML syntax                                   |
| Provider not recognized | Make sure to use `--config model_provider="nexosai"` when running codex                                        |
| API format errors       | Try switching `wire_api` from `"responses"` to `"chat"` if your model doesn't support the responses endpoint   |

***

### Benefits of Using nexos.ai with Codex CLI <a href="#benefits-of-using-nexos.ai-with-codex-cli" id="benefits-of-using-nexos.ai-with-codex-cli"></a>

By routing Codex CLI through nexos.ai, you gain access to:

* **Multiple LLMs** - Switch between different models (Claude, GPT, and others) without changing configurations
* **Cost Tracking** - Monitor AI spend with usage visibility across teams
* **Intelligent Caching** - Reduce redundant API calls and optimize costs
* **Centralized Logging** - Full observability for every prompt and operation
* **Load Balancing** - Automatic failover to keep your development workflow reliable


# CrewAI

#### **What is crewAI?**

CrewAI is an open-source Python framework for orchestrating autonomous, role-playing AI agents that collaborate to complete complex tasks. It is designed to facilitate the development and management of multi-agent AI systems and is used in a variety of applications, from content creation to financial analysis.

**Key features:**

* Role-Based Architecture: Agents are assigned specific roles and backstories, defining their capabilities and responsibilities within the "crew".
* Agent Orchestration: The framework manages how agents interact, communicate, and work together seamlessly to achieve a common goal.
* Tools and Integrations: Agents can be equipped with tools, such as web search engines, to interact with the outside world and gather information. It integrates with multiple Large Language Model (LLM) providers, giving users flexibility in model choice.
* Flows: A feature that allows developers to create structured, event-driven workflows, manage state, and control execution flow for multi-step processes.
* Scalability and Flexibility: The framework is built to be fast, lean, and production-ready, suitable for developing both basic and complex applications.

&#x20;

Connecting **crewAI** with nexos.a&#x69;**’s models and assistants** gives teams instant, secure workflow intelligence. Every interaction uses authenticated **API‑key access**, ensuring sensitive company data remains safe within nexos.ai while providing full observability and control over API usage.

&#x20;

To connect your nexos.ai **API** and **crewAI UI** go through the following steps:

1. **Generate your personal API key**

Log in to your nexos.ai account and head over to the User profile section by clicking on the profile bubble in the top right corner of the UI.

<figure><img src="/files/H3ca3oHkU6XjfPrDJkrO" alt=""><figcaption></figcaption></figure>

&#x20;                                                         How to generate a personal API key

2. **Create LLM Connection**

Navigate to LLM Connections and create a connection that will route through nexos.ai. Add custom models and define them by UUID or Name.

* Fill in the **LLM Connection Name**.
* Select **custom-openai-compatible** as the provider.
* Set the `OPENAI_BASE_URL` to `https://api.nexos.ai/v1` .
* Fill in the `OPENAI_API_KEY` with the **team-api-key** or generated in the previous step.
* Create custom models to match nexos.ai model names or **UUIDs**.
* Submit by clicking the **Add Connection** button.

<figure><img src="/files/6anhZSCbLu6haGmESc6R" alt=""><figcaption></figcaption></figure>

3. **Configure and execute workflow**\
   With the configuration already set up, we can move to creating a fresh project and us nexos.ai as a proxy to the LLMs

<figure><img src="/files/E8j0FCCteY7poaW3XdvV" alt=""><figcaption></figcaption></figure>

Try out your workflow to see if the nodes have been configured correctly.

4. **CrewAI offers CLI as well**

This setup guides you through integrating CrewAI with NexosAI using a convenient command-line interface.

* Install dependencies.
* Define environment variables:\
  `NEXOS_API_KEY=team-api-key`\
  `NEXOS_BASE_URL=https://api.nexos.ai/v1`<br>

**Sample implementation using nexos.ai**

```
import os

from crewai import Agent, Task, Crew, LLM
from dotenv import load_dotenv

# Load environment variables from .env file
load_dotenv()
# --- Configuration ---
NEXOS_BASE_URL = os.getenv("NEXOS_BASE_URL")
NEXOS_API_KEY = os.getenv("NEXOS_API_KEY")
if not NEXOS_BASE_URL or not NEXOS_API_KEY:
    raise ValueError("Please set NEXOS_BASE_URL and NEXOS_API_KEY in your .env file")


# Configure the LLM via LangChain's client, pointing to Nexos
nexos_llm = LLM(
    model="GPT 5 mini", # or any other OpenAI-compatible model / assistant ID available at nexos.ai 
    base_url=NEXOS_BASE_URL, # e.g. "https://api.nexos.ai/v1"
    api_key=NEXOS_API_KEY
)

# Define an agent that uses the Nexos-configured LLM
researcher = Agent(
    role='Researcher',
    goal='Gather information about the most popular programming languages in 2023.',
    backstory='You are an AI researcher specializing in technology trends.',
    llm=nexos_llm,  # Pass the configured LLM
    allow_delegation=False #  Keep delegation off for a simple example
)

# Define a task:  Ask the researcher to gather information about programming languages.
task = Task(
    description='Research and summarize the five most popular programming languages in 2023, including their key features and use cases. Provide a concise paragraph for each language.',
    expected_output='A summary of the five most popular programming languages in 2023, including their key features and use cases.',
    agent=researcher
)

# Create a crew with the researcher agent and the task.
research_crew = Crew(agents=[researcher], tasks=[task], verbose=True)

# Kick off the crew to execute the task.
result = research_crew.kickoff()

# Print the results.
print(result)
print("CrewAI Agent configured to use Nexos LLM and completed a task.")

```

You can use any open AI compatible model. To check what models are available for you, call [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-models) You can use either `nexos_model_id`or `id` as model.


# OpenCode

### What is OpenCode? <a href="#what-is-opencode" id="what-is-opencode"></a>

OpenCode is an open-source AI coding agent designed to bring powerful AI assistance directly to your development workflow. It's a Go-based CLI application that brings AI assistance to your terminal, providing a TUI (Terminal User Interface) for intelligent coding assistance. It's available as a terminal-based interface, desktop application, or IDE extension, helping developers write, understand, and improve code more efficiently.

**Key features:**

* **Multi-Platform Support**\
  Available as a terminal-based interface, desktop application, or IDE extension to fit your preferred development environment.
* **Flexible LLM Provider Support**\
  Works with any LLM provider by configuring API keys, including Claude, GPT, Gemini, and any OpenAI-compatible endpoints.
* **Intelligent Code Generation**\
  Produces high-quality code snippets, functions, and modules based on natural-language prompts.
* **Built-in Agents**\
  Comes with two built-in primary agents (Build and Plan) that you can customize or extend with your own.
* **Custom Tools Support**\
  Define your own functions that the LLM can call through custom tools in your config file.
* **Custom Rules & Instructions**\
  Provide custom instructions through an AGENTS.md file, similar to Cursor's rules.
* **GitHub Integration**\
  Install the GitHub agent directly in your repository for CI/CD workflows.

***

### Integrating OpenCode with [nexos.ai](http://nexos.ai/) <a href="#integrating-opencode-with-nexos.ai" id="integrating-opencode-with-nexos.ai"></a>

To connect your [nexos.ai](http://nexos.ai/) **API Gateway** with **OpenCode**, follow these steps:

#### 1. Install OpenCode <a href="#id-1.-install-opencode" id="id-1.-install-opencode"></a>

OpenCode can be installed using multiple methods:

&#x20;**Using the install script (recommended):**

```
curl -fsSL https://opencode.ai/install | bash
```

**Using Homebrew (macOS/Linux):**

We recommend using the OpenCode tap for the most up-to-date releases. The official `brew install opencode` formula is maintained by the Homebrew team and may lag behind:

```
brew install anomalyco/tap/opencode
```

**Using npm:**

```
npm install -g opencode
```

**Desktop Application:**

OpenCode is also available as a desktop application. Install via Homebrew cask:

```
brew install --cask opencode-desktop
```

Or download directly from [opencode.ai/download](https://opencode.ai/download).

***

#### 2. Configuration <a href="#id-2.-configuration" id="id-2.-configuration"></a>

OpenCode uses JSON configuration files to manage providers and settings. **The configuration file is not created automatically during installation** — you need to create it manually. The configuration supports both JSON and JSONC (JSON with Comments) formats.

**Configuration file locations (in order of precedence):**

* `$HOME/.opencode.json`
* `$XDG_CONFIG_HOME/opencode/.opencode.json`
* `./.opencode.json` (project root — highest precedence)

You can also specify a custom config directory using the `OPENCODE_CONFIG_DIR` environment variable.

**To create the global config:**

```
mkdir -p ~/.config/opencode
touch ~/.config/opencode/opencode.json
```

Then add the [nexos.ai](http://nexos.ai/) provider configuration:

```
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "nexosai": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "nexos.ai",
      "options": {
        "baseURL": "https://api.nexos.ai/v1"
      },
      "models": {
        "Claude Opus 4.5": {},
        "claude-haiku-4-5-20251001": {},
        "gpt-4.1": {},
        "gpt-4o-mini": {},
        "gemini-2.5-pro": {}
      }
    }
  },
  "model": "nexosai/Claude Opus 4.5",
  "small_model": "nexosai/claude-haiku-4-5-20251001"
}

```

**Configuration breakdown:**

* `npm`: The SDK package to use — `@ai-sdk/openai-compatible` is used for any OpenAI-compatible API
* `name`: The display name for the provider in the UI
* `options.baseURL`: The endpoint for the API ([nexos.ai](http://nexos.ai/) gateway)
* `models`: An object where each key is a model name; values can be empty `{}` or include optional properties like `maxTokens` (defaults to 32000)
* `model`: The active model in format `provider-key/model-name`
* `small_model`: Model used for lighter tasks to optimize costs

> **Tip:** The config file has a schema defined at `opencode.ai/config.json` — your editor should be able to validate and autocomplete based on the schema.

> **Finding Available Models:** You can fetch all available models from your [nexos.ai](http://nexos.ai/) gateway using the API endpoint `GET /v1/models`. See the <https://docs.nexos.ai/gateway-api#get-v1-models> for details.

***

#### 3. Configure API Credentials <a href="#id-3.-configure-api-credentials" id="id-3.-configure-api-credentials"></a>

API keys are securely stored separately from your configuration. To add your [nexos.ai](http://nexos.ai/) API key, use the `/connect` command within OpenCode:

```
opencode
```

Once OpenCode starts, run:

```
/connect
```

1. Select **"Other"** to add a custom provider
2. Enter `nexosai` as the provider name (must match the key in your config)
3. Paste your [nexos.ai](http://nexos.ai/) team/user API key

The key will be securely stored in `~/.local/share/opencode/auth.json`.

**Alternative: Manual auth.json configuration**

You can also manually create or edit the auth file:

```
mkdir -p ~/.local/share/opencode
touch ~/.local/share/opencode/auth.json
```

Then add your API key:

```
{
  "nexosai": "{YOUR_TEAM_API_KEY}"
}
```

***

#### 4. Start Using OpenCode with [nexos.ai](http://nexos.ai/) <a href="#id-4.-start-using-opencode-with-nexos.ai" id="id-4.-start-using-opencode-with-nexos.ai"></a>

Launch OpenCode in your terminal:

```
opencode
```

OpenCode will now route all AI requests through the [nexos.ai](http://nexos.ai/) API Gateway, giving you access to multiple LLM providers through a single, unified endpoint.

***

### Advanced Configuration <a href="#advanced-configuration" id="advanced-configuration"></a>

#### Built-in Agents Configuration <a href="#built-in-agents-configuration" id="built-in-agents-configuration"></a>

OpenCode comes with two built-in primary agents: **Build** and **Plan**.

* **Build:** The default primary agent with all tools enabled. It can read and write files, run commands, and make changes to your codebase.
* **Plan:** A restricted agent that handles planning and code analysis without making changes. Tool access is limited so it can only suggest how to implement features.

You can customize the built-in agents using the `agent` field (singular) in your configuration. Each agent supports the following options:

| Option          | Description                                                        |
| --------------- | ------------------------------------------------------------------ |
| `model`         | The model to use for this agent (e.g., `nexosai/Claude Opus 4.5`)  |
| `prompt`        | Custom system prompt for the agent                                 |
| `prompt_append` | Additional text to append to the default prompt                    |
| `temperature`   | Sampling temperature for the model                                 |
| `top_p`         | Top-p sampling parameter                                           |
| `tools`         | Object to enable/disable specific tools (set to `true` or `false`) |
| `disable`       | Set to `true` to disable this agent entirely                       |
| `description`   | Description shown in the UI                                        |

**Example configuration with agent customization:**

```
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "nexosai": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "nexos.ai",
      "options": {
        "baseURL": "https://api.nexos.ai/v1"
      },
      "models": {
        "Claude Opus 4.5": {},
        "claude-haiku-4-5-20251001": {},
        "gpt-4.1": {}
      }
    }
  },
  "model": "nexosai/claude-haiku-4-5-20251001",
  "small_model": "nexosai/gpt-4o-mini",
  "agent": {
    "plan": {
      "model": "nexosai/Claude Opus 4.5",
      "description": "Strategic planning with high-capability model",
      "prompt_append": "Always consider security implications in your plans."
    }
  }
}

```

#### Custom Agents with Markdown Files <a href="#custom-agents-with-markdown-files" id="custom-agents-with-markdown-files"></a>

For creating entirely new custom agents, use markdown files placed in dedicated directories:

* **Global:** `~/.config/opencode/agents/`
* **Per-project:** `.opencode/agents/`

The markdown file name becomes the agent name. For example, `code-reviewer.md` creates a `code-reviewer` agent.

Example `~/.config/opencode/agents/code-reviewer.md`:

```
---
model: nexosai/Claude Opus 4.5
description: Senior code reviewer focusing on security
tools:
  write: false
  bash: false
---

You are a senior code reviewer focusing on security and performance.
Review code for potential vulnerabilities, performance bottlenecks, and best practices.
Do not make changes directly - only provide recommendations.
```

***

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

#### Configuration Validation Errors <a href="#configuration-validation-errors" id="configuration-validation-errors"></a>

**Error:** `Invalid input: expected record, received array provider.nexosai.models`

This error occurs when the `models` field is defined as an array instead of an object. Each model must be a key-value pair where:

* The key is the model name (string)
* The value is an object (can be empty `{}` or contain optional properties like `maxTokens`)

**Incorrect:**

```
"models": ["Claude Opus 4.5", "gpt-4.1"]
```

**Correct:**

```
"models": {
  "Claude Opus 4.5": {},
  "gpt-4.1": {}
}
```

**Error:** `Invalid input: expected record, received string provider`

This error occurs when the `provider` field is a string instead of an object. The provider must be an object containing your provider configuration.

**Error:** `Unrecognized key: "agents"`

The correct field name is `agent` (singular), not `agents` (plural). For custom agents, use markdown files in the agents directory instead.

#### Base URL Issues <a href="#base-url-issues" id="base-url-issues"></a>

If you're getting connection errors, verify that the `baseURL` in your config matches includes full url (including /v1): <https://api.nexos.ai/v1>

#### Model Reference Format <a href="#model-reference-format" id="model-reference-format"></a>

Ensure your model references use the format `provider-key/model-name` (e.g., `nexosai/Claude Opus 4.5`).

***

### Verification <a href="#verification" id="verification"></a>

To verify your [nexos.ai](http://nexos.ai/) integration is working:

1. Start OpenCode: `opencode`
2. Run the `/models` command to see available models
3. Press `Tab` to switch between Plan and Build agents
4. Try a simple prompt to confirm connectivity

You should see your configured [nexos.ai](http://nexos.ai/) models available and responses coming through the [nexos.ai](http://nexos.ai/) gateway, with all the benefits of load balancing, cost tracking, and observability that the platform provides.


# Claude Code

### What is Claude Code?

Claude Code is an AI-powered coding assistant designed to help developers write, understand, and improve code more efficiently. Built on Anthropic's Claude models, it provides interactive coding support directly within your development workflow. Claude Code can generate code, explain existing logic, refactor functions, create tests, and assist with debugging through natural-language interactions. It is commonly used to accelerate development, improve code quality, and support engineers in navigating complex codebases.

**Key features:**

* **Intelligent Code Generation** Produces high-quality code snippets, functions, and modules based on natural-language prompts, helping developers move faster.
* **Code Explanation & Understanding** Provides clear explanations of complex code blocks, libraries, or architectural patterns to improve comprehension and onboarding.
* **Refactoring & Optimization** Suggests cleaner, more efficient, or more idiomatic implementations while preserving existing functionality.
* **Automated Test Creation** Generates unit tests, integration tests, and edge-case scenarios to improve code reliability and coverage.
* **Debugging Assistance** Helps identify potential bugs, logic issues, or problematic patterns and proposes fixes.
* **Documentation Support** Creates or updates documentation, docstrings, READMEs, and comments directly from code.
* **Multi-Language Support** Works across a wide range of programming languages, adapting to ecosystem conventions and best practices.
* **Context-Aware Development** Uses project context files, codebase structure, and error logs to deliver highly relevant responses.
* **Interactive Cooperative Workflow** Works like a coding partner. Developers can iterate, review, and refine code through conversational interactions.

nexos.ai now exposes an endpoint compatible with the Anthropic Messages API, so Claude Code talks to the gateway directly. You no longer need a local proxy or the Claude Code Router. To connect your nexos.ai **API** and **Claude Code**, follow these steps:

#### 1. Install Claude Code

**macOS, Linux, WSL:**

```bash
curl -fsSL https://claude.ai/install.sh | bash
```

**Windows PowerShell:**

```powershell
irm https://claude.ai/install.ps1 | iex
```

Or install it with npm:

```bash
npm install -g @anthropic-ai/claude-code
```

#### 2. Connect Claude Code to nexos.ai

Instead of logging in with Anthropic directly, point Claude Code at the nexos.ai gateway. This is done with a few environment variables.

**Requirements:**

1. Use `https://api.nexos.ai` as the base URL. Claude Code appends `/v1/messages` automatically.
2. Provide your API key as the auth token.
3. **Important:** Explicitly blank out the Anthropic API key to avoid conflicts.

Add these lines to your shell profile such as `~/.zshrc`, `~/.bashrc`, or `~/.config/fish/config.fish`:

```bash
export ANTHROPIC_BASE_URL="https://api.nexos.ai"
export ANTHROPIC_AUTH_TOKEN="{YOUR_API_KEY}"
export ANTHROPIC_API_KEY=""   # Important: must be explicitly empty
```

After saving, restart your terminal so the changes take effect.

{% hint style="warning" %}
Do not put these values in a project-level `.env` file. The native Claude Code installer does not read standard `.env` files.
{% endhint %}

#### 3. Clear any cached Anthropic login

If you were previously logged in to Claude Code with an Anthropic account, run `/logout` once to remove the cached session. Then quit and relaunch `claude`. A leftover cached login together with `ANTHROPIC_AUTH_TOKEN` can cause confusing model-not-found errors on startup.

```
> /logout
```

If you have never logged in to Claude Code with Anthropic, skip this step.

#### 4. Start your session

```bash
cd /path/to/your/project
claude
```

You are now connected. Every prompt is routed through nexos.ai.

#### 5. Verify

Run `/status` inside Claude Code to confirm the connection:

```
> /status
Auth token: ANTHROPIC_AUTH_TOKEN
Anthropic base URL: https://api.nexos.ai
```

### Configuring models

Claude Code uses several environment variables to decide which model to use for each task. Point each role at any model available in your nexos.ai workspace. Use either the model UUID or model name.

```bash
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-4-1-20250805"
export ANTHROPIC_DEFAULT_SONNET_MODEL="anthropic.claude-sonnet-4@20250514"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="c958982f-4301-4576-bfd8-b5a83f1f4232"
export CLAUDE_CODE_SUBAGENT_MODEL="claude-opus-4-1-20250805"
```

| Variable                         | Description                                                |
| -------------------------------- | ---------------------------------------------------------- |
| `ANTHROPIC_DEFAULT_OPUS_MODEL`   | Model used for Opus-class tasks such as complex reasoning  |
| `ANTHROPIC_DEFAULT_SONNET_MODEL` | Model used for Sonnet-class tasks such as general coding   |
| `ANTHROPIC_DEFAULT_HAIKU_MODEL`  | Model used for Haiku-class tasks such as quick completions |
| `CLAUDE_CODE_SUBAGENT_MODEL`     | Model used for sub-agent tasks spawned by Claude Code      |

Add these to the same shell profile where you set `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN`. Claude Code is optimized for Anthropic models and may not behave correctly with other providers.

### Troubleshooting

* **Model-not-found errors:** Usually this is a credential conflict. If you have a cached Anthropic OAuth login, run `/logout`, then quit and relaunch `claude`. If your shell still has a real `ANTHROPIC_API_KEY` set, `/logout` will not help. Make sure `ANTHROPIC_API_KEY=""` is set as shown above and restart your terminal. Verify with `/status`.
* **Auth errors:** Ensure `ANTHROPIC_API_KEY` is set to an empty string `""`. If it is unset, Claude Code may fall back to authenticating against Anthropic's servers.
* **Context length errors:** Break the task into smaller chunks or start a new session.


# Claude Cowork

## What is Claude Cowork? <a href="#what-is-claude-cowork" id="what-is-claude-cowork"></a>

Claude Cowork allows Claude to handle multi-step knowledge work locally—coordinating sub-agents to summarize research, manage folders, and build spreadsheets. When you connect Cowork to [All-in-one AI platform](http://nexos.ai/) , you keep Claude’s powerful access to files running on your machine, while wrapping every request in complete team governance.

## Why use Claude Cowork with [nexos.ai](http://nexos.ai/) ? <a href="#why-use-claude-cowork-with-nexos.ai" id="why-use-claude-cowork-with-nexos.ai"></a>

* **Centralized billing:** Stop expensing separate Anthropic subscriptions. Let your entire team use Cowork through one gateway key.
* **Deep visibility:** Agent-level tasks devour high compute. Track token costs accurately in your nexos.ai dashboard.

## Configure Claude Cowork to work with [nexos.ai](http://nexos.ai/) <a href="#configure-claude-cowork-to-work-with-nexos.ai" id="configure-claude-cowork-to-work-with-nexos.ai"></a>

### Before you start <a href="#before-you-start" id="before-you-start"></a>

* Ensure you have Claude Desktop installed
* Prepare your [nexos.ai](http://nexos.ai/) Team API Token

### Setup guide <a href="#setup-guide" id="setup-guide"></a>

* Open Claude Desktop. Click **Help** → **Troubleshooting** → **Enable Developer Mode**.

<figure><img src="/files/OzHfSdPZaqJvKi12phZD" alt="" width="563"><figcaption></figcaption></figure>

* Confirm change and restart Claude Desktop

<figure><img src="/files/YYAeU9BXmtHffjMFokVB" alt="" width="302"><figcaption></figcaption></figure>

* When Claude Desktop restarts you should see new section in top bar called Developer. Click on **Developer** → **Configure Third-Party Inference**

  <figure><img src="https://media-cdn.atlassian.com/file/c6e13ac3-33ce-43aa-b492-ee47d1c9be93/image/cdn?allowAnimated=true&#x26;client=7e828137-be0c-4e67-84fc-bd1b114e627a&#x26;collection=contentId-1210318852&#x26;height=125&#x26;max-age=2592000&#x26;mode=full-fit&#x26;source=mediaCard&#x26;token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI3ZTgyODEzNy1iZTBjLTRlNjctODRmYy1iZDFiMTE0ZTYyN2EiLCJhY2Nlc3MiOnsidXJuOmZpbGVzdG9yZTpjb2xsZWN0aW9uOmNvbnRlbnRJZC0xMjEwMzE4ODUyIjpbInJlYWQiXX0sImV4cCI6MTc4Mzg2MDkyNywibmJmIjoxNzgzODU4MDQ3LCJhYUlkIjoiNzEyMDIwOjlmN2E3MTc1LWUxMmEtNDk4YS1hMzVkLWQ3MGQyMGIyM2U2MSIsImh0dHBzOi8vaWQuYXRsYXNzaWFuLmNvbS9hcHBBY2NyZWRpdGVkIjpmYWxzZSwiYXV0aFR5cGUiOiJzZXNzaW9uIn0.cnwiARpqVrhXYTkcfqdUVSi7UfhlxfvOxlkGGKdnp5A&#x26;width=569#media-blob-url=true&#x26;id=c6e13ac3-33ce-43aa-b492-ee47d1c9be93&#x26;clientId=7e828137-be0c-4e67-84fc-bd1b114e627a&#x26;contextId=contentId-1210318852&#x26;collection=contentId-1210318852" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/1nHlWBAgpyUSlKEWFvXC" alt="" width="563"><figcaption></figcaption></figure>

* Select **Credential kind** → **Static API key**. This will expand possible settings in this window.

<figure><img src="/files/CqxF0VbzuF7cdOQsn9y0" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://media-cdn.atlassian.com/file/3daa0d7a-7cdf-413b-b186-1a053dda2e82/image/cdn?allowAnimated=true&#x26;client=7e828137-be0c-4e67-84fc-bd1b114e627a&#x26;collection=contentId-1210318852&#x26;height=125&#x26;max-age=2592000&#x26;mode=full-fit&#x26;source=mediaCard&#x26;token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI3ZTgyODEzNy1iZTBjLTRlNjctODRmYy1iZDFiMTE0ZTYyN2EiLCJhY2Nlc3MiOnsidXJuOmZpbGVzdG9yZTpjb2xsZWN0aW9uOmNvbnRlbnRJZC0xMjEwMzE4ODUyIjpbInJlYWQiXX0sImV4cCI6MTc4Mzg2MDkyNywibmJmIjoxNzgzODU4MDQ3LCJhYUlkIjoiNzEyMDIwOjlmN2E3MTc1LWUxMmEtNDk4YS1hMzVkLWQ3MGQyMGIyM2U2MSIsImh0dHBzOi8vaWQuYXRsYXNzaWFuLmNvbS9hcHBBY2NyZWRpdGVkIjpmYWxzZSwiYXV0aFR5cGUiOiJzZXNzaW9uIn0.cnwiARpqVrhXYTkcfqdUVSi7UfhlxfvOxlkGGKdnp5A&#x26;width=736#media-blob-url=true&#x26;id=3daa0d7a-7cdf-413b-b186-1a053dda2e82&#x26;clientId=7e828137-be0c-4e67-84fc-bd1b114e627a&#x26;contextId=contentId-1210318852&#x26;collection=contentId-1210318852" alt="" width="563"><figcaption></figcaption></figure>

* Set following properties and click on:&#x20;
  * **Test connection**
  * **Gateway base URL:** [https://api.nexos.ai](https://api.nexos.ai/)
  * **Gateway API key**: your team Nexos API key
  * **Gateway auth scheme**: bearer

<figure><img src="/files/xYxU3btt2DohP02nZV1n" alt="" width="563"><figcaption></figcaption></figure>

* When you provide correct data Test connection should be marked with green dot indicating that Claude was able to correctly connect with [nexos.ai](http://nexos.ai/). **Apply changes**, Claude Desktop will automatically restart.\
  \
  You will be greeted with information that from now on you will be using Gateway

<figure><img src="/files/LpzF74NtW23I3FEA91YB" alt="" width="563"><figcaption></figcaption></figure>

> **Disclaimer**: Claude Desktop will automatically fetch list of available models. Keep in mind that thinking is available since version 4.6 of Anthropic models.

* Select appropriate model and start working with Claude Cowork

<figure><img src="/files/HD3GrG77xAVaSmowzF4W" alt="" width="563"><figcaption></figcaption></figure>

## Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

### Something went wrong <a href="#something-went-wrong" id="something-went-wrong"></a>

```
1. API Error: 400 vertex-ai error: thinking: Input tag 'adaptive' found using 'type' 
does not match any of the expected tags: 
2. 'disabled', 'enabled'
```

Please change model version used in Cowork from `4.5` to more recent one i.e. `4.6`


# Bubble

#### **What is bubble.io?** <a href="#what-is-bubble.io" id="what-is-bubble.io"></a>

bubble.io is a powerful no-code development platform that allows individuals and businesses to design, develop, and launch sophisticated web applications without writing a single line of code.

Think of it as a visual programming environment where you drag and drop elements, connect them to a database, and define logical workflows to create fully functional web apps.

**Key features:**

* Visual Editor
* Built-in Database
* Workflows
* Integrations
* User Management & Security
* Hosting & Deployment

Connecting bubble.io with nexos.ai models and assistants gives teams instant, secure workflow intelligence. Every interaction uses authenticated API‑key access, ensuring sensitive company data remains safe within nexos.ai while providing full observability and control over API usage.

To connect your nexos.ai API and Bubble go through following steps:

1. **Generate your personal API key**

Log in to your nexos.ai account and head over to the User profile section by clicking on the profile bubble in the top right corner of the UI.

<figure><img src="/files/H3ca3oHkU6XjfPrDJkrO" alt=""><figcaption></figcaption></figure>

&#x20;                                                      How to generate a personal API key

2. **Install plugin API Connector**

<figure><img src="/files/Fqp3NZe3oRT4NwaRb06p" alt=""><figcaption></figcaption></figure>

&#x20;                                                        How to install API Connector plugin

3. **Establish API connection**

<figure><img src="/files/Fqp3NZe3oRT4NwaRb06p" alt=""><figcaption></figcaption></figure>

For your solutions you can use [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api) .


# Gitlab CI

#### What is Gitlab CI? <a href="#what-is-gitlab-ci" id="what-is-gitlab-ci"></a>

GitLab CI/CD is GitLab's built-in continuous integration and continuous delivery platform that allows you to automatically build, test, and deploy your code. It's configured through a `.gitlab-ci.yml` file in your repository's root, where you define pipelines consisting of stages and jobs. When you push code or trigger a merge request, GitLab runners execute these jobs—running tests, building artifacts, deploying to environments, etc. Its tight integration with GitLab's version control, merge requests, and container registry makes it a seamless choice for teams already using GitLab for source control.

#### **Key features of what can be done with an AI agent in Gitlab CI:** <a href="#key-features-of-what-can-be-done-with-an-ai-agent-in-gitlab-ci" id="key-features-of-what-can-be-done-with-an-ai-agent-in-gitlab-ci"></a>

* **Automated Code Review — The agent can analyze merge requests and provide feedback on code quality, potential bugs, and style issues before human reviewers get involved.**
* **Merge Request Summaries — Automatically generates clear descriptions of what changed, making it easier for reviewers to understand the scope of a MR.**
* **Reduced Review Bottlenecks** — Handles routine feedback automatically, freeing up senior developers to focus on architectural and complex logic reviews.

To connect your [All-in-one AI platform for business](http://nexos.ai/) **API** and **Claude Code** in Gitlab CI for a simple code review bot you can follow these steps:

#### 1. Create your `gitlab-ci.yml` in your project: <a href="#id-1.-create-your-gitlab-ci.yml-in-your-project" id="id-1.-create-your-gitlab-ci.yml-in-your-project"></a>

```
stages:
  - review

claude-code-review:
  variables:
    REVIEW_MARKER: "<!-- claude-code-review -->"
    GIT_DEPTH: 0 # Needed for long history
  tags:
    - claude-review
  stage: review
  image: node:20-alpine
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event" # Makes the job only run in merge requests
  before_script:
    - apk add --no-cache curl jq git # Install used tools
    - mkdir -p /root/.claude/projects # Needed just to not see claude code error in pipeline
    - adduser -D claude && chown -R claude:claude $CI_PROJECT_DIR
  script:
    # Setup
    - npm install -g @anthropic-ai/claude-code @musistudio/claude-code-router
    - mkdir -p ~/.claude-code-router
    # Same config from Claude Code setup guide
    - |
      cat > ~/.claude-code-router/config.json << EOF
      {
        "HOST": "127.0.0.1",
        "PORT": 3456,
        "API_TIMEOUT_MS": "600000",
        "Providers": [
          {
            "name": "nexosai",
            "api_base_url": "https://api.nexos.ai/v1/chat/completions",
            "api_key": "${LLM_API_KEY}",
            "models": [
              "claude-opus-4-1-20250805",
              "claude-haiku-4-5-20251001"
            ],
            "transformer": {
              "use": [
                "OpenAI"
              ]
            }
          }
        ],
        "Router": {
          "default": "nexosai,claude-haiku-4-5-20251001",
          "background": "nexosai,claude-haiku-4-5-20251001",
          "webSearch": "nexosai,claude-haiku-4-5-20251001",
          "think": "nexosai,claude-opus-4-1-20250805",
          "longContext": "nexosai,claude-haiku-4-5-20251001",
          "longContextThreshold": 60000
        }
      }
      EOF

    # Starting router and providing a delay
    - npx @musistudio/claude-code-router start &
    - sleep 3

    # Adding a hidden review marker into the review file which will allow later to edit same note instead of creating multiple
    - echo "$REVIEW_MARKER" > /tmp/review.md
    # Fetching branch and retrieving changed files
    - su claude -c "git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
    - CHANGED_FILES=$(su claude -c "git diff --name-only origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME...HEAD -- '*.go'")

    # Actually calling Claude Code
    - |
      echo "You are a code reviewer. Review the following changed Go files:

      $CHANGED_FILES

      Use View to examine each file.
      Output ONLY raw GitLab-compatible markdown with your findings.
      No preamble, no explanation, no summary - just the markdown review content itself." | \
      su claude -c '
        ANTHROPIC_BASE_URL=http://127.0.0.1:3456 \
        ANTHROPIC_API_KEY=placeholder \
        claude --print --dangerously-skip-permissions \
          --allowedTools "View,GlobTool,GrepTool"
      ' >> /tmp/review.md

    # Posting the note
    - |
      # find existing note ID
      NOTE_ID=$(curl -s --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" \
        "$CI_API_V4_URL/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes" \
        | jq -r --arg marker "$REVIEW_MARKER" '.[] | select(.body | contains($marker)) | .id' | head -1)

      if [ -n "$NOTE_ID" ]; then
        # Update existing note
        curl --fail --request PUT \
          --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" \
          --header "Content-Type: application/json" \
          --data "$(jq -Rs '{body: .}' /tmp/review.md)" \
          "$CI_API_V4_URL/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes/$NOTE_ID"
      else
        # Create new note
        curl --fail --request POST \
          --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" \
          --header "Content-Type: application/json" \
          --data "$(jq -Rs '{body: .}' /tmp/review.md)" \
          "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/merge_requests/${CI_MERGE_REQUEST_IID}/notes"
      fi
```

This snippet is based on the [Claude Code setup guide](https://nexos-ai.atlassian.net/wiki/spaces/NA2/pages/541098001) and launches Claude Code with Claude Code Router inside a GitLab pipeline. However, this is just one implementation—a similar approach should work with other AI coding agents like [Aider](https://aider.chat/).

The configuration is security-conscious: the model is mostly restricted to read-only operations and cannot interact with Bash or the GitLab MCP, though these could be enabled if needed. For posting feedback, the pipeline uses simple GitLab API calls via cURL and updates a single comment on the MR rather than creating a new one each time.

#### 2. Create your access keys and pipeline variables in Gitlab: <a href="#id-2.-create-your-access-keys-and-pipeline-variables-in-gitlab" id="id-2.-create-your-access-keys-and-pipeline-variables-in-gitlab"></a>

For the provider example, the access key is a project scoped access token with the `Reporter` role and `api` scope. It is then set in the CI/CD variables as `GITLAB_API_TOKEN` which is masked to avoid leaking it in the pipeline. The other CI/CD variable is `LLM_API_KEY` which is your nexos.ai API key that will be used by Claude Code.

#### Tip: <a href="#tip" id="tip"></a>

We recommend testing the AI coding agent locally before adding it to your GitLab pipeline. Errors that occur inside the agent during pipeline runs can be difficult to trace, since they may not surface clearly in the logs. Setting it up locally first makes troubleshooting much easier—once everything works as expected, you can confidently integrate it into your pipeline.

&#x20;


# OpenAI Agents SDK

The [OpenAI Agents SDK](https://openai.github.io/openai-agents-python/) enables you to build agentic AI apps in a lightweight, easy-to-use package with very few abstractions. It's a production-ready upgrade of our previous experimentation for agents, Swarm. The Agents SDK has a very small set of primitives:

* Agents, which are LLMs equipped with instructions and tools
* Handoffs, which allow agents to delegate to other agents for specific tasks
* Guardrails, which enable validation of agent inputs and outputs
* Sessions, which automatically maintains conversation history across agent runs

**Sample implementation using nexos.ai**

* Install dependencies
* Define environments\
  `NEXOS_API_KEY=team-api-key`\
  `NEXOS_BASE_URL=https://api.nexos.ai/v1`.

```
import os

from agents import Agent, Runner, set_tracing_disabled, OpenAIChatCompletionsModel, AsyncOpenAI
from dotenv import load_dotenv

set_tracing_disabled(True)

# Load environment variables from .env file
load_dotenv()
# --- Configuration ---
NEXOS_BASE_URL = os.getenv("NEXOS_BASE_URL")
NEXOS_API_KEY = os.getenv("NEXOS_API_KEY")
if not NEXOS_BASE_URL or not NEXOS_API_KEY:
    raise ValueError("Please set NEXOS_BASE_URL and NEXOS_API_KEY in your .env file")

client = AsyncOpenAI(api_key=NEXOS_API_KEY, base_url=NEXOS_BASE_URL)
model = OpenAIChatCompletionsModel(model="GPT 5 mini", openai_client=client)

agent = Agent(name="Assistant", instructions="You are a helpful assistant", model=model)

result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)
```

You can use any open AI compatible model. To check what models are available for you, call [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-models) You can use either `nexos_model_id`or `id` as model.

&#x20;


# Vercel AI SDK

#### **What is Vercel AI SDK?** <a href="#what-is-vercel-ai-sdk" id="what-is-vercel-ai-sdk"></a>

The Vercel AI SDK is a powerful and flexible open-source library designed to help developers build AI-powered user interfaces quickly and efficiently within modern JavaScript/TypeScript web applications.

**Core Purpose:**

* Managing the state and user experience of AI interactions: Especially for streaming responses, which are crucial for responsive AI UIs.
* Building common AI UI patterns: Such as chatbots, text completion fields, and content generation tools.

**Sample implementation using nexos.ai**

* Setup typescript project
* Install dependencies
* Define environments\
  `NEXOS_API_KEY=``team-api-key`\
  `NEXOS_BASE_URL=https://api.nexos.ai/v1`

```
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
import { generateText } from 'ai';
import dotenv from 'dotenv';

dotenv.config();

let NEXOS_API_KEY = process.env.NEXOS_API_KEY
let NEXOS_BASE_URL= process.env.NEXOS_BASE_URL

if (!NEXOS_API_KEY || !NEXOS_BASE_URL) {
    throw new Error('Please set NEXOS_BASE_URL and NEXOS_API_KEY in your .env file');
}

const provider = createOpenAICompatible({
    name: 'nexos.ai',
    apiKey: NEXOS_API_KEY,
    baseURL: NEXOS_BASE_URL, // e.g. https://api.nexos.ai/v1
});

const { text } = await generateText({
    model: provider('Claude Haiku 4.5'), // or any other OpenAI-compatible model ID available to you 
    prompt: 'Write a vegetarian lasagna recipe for 4 people.',
});

console.log(text);
```

You can use any open AI compatible model. To check what models are available for you, call [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-models) You can use either `nexos_model_id`or `id` as model.


# Streamlit

#### **What is Streamlit?** <a href="#what-is-streamlit" id="what-is-streamlit"></a>

Streamlit is an open-source Python library that allows you to create beautiful, interactive web applications for data science and machine learning projects without requiring front-end development skills (like HTML, CSS, or JavaScript).

In essence, it lets data scientists and ML engineers transform their data scripts, models, and analyses into shareable web apps very quickly and with minimal code.

**Sample implementation using nexos.ai**

* Install dependencies
* Define environments\
  `NEXOS_API_KEY=team-api-key`\
  `NEXOS_BASE_URL=https://api.nexos.ai/v1`.

```
import os
import streamlit as st

from openai import OpenAI
from dotenv import load_dotenv

# Load environment variables from .env file
load_dotenv()
# --- Configuration ---
NEXOS_BASE_URL = os.getenv("NEXOS_BASE_URL")
NEXOS_API_KEY = os.getenv("NEXOS_API_KEY")
if not NEXOS_BASE_URL or not NEXOS_API_KEY:
    raise ValueError("Please set NEXOS_BASE_URL and NEXOS_API_KEY in your .env file")

# Configure OpenAI client once, pointing to Nexos
client = OpenAI(
  api_key=NEXOS_API_KEY,
  base_url=NEXOS_BASE_URL # e.g. "https://api.nexos.ai/v1"
)

st.title("Chat via Nexos.ai")

user_input = st.text_input("Ask something:")

if user_input:
    try:
        response = client.chat.completions.create(
            model='Claude Haiku 4.5', # or any other OpenAI-compatible model ID available to you 
            messages=[{"role": "user", "content": user_input}]
        )
        st.write("Nexos Response:")
        st.write(response.choices[0].message.content)
    except Exception as e:
        st.error(f"Error calling Nexos: {e}")
```

You can use any open AI compatible model. To check what models are available for you, call [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-models) You can use either `nexos_model_id`or `id` as model.

&#x20;


# IntelliJ via ProxyAIPage

#### What is ProxyAI? <a href="#what-is-proxyai" id="what-is-proxyai"></a>

* ProxyAI is an AI-powered coding assistant that integrates with JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, and others).
* It supports OpenAI API–compatible provider configuration, allowing you to connect to any OpenAI-compatible endpoint by supplying a custom base URL and API key.

#### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* You can use any OpenAI compatible model or assistant.
  * To check what models are available for you, call [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-models) You can use either `nexos_model_id`or `id` as model.
  * To check what assistants are available for you, call [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-assistants)
* As an API URL you should use url [https://api.us.nexos.ai/v1/chat/completions](https://api.nexos.ai/v1/chat/completions)\ <br>

#### Install ProxyAI plugin <a href="#install-proxyai-plugin" id="install-proxyai-plugin"></a>

1. Open Intellij IDE, go to `Settings` -> `Plugins`
2. From top bar choose `Marketplace`
3. Type `ProxyAI` in search bar
4. Click `Install` next to the ProxyAI plugin name and wait till installation ends

   <figure><img src="/files/vDzjpvjpl8hhKENLrpXw" alt=""><figcaption></figcaption></figure>
5. Restart IDE

#### Configure ProxyAI plugin <a href="#configure-proxyai-plugin" id="configure-proxyai-plugin"></a>

1. Open Intellij IDE Settings
2. Go to `Tools` -> `ProxyAI`

   <figure><img src="/files/9qIR2X6L6ZcjHKEt3Wbm" alt=""><figcaption></figcaption></figure>
3. Add Nexos provider in `Providers` -> `Custom OpenAI`

* On the right side you can click `+` (Add)
* In Provider setting section choose either OpenAI or OpenRouter
* Put Provider name
* Paste Nexos API key

<figure><img src="/files/6boaLxyzqK5Epx5kj7pM" alt=""><figcaption></figcaption></figure>

4. &#x20;In `Chat Completions` tab

* Paste API URL
* Paste Nexos model id in `Body` tab
* Click `Test Connection` to see if everything works

<figure><img src="/files/W178KC6x62EqyeKOCV0i" alt=""><figcaption></figcaption></figure>

5. In `Code Completions` tab

* Check `Parse response as Chat Completions`
* Choose `Chat-based FIM` as `FIM template`
* Paste API URL
* Paste Nexos model id in `Body` tab
* Click `Test Connection` to see if everything works

<figure><img src="/files/otdl9E1hDGxWsfnwjao1" alt=""><figcaption></figcaption></figure>

6. Choose newly added Nexos model in `Models` for all types of requests (tip: you can add more Nexos providers with different models for different types of requests)

<figure><img src="/files/g7Gx0FHRLnFAmi4cjovv" alt=""><figcaption></figcaption></figure>

7. Click `Apply` and `OK`
8. Open ProxyAI chat window and ask anything about your code.

<figure><img src="/files/POdKKsTjgRGONazrm7Jt" alt=""><figcaption></figcaption></figure>


# Langfuse

**What is Langfuse?**\
Langfuse is an open-source LLM observability and analytics platform. It provides comprehensive tracing, monitoring, and evaluation capabilities for LLM applications. Langfuse captures detailed traces of your LLM interactions including inputs, outputs, tool usage, latencies, and costs, enabling you to debug, analyze, and improve your AI applications.

**Sample implementation using nexos.ai**\
This example demonstrates how to integrate Langfuse tracing with LangChain when using nexos.ai gateway.

* **Langfuse Setup**: Initializes the Langfuse CallbackHandler for automatic tracing.
* **LangChain Integration**: Passes the callback handler to LangChain invocations.
* **Custom Gateway**: Uses the custom `NEXOS_BASE_URL` for LLM calls.
* **Observability**: All LLM interactions are automatically logged to Langfuse for analysis.

```
import os
from dotenv import load_dotenv
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage, SystemMessage
from langfuse import get_client
from langfuse.langchain import CallbackHandler

# Load environment variables
load_dotenv()

# --- Configuration ---
NEXOS_BASE_URL = os.getenv("NEXOS_BASE_URL")
NEXOS_API_KEY = os.getenv("NEXOS_API_KEY")

LANGFUSE_SECRET_KEY = os.getenv("LANGFUSE_SECRET_KEY")
LANGFUSE_PUBLIC_KEY = os.getenv("LANGFUSE_PUBLIC_KEY")
LANGFUSE_HOST = os.getenv("LANGFUSE_HOST", "https://cloud.langfuse.com")

if not NEXOS_BASE_URL or not NEXOS_API_KEY:
    raise ValueError("Please set NEXOS_BASE_URL and NEXOS_API_KEY in your .env file")

if not LANGFUSE_SECRET_KEY or not LANGFUSE_PUBLIC_KEY:
    raise ValueError("Please set LANGFUSE_SECRET_KEY and LANGFUSE_PUBLIC_KEY in your .env file")

# --- Initialize Langfuse ---
# The Langfuse client is initialized automatically from environment variables
langfuse = get_client()

# Create the Langfuse callback handler for LangChain tracing
langfuse_handler = CallbackHandler()

def main():
    print("--- LangChain with Langfuse Tracing ---")

    # Initialize the ChatOpenAI client with nexos.ai gateway
    llm = ChatOpenAI(
        model="gemini-2.5-flash", # or any other OpenAI-compatible model ID available to you
        base_url=NEXOS_BASE_URL, # e.g. "https://api.nexos.ai/v1"
        api_key=NEXOS_API_KEY,
        temperature=0.7,
    )

    # Create a simple message sequence
    messages = [
        SystemMessage(content="You are a helpful assistant."),
        HumanMessage(content="What are the benefits of observability in LLM applications?"),
    ]

    try:
        # Invoke the model with Langfuse tracing
        # The callback handler automatically captures all interactions
        response = llm.invoke(
            messages,
            config={
                "callbacks": [langfuse_handler],
                "metadata": {
                    "langfuse_user_id": "demo-user",
                    "langfuse_session_id": "demo-session",
                    "langfuse_tags": ["demo", "observability"]
                }
            }
        )
        
        print("--- Response from AI ---")
        print(response.content)
        print("------------------------")
        
        print(f"\n✓ Trace logged to Langfuse")
        print(f"  View at: {LANGFUSE_HOST}")
        
    except Exception as e:
        print(f"\nError communicating with the API: {e}")
    
    finally:
        # Flush events to ensure they are sent to Langfuse
        langfuse.flush()

if __name__ == "__main__":
    main()
```

You can use any open AI compatible model. To check what models are available for you, call [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-models) You can use either `nexos_model_id`or `id` as model.


# LangGraph

**What is LangGraph?**\
LangGraph is a library for building stateful, multi-actor applications with LLMs, built on top of LangChain. It allows you to define flows as graphs, where nodes are processing steps (like LLM calls) and edges define the control flow. This is particularly useful for building agents, cyclic workflows, and complex conversational applications.

**Sample implementation using nexos.ai**

This example, written in Python and TypeScript demonstrates a simple "Chatbot" graph connected to nexos.ai Gateway.

* **State**: Defines a simple state containing a list of messages.
* **Graph**: Creates a StateGraph with a single node ('chatbot') that calls the LLM.
* **Custom Gateway**: The LLM is configured to point to the custom `NEXOS_BASE_URL`.
* **Execution**: Runs the graph with a user message and prints the response.

Python:

```
import os
from typing import Annotated
from typing_extensions import TypedDict

from dotenv import load_dotenv
from langchain_openai import ChatOpenAI
from langchain_core.messages import BaseMessage, HumanMessage
from langgraph.graph import StateGraph, START, END
from langgraph.graph.message import add_messages

# Load environment variables
load_dotenv()

# --- Configuration ---
NEXOS_BASE_URL = os.getenv("NEXOS_BASE_URL")
NEXOS_API_KEY = os.getenv("NEXOS_API_KEY")

if not NEXOS_BASE_URL or not NEXOS_API_KEY:
    raise ValueError("Please set NEXOS_BASE_URL and NEXOS_API_KEY in your .env file")

# --- 1. Define the State ---
class State(TypedDict):
    # The 'add_messages' reducer appends new messages to the existing list
    messages: Annotated[list[BaseMessage], add_messages]

# --- 2. Initialize the LLM ---
llm = ChatOpenAI(
    model="gemini-2.5-flash", # or any other OpenAI-compatible model ID available to you
    base_url=NEXOS_BASE_URL,  # e.g. "https://api.nexos.ai/v1"
    api_key=NEXOS_API_KEY,
    temperature=0.7,
)

# --- 3. Define Nodes ---
def chatbot_node(state: State):
    """
    Invokes the LLM with the current history of messages.
    Returns a dictionary with the new message to be added to the state.
    """
    response = llm.invoke(state["messages"])
    return {"messages": [response]}

# --- 4. Build the Graph ---
builder = StateGraph(State)

# Add nodes
builder.add_node("chatbot", chatbot_node)

# Add edges (Simple linear flow: Start -> Chatbot -> End)
builder.add_edge(START, "chatbot")
builder.add_edge("chatbot", END)

# Compile the graph
graph = builder.compile()

def main():
    print("--- Starting LangGraph Execution ---")

    # Initial input to the graph
    initial_input = {"messages": [HumanMessage(content="Hello! Explain the concept of a 'graph' in one sentence.")]}

    # Stream the execution
    # The stream yields events as the graph progresses
    for event in graph.stream(initial_input):
        for node_name, value in event.items():
            print(f"\n--- Output from node '{node_name}' ---")
            last_message = value["messages"][-1]
            print(last_message.content)
            print("--------------------------------------")

if __name__ == "__main__":
    main()
```

TypeScript:

```
import * as dotenv from "dotenv";
import { ChatOpenAI } from "@langchain/openai";
import { HumanMessage, BaseMessage } from "@langchain/core/messages";
import { StateGraph, START, END, Annotation } from "@langchain/langgraph";

// Load environment variables from .env file
dotenv.config();

// --- Configuration ---
const NEXOS_BASE_URL = process.env.NEXOS_BASE_URL; // e.g. "https://api.nexos.ai/v1"
const NEXOS_API_KEY = process.env.NEXOS_API_KEY;

if (!NEXOS_BASE_URL || !NEXOS_API_KEY) {
  throw new Error("Please set NEXOS_BASE_URL and NEXOS_API_KEY in your .env file");
}

// --- 1. Define the State ---
const StateAnnotation = Annotation.Root({
  messages: Annotation<BaseMessage[]>({
    reducer: (x: BaseMessage[], y: BaseMessage[]) => x.concat(y),
  }),
});

// --- 2. Initialize the LLM ---
const llm = new ChatOpenAI({
  model: "gemini-2.5-flash", // or any other OpenAI-compatible model ID available to you
  apiKey: NEXOS_API_KEY,
  configuration: {
    baseURL: NEXOS_BASE_URL,
  },
  temperature: 0.7,
});

// --- 3. Define Nodes ---
/**
 * Invokes the LLM with the current history of messages.
 * Returns an object with the new message to be added to the state.
 */
async function chatbotNode(state: typeof StateAnnotation.State) {
  const response = await llm.invoke(state.messages);
  return { messages: [response] };
}

// --- 4. Build the Graph ---
const builder = new StateGraph(StateAnnotation)
  .addNode("chatbot", chatbotNode)
  .addEdge(START, "chatbot")
  .addEdge("chatbot", END);

// Compile the graph
const graph = builder.compile();

async function main() {
  console.log("--- Starting LangGraph Execution ---");

  // Initial input to the graph
  const initialInput = {
    messages: [new HumanMessage("Hello! Explain the concept of a 'graph' in one sentence.")],
  };

  try {
    // Stream the execution
    const stream = await graph.stream(initialInput);
    
    for await (const event of stream) {
      for (const [nodeName, value] of Object.entries(event)) {
        console.log(`\n--- Output from node '${nodeName}' ---`);
        const stateValue = value as typeof StateAnnotation.State;
        const lastMessage = stateValue.messages[stateValue.messages.length - 1];
        console.log(lastMessage.content);
        console.log("--------------------------------------");
      }
    }
  } catch (e) {
    console.error(`\nError during graph execution: ${e}`);
  }
}

main();
```

You can use any open AI compatible model. To check what models are available for you, call [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-models) You can use either `nexos_model_id`or `id` as model.


# LangChain

**What is LangChain?**\
LangChain is a comprehensive framework for developing applications powered by Large Language Models (LLMs). It provides:

* A unified interface to interact with various model providers
* Tools to manage conversation history
* Primitives for building complex chains and agents

**Sample implementation using nexos.ai**

Below is a minimal example written in Python and TypeScript showing how to use LangChain’s `ChatOpenAI` client with the [nexos.ai](http://nexos.ai/) Gateway (OpenAI-compatible) endpoint.

Python:

```
import os
from dotenv import load_dotenv
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage, SystemMessage

# Load environment variables from .env file
load_dotenv()

# --- Configuration ---
NEXOS_BASE_URL = os.getenv("NEXOS_BASE_URL")
NEXOS_API_KEY = os.getenv("NEXOS_API_KEY")

if not NEXOS_BASE_URL or not NEXOS_API_KEY:
    raise ValueError("Please set NEXOS_BASE_URL and NEXOS_API_KEY in your .env file")

def main():
    # Initialize the ChatOpenAI client
    llm = ChatOpenAI(
        model="gpt-4.1",          # or any other OpenAI-compatible model ID available to you
        base_url=NEXOS_BASE_URL,  # e.g. "https://api.nexos.ai/v1"
        api_key=NEXOS_API_KEY,
    )

    # Create a simple message sequence
    messages = [
        SystemMessage(content="You are a helpful assistant."),
        HumanMessage(content="Hello world!"),
    ]

    try:
        response = llm.invoke(messages)
        print("\n--- Response from AI ---")
        print(response.content)
        print("------------------------")
    except Exception as e:
        print(f"\nError communicating with the API: {e}")

if __name__ == "__main__":
    main()

```

TypeScript:

```
import * as dotenv from "dotenv";
import { ChatOpenAI } from "@langchain/openai";
import { HumanMessage, SystemMessage } from "@langchain/core/messages";

// Load environment variables from .env file
dotenv.config();

// --- Configuration ---
const NEXOS_BASE_URL = process.env.NEXOS_BASE_URL;
const NEXOS_API_KEY = process.env.NEXOS_API_KEY;

if (!NEXOS_BASE_URL || !NEXOS_API_KEY) {
  throw new Error("Please set NEXOS_BASE_URL and NEXOS_API_KEY in your .env file");
}

async function main() {
  // Initialize the ChatOpenAI client
  const llm = new ChatOpenAI({
    model: "gemini-2.5-flash", // or any other OpenAI-compatible model ID available to you
    apiKey: NEXOS_API_KEY,
    configuration: {
      baseURL: NEXOS_BASE_URL,
    },
    temperature: 0.7,
  });

  // Create a simple message sequence
  const messages = [
    new SystemMessage("You are a helpful assistant."),
    new HumanMessage("Hello world!"),
  ];

  try {
    const response = await llm.invoke(messages);
    console.log("\n--- Response from AI ---");
    console.log(response.content);
    console.log("------------------------");
  } catch (e) {
    console.error(`\nError communicating with the API: ${e}`);
  }
}

main()
```

You can use any open AI compatible model. To check what models are available for you, call [Gateway API | nexos.ai documentation](https://docs.nexos.ai/gateway-api#get-v1-models) You can use either `nexos_model_id`or `id` as model.

&#x20;


# Roo Code - VStudio Code

[**Roo Code**](https://github.com/RooCodeInc/Roo-Code) is an AI-powered **autonomous coding agent** that seamlessly integrates into Visual Studio Code editor.

It can leverage the OpenAI compliant nexos.ai API gateway to provide responses.

To connect your nexos.ai API and Roo Code go through the following steps:

{% stepper %}
{% step %}

### Generate your personal API key

Log in to your nexos.ai account and head over to the User profile section by clicking on the profile bubble in top right corner of the UI.

{% hint style="danger" %}
Make sure to store your API key safely and securely. Never share it with anyone.&#x20;
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F0LGvNLlyqKw42xaiWCWB%2F1_nexos_roocode_API00000000.mp4?alt=media&token=4699eed3-4720-464c-9a70-b960aa573c68>" %}
How to generate a personal API key
{% endembed %}
{% endstep %}

{% step %}

### Install Roo Code extension in your Visual Studio Code

You can install Roo Code in multiple ways:&#x20;

* **VSC extensions tab** - Open the extensions tab in Visual Studio Code and search for "Roo Code", once results appear select Roo Code from the list and click "Install"

{% hint style="warning" %}
You might be asked if you trust the publisher of the extension. Make sure you familiarize yourself with the risks of using extensions.
{% endhint %}

* **VSC CLI** - Use the following command within Visual Studio Code command line interface to download and install the Roo Code extension<br>

  ```
  code --install-extension RooVeterinaryInc.roo-cline
  ```

* **VSC Marketplace website** - Head over to the Visual Studio Code marketplace website to download and install the extension\
  <https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline>

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FW31KmmRtX4nCzJKDOnsE%2F2_nexos_roocode_install00000128.mp4?alt=media&token=8508c76d-3b6b-4242-a62d-471e5f6d0470>" %}
Installing Roo Code through the built-in extensions marketplace
{% endembed %}
{% endstep %}

{% step %}

### Configure the Roo Code extension

Finally, configure Roo Code to take advantage of your nexos.ai API Gateway access.

* Head over to the new Roo Code tab in the left navigation bar
* Select "OpenAI Compatible" as your API Provider
* Provide "`https://api.nexos.ai/v1` " as the Base URL
* Paste the API key generated in step 1 in the API Key section
* Click the "Let's go!" button at the bottom of the configuration screen

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FcvQSR3obkXRXXBtl1F2H%2F3_nexos_roocode_config.mp4_00000000.mp4?alt=media&token=9357c616-4487-4f6c-85b4-9524fa237358>" %}
Configuring Roo Code with nexos.ai API Gateway
{% endembed %}

{% hint style="info" %}
If you want to find all available models and their names you can use the `/models` endpoint. Learn more here -  <https://docs.nexos.ai/gateway-api#get-v1-models>
{% endhint %}
{% endstep %}

{% step %}

### Send first message

Make sure everything is working correctly by sending the first message.
{% endstep %}
{% endstepper %}


# n8n

[n8n](https://n8n.io/) is a **workflow automation tool** that allows users to connect different applications and services to automate tasks. It provides a way to build complex workflows using a visual editor, integrate APIs, databases, and cloud services to streamline processes such as data synchronization, notifications, and system integrations.

Connecting **n8n’s open automation engine** with **nexos.ai’s models and assistants** gives teams instant, secure workflow intelligence. Every interaction uses authenticated **API‑key access**, ensuring sensitive company data remains safe within nexos.ai while providing full observability and control over API usage.

For example, raw financial data can be analyzed entirely inside a nexos.ai assistant. It processes internal figures, then sends back a single sanitized insight—*“Expenses increased 12% from Q2”*—to an **n8n workflow** through a secure API call, triggering automated follow‑ups such as dispatching reports or updating dashboards.

To connect your nexos.ai API and n8n go through the following steps:

{% stepper %}
{% step %}

### Generate an API key

Within workspace, navigate to:&#x20;

{% tabs %}
{% tab title="Personal API key" %}
Top-right corner "profile → User profile → Generate API Key

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F0LGvNLlyqKw42xaiWCWB%2F1_nexos_roocode_API00000000.mp4?alt=media&token=4699eed3-4720-464c-9a70-b960aa573c68>" %}
How to generate a personal API key
{% endembed %}
{% endtab %}

{% tab title="Team API key" %}
Management → Teams tab → Select team → Generate API Key

Each team can have its API Key with custom settings: models enabled, fallbacks, etc.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FZYaLEEUa4M42yQAh1fbN%2FteamAPI.mp4?alt=media&token=1dd97740-f689-4654-af9f-345909ac7bf2>" %}
{% endtab %}
{% endtabs %}

If needed, you can rotate the API Key within 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.

{% hint style="danger" %}
Make sure to store your API key safely and securely. Never share it with anyone.&#x20;
{% endhint %}

{% hint style="danger" %}
Make sure you save your API key - you won't be able to access it again after closing the dialog.
{% endhint %}
{% endstep %}

{% step %}

### Create a new workflow in n8n

On the homepage of your n8n instance click the orange button labeled "Create Workflow"

Next, in the top left corner name your workflow, additionally you can add tags here, too.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FERQU4wQWXDwJVkiy6f6Y%2Fn8n_1.mp4?alt=media&token=cdddb045-fd40-4803-a862-f470a79f1b34>" %}
{% endstep %}

{% step %}

### Configuring the workflow

{% hint style="info" %}
This guide uses a chat node as the trigger for the AI Agent, however other nodes can also be used.
{% endhint %}

Add a trigger node that will start the workflow, then add the AI Agent node and make sure they are connected. Next, add the "OpenAI Chat Model" node.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FkI0R3JqXGPUEtpF9wl9T%2Fn8n_2.mp4?alt=media&token=d41d2697-7ab5-444e-867c-82cb6369a107>" %}
{% endstep %}

{% step %}

### Configuring API credentials

From the "OpenAI Chat Model" node select the "Credential to connect with" dropdown, then "Create new credential". This will open a new window where you can paste your nexos.ai API key and set the API URL.&#x20;

The API URL is [`https://api.nexos.ai/v1`](https://api.nexos.ai/v1)&#x20;

Make sure to name your credentials by clicking on the "OpenAI account" text in top right corner.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F6RsOYrO7ReXR0TfxnEdk%2Fn8n_3.mp4?alt=media&token=6a2af784-7e1b-46ca-b208-2aac08810d3b>" %}

Save and close the API credential window
{% endstep %}

{% step %}

### Selecting a model or assistant

The available models **and assistants** can be selected by using their unique IDs. The nexos.ai Gateway API provides an endpoint that lists available models and assistants.

Alternatively, you can also select the model from the list drop down.

{% hint style="warning" %}
Assistants are **only** available when using personal API key.
{% endhint %}

{% hint style="success" %}
For the model list see the following link - <https://docs.nexos.ai/gateway-api#get-v1-models>

For user's assistant list  see the following link - <https://docs.nexos.ai/gateway-api#get-v1-assistants>
{% endhint %}

{% tabs %}
{% tab title="Model list" %}
{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FYp4iKvSLX8etB8NxaKEI%2FlistModel.mp4?alt=media&token=2b07a91a-a259-485e-b282-8df241cd5055>" %}

Model list does not contain personal Assistants.
{% endtab %}

{% tab title="Model ID" %}
{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FTUIASV0cS5IKly8AC2BM%2Fn8n_4.mp4?alt=media&token=934aac05-09e4-485b-8015-5b4ec5094373>" %}

Once you have the model or assistant ID you can copy and paste it in the AI model node.
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Adding memory

{% hint style="warning" %}
Adding memory is optional and might not be applicable to your workflow.
{% endhint %}

For some use cases short memory retention is required. In those situations the "Simple Memory" node becomes very useful.
{% endstep %}

{% step %}

### Testing

{% hint style="info" %}
This guide uses a chat node as the main touch point, some nodes are only relevant for this specific example. Other node combinations are also possible.
{% endhint %}

Try out your workflow to see if the nodes have been configured correctly.&#x20;

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2Fa2GWm3U9U6Ajrvr0My9L%2Fn8n_5.mp4?alt=media&token=33854c79-97c0-4d0a-8a1a-e33bbb0d5cb9>" %}
{% endstep %}
{% endstepper %}


# Code examples


# Python SDK

### Setup <a href="#setup" id="setup"></a>

Install the SDK and set your credentials:

```bash
pip install openai
```

All examples read the API key from a `.env` file:

```
API_KEY=YOUR_NEXOS_API_KEY
```

OpenAI SDK clients use the base URL `https://api.nexos.ai/v1`; the Anthropic SDK appends `/v1/messages` itself, so it takes the bare `https://api.nexos.ai`.

Model IDs on nexos.ai are the model names shown in the console (e.g. `GPT 5.6 Sol`, `Claude Sonnet 5`, `Whisper`). List them with `GET /v1/models`.

### Chat Completion

Send a conversation and get the model's next reply — the standard OpenAI-compatible endpoint, supported by most chat models on the platform.

```python
import os

from dotenv import load_dotenv
from openai import OpenAI
from openai.types.chat import ChatCompletionUserMessageParam, ChatCompletion

load_dotenv()
api_key = os.environ["API_KEY"]

openai = OpenAI(
    api_key=api_key,
    base_url="https://api.nexos.ai/v1",
)
message: ChatCompletionUserMessageParam = {
    "role": "user",
    "content": "how many letters 'r' in the word 'strawberry'",
}
response: ChatCompletion = openai.chat.completions.create(model="GPT 5.6 Sol", messages=[message])
print(response.choices[0].message.content)
```

### Messages

The `/v1/messages` endpoint implements the Anthropic Messages API and works with the official Anthropic SDK (`pip install anthropic`). It is available for models that list the `messages` endpoint in `GET /v1/models` (e.g. Claude models).

```python
import os

from anthropic import Anthropic
from anthropic.types import Message
from dotenv import load_dotenv

load_dotenv()
api_key = os.environ["API_KEY"]
# The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1

anthropic = Anthropic(
    api_key=api_key,
    base_url="https://api.nexos.ai",
)
response: Message = anthropic.messages.create(
    model="Claude Sonnet 5",
    max_tokens=1024,
    messages=[
        {
            "role": "user",
            "content": "how many letters 'r' in the word 'strawberry'",
        }
    ],
)
# Claude Sonnet 5 responses may start with a thinking block, so pick the text block explicitly
for block in response.content:
    if block.type == "text":
        print(block.text)
```

### Messages with prompt caching

Reuse a large, stable prompt prefix across calls to cut cost (cached tokens are \~10× cheaper) and latency. `/v1/messages` forwards `cache_control` byte-for-byte, so Anthropic prompt caching works natively. The cached prefix must exceed the model's minimum cacheable length (\~1024 tokens):

```python
import os

from anthropic import Anthropic
from dotenv import load_dotenv

load_dotenv()
api_key = os.environ["API_KEY"]
# The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1

anthropic = Anthropic(
    api_key=api_key,
    base_url="https://api.nexos.ai",
)

# The cached prefix must exceed the model's minimum cacheable length (~1024 tokens)
long_system_prompt = (
    "You are a meticulous linguist who counts letters in words. "
    "Always double-check your counts by spelling the word out letter by letter. "
) * 60

def ask() -> None:
    response = anthropic.messages.create(
        model="Claude Sonnet 5",
        max_tokens=1024,
        system=[
            {
                "type": "text",
                "text": long_system_prompt,
                "cache_control": {"type": "ephemeral"},
            }
        ],
        messages=[
            {
                "role": "user",
                "content": "how many letters 'r' in the word 'strawberry'",
            }
        ],
    )
    usage = response.usage
    print(
        f"cache_creation_input_tokens={usage.cache_creation_input_tokens} "
        f"cache_read_input_tokens={usage.cache_read_input_tokens}"
    )

ask()  # first call writes the cache
ask()  # second call reads it back at a reduced rate
```

### Messages streaming

Receive the reply incrementally as server-sent events instead of waiting for the whole message — useful for chat UIs and long outputs.

```python
import os

from anthropic import Anthropic
from dotenv import load_dotenv

load_dotenv()
api_key = os.environ["API_KEY"]
# The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1

anthropic = Anthropic(
    api_key=api_key,
    base_url="https://api.nexos.ai",
)
with anthropic.messages.stream(
    model="Claude Sonnet 5",
    max_tokens=1024,
    messages=[
        {
            "role": "user",
            "content": "how many letters 'r' in the word 'strawberry'",
        }
    ],
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)
print()
```

### Messages with thinking

Let the model reason internally before answering — the response starts with a `thinking` block followed by the final text.

```python
import os

from anthropic import Anthropic
from dotenv import load_dotenv

load_dotenv()
api_key = os.environ["API_KEY"]
# The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1

anthropic = Anthropic(
    api_key=api_key,
    base_url="https://api.nexos.ai",
)
# Claude 5 models use adaptive thinking with an effort level
# (older models use {"type": "enabled", "budget_tokens": N} instead)
response = anthropic.messages.create(
    model="Claude Sonnet 5",
    max_tokens=4096,
    thinking={"type": "adaptive"},
    output_config={"effort": "medium"},
    messages=[
        {
            "role": "user",
            "content": "how many letters 'r' in the word 'strawberry'",
        }
    ],
)
for block in response.content:
    if block.type == "thinking":
        print(f"[thinking] {block.thinking[:120]}...")
    elif block.type == "text":
        print(block.text)
```

### Messages with tool calls

Let the model call functions you define: it responds with a `tool_use` block, your code runs the tool and sends the result back, and the model produces the final answer.

```python
import os

from anthropic import Anthropic
from dotenv import load_dotenv

load_dotenv()
api_key = os.environ["API_KEY"]
# The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1

anthropic = Anthropic(
    api_key=api_key,
    base_url="https://api.nexos.ai",
)

tools = [
    {
        "name": "count_letters",
        "description": "Count occurrences of a letter in a word",
        "input_schema": {
            "type": "object",
            "properties": {
                "word": {"type": "string"},
                "letter": {"type": "string"},
            },
            "required": ["word", "letter"],
        },
    }
]
messages = [
    {
        "role": "user",
        "content": "Use the count_letters tool to count letters 'r' in the word 'strawberry'",
    }
]

response = anthropic.messages.create(
    model="Claude Sonnet 5",
    max_tokens=1024,
    tools=tools,
    messages=messages,
)
tool_use = next(block for block in response.content if block.type == "tool_use")
print(f"tool call: {tool_use.name}({tool_use.input})")

result = str(tool_use.input["word"].count(tool_use.input["letter"]))
messages.append({"role": "assistant", "content": response.content})
messages.append(
    {
        "role": "user",
        "content": [
            {
                "type": "tool_result",
                "tool_use_id": tool_use.id,
                "content": result,
            }
        ],
    }
)

final = anthropic.messages.create(
    model="Claude Sonnet 5",
    max_tokens=1024,
    tools=tools,
    messages=messages,
)
for block in final.content:
    if block.type == "text":
        print(block.text)
```

### Responses

OpenAI's newer generation API: send text or structured input items and get the model output back. Responses created with `store` can be retrieved and managed later.

```python
import os

from dotenv import load_dotenv
from openai import OpenAI
from openai.types.responses import Response

load_dotenv()
api_key = os.environ["API_KEY"]

openai = OpenAI(
    api_key=api_key,
    base_url="https://api.nexos.ai/v1",
)
response: Response = openai.responses.create(
    model="GPT 5.6 Sol",
    input="how many letters 'r' in the word 'strawberry'",
)
print(response.output_text)
```

### Responses - compact conversation

Compress a long stored conversation into a smaller context so it can keep going without hitting the model's context limit. Pass the last response's ID via previous\_response\_id — the API returns a new, compacted response whose ID you use to continue the conversation.

```python
import os

from dotenv import load_dotenv
from openai import OpenAI

load_dotenv()
api_key = os.environ["API_KEY"]

openai = OpenAI(
    api_key=api_key,
    base_url="https://api.nexos.ai/v1",
)

# Compacting summarizes a stored conversation so it can continue with a smaller context
response = openai.responses.create(
    model="GPT 5.6 Sol",
    input="how many letters 'r' in the word 'strawberry'",
    store=True,
)
print(f"created: {response.id}")

compacted = openai.responses.compact(
    model="GPT 5.6 Sol",
    previous_response_id=response.id,
    input=[],
)
print(f"compacted: {compacted.id}")
```

### Responses lifecycle

Stored responses (store=true) live on the platform after creation, so you can work with them later: retrieve a response by ID, list the input items it was created from, and delete it when it's no longer needed.

```python
import os

from dotenv import load_dotenv
from openai import OpenAI

load_dotenv()
api_key = os.environ["API_KEY"]

openai = OpenAI(
    api_key=api_key,
    base_url="https://api.nexos.ai/v1",
)

# Create a stored response
response = openai.responses.create(
    model="GPT 5.6 Sol",
    input="how many letters 'r' in the word 'strawberry'",
    store=True,
)
print(f"created: {response.id}")
print(f"output: {response.output_text}")

# Get a model response
retrieved = openai.responses.retrieve(response.id)
print(f"retrieved: {retrieved.id} status={retrieved.status}")

# List input items
input_items = openai.responses.input_items.list(response.id)
for item in input_items.data:
    print(f"input item: {item.type}")

# Delete a model response
openai.responses.delete(response.id)
print(f"deleted: {response.id}")
```

### Embedding

Convert text into a numeric vector for semantic search, clustering, and RAG. One vector is returned per input.

```python
import os

from dotenv import load_dotenv
from openai import OpenAI
from openai.types.create_embedding_response import CreateEmbeddingResponse

load_dotenv()
api_key = os.environ["API_KEY"]

openai = OpenAI(
    api_key=api_key,
    base_url="https://api.nexos.ai/v1",
)
response: CreateEmbeddingResponse = openai.embeddings.create(
    model="Text Embedding 3 Large",
    input="There are three letters 'r' in the word 'strawberry'.",
)
embedding = response.data[0].embedding
print(f"dimensions: {len(embedding)}")
print(f"first values: {embedding[:5]}")
```

### Audio Generation

Convert text to spoken audio (text-to-speech).

```python
import os

from dotenv import load_dotenv
from openai import OpenAI

load_dotenv()
api_key = os.environ["API_KEY"]

openai = OpenAI(
    api_key=api_key,
    base_url="https://api.nexos.ai/v1",
)
response = openai.audio.speech.create(
    input="There are three letters 'r' in the word 'strawberry'.",
    model="tts-1",
    voice="alloy",
)
response.write_to_file("generated.mp3")
```

### Audio Transcription

Transcribe an audio file to text in its original language. The example reads `sound.mp3` — you can create one with the Audio Generation example above.

```python
import os

from dotenv import load_dotenv
from openai import OpenAI

load_dotenv()
api_key = os.environ["API_KEY"]

openai = OpenAI(api_key=api_key, base_url="https://api.nexos.ai/v1")
response = openai.audio.transcriptions.create(file=open('sound.mp3', 'rb'), model='Whisper')
print(response.text)
```

### Audio Translation

Transcribe an audio file and translate the text into English. The example reads `sound.mp3` — you can create one with the Audio Generation example above.

```python
import os

from dotenv import load_dotenv
from openai import OpenAI

load_dotenv()
api_key = os.environ["API_KEY"]

openai = OpenAI(api_key=api_key, base_url="https://api.nexos.ai/v1")
response = openai.audio.translations.create(file=open("sound.mp3", "rb"), model="Whisper")
print(response.text)
```

### Image Generation

Generate an image from a text prompt.

```python
import base64
import os

from dotenv import load_dotenv
from openai import OpenAI
from openai.types.images_response import ImagesResponse

load_dotenv()
api_key = os.environ["API_KEY"]

openai = OpenAI(
    api_key=api_key,
    base_url="https://api.nexos.ai/v1",
)
response: ImagesResponse = openai.images.generate(
    prompt="three letters 'r' with strawberry texture",
    model="GPT Image 2",
)
if response.data is not None:
    image = response.data[0]
    if image.url is not None:
        print(image.url)
    elif image.b64_json is not None:
        with open("generated.png", "wb") as f:
            f.write(base64.b64decode(image.b64_json))
        print("saved to generated.png")
```


# Go SDK

### Setup <a href="#setup" id="setup"></a>

For Open AI compatible:

```bash
go get github.com/openai/openai-go/v3
go get github.com/joho/godotenv
```

For Anthropic compatible:

```go
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
"github.com/joho/godotenv"
```

All examples read the API key from a `.env` file. OpenAI SDK clients use the base URL `https://api.nexos.ai/v1`; the Anthropic SDK appends `/v1/messages` itself, so it takes the bare `https://api.nexos.ai`.

```
API_KEY=YOUR_NEXOS_API_KEY
```

Model IDs on nexos.ai are the model names shown in the console (e.g. `GPT 5.6 Sol`, `Claude Sonnet 5`, `Whisper`). List them with `GET /v1/models`.

### Chat Completion

Send a conversation and get the model's next reply — the standard OpenAI-compatible endpoint, supported by most chat models on the platform.

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/joho/godotenv"
	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	client := openai.NewClient(
		option.WithBaseURL("https://api.nexos.ai/v1"),
		option.WithAPIKey(apiKey),
	)
	response, err := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{
		Model: "GPT 5.6 Sol",
		Messages: []openai.ChatCompletionMessageParamUnion{
			openai.UserMessage("how many letters 'r' in the word 'strawberry'"),
		},
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(response.Choices[0].Message.Content)
}
```

### Messages

The `/v1/messages` endpoint implements the Anthropic Messages API and works with the official Anthropic SDK (`go get github.com/anthropics/anthropic-sdk-go`). It is available for models that list the `messages` endpoint in `GET /v1/models` (e.g. Claude models).

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
	"github.com/joho/godotenv"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	// The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1
	client := anthropic.NewClient(
		option.WithBaseURL("https://api.nexos.ai"),
		option.WithAPIKey(apiKey),
	)
	response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
		Model:     "Claude Sonnet 5",
		MaxTokens: 1024,
		Messages: []anthropic.MessageParam{
			anthropic.NewUserMessage(anthropic.NewTextBlock("how many letters 'r' in the word 'strawberry'")),
		},
	})
	if err != nil {
		panic(err)
	}
	// Claude Sonnet 5 responses may start with a thinking block, so pick the text block explicitly
	for _, block := range response.Content {
		if block.Type == "text" {
			fmt.Println(block.Text)
		}
	}
}
```

### Messages - prompt caching

Reuse a large, stable prompt prefix across calls to cut cost (cached tokens are \~10× cheaper) and latency. `/v1/messages` forwards `cache_control` byte-for-byte, so Anthropic prompt caching works natively. The cached prefix must exceed the model's minimum cacheable length (\~1024 tokens):

```go
package main

import (
	"context"
	"fmt"
	"os"
	"strings"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
	"github.com/joho/godotenv"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	// The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1
	client := anthropic.NewClient(
		option.WithBaseURL("https://api.nexos.ai"),
		option.WithAPIKey(apiKey),
	)
	ctx := context.Background()

	// The cached prefix must exceed the model's minimum cacheable length (~1024 tokens)
	longSystemPrompt := strings.Repeat(
		"You are a meticulous linguist who counts letters in words. "+
			"Always double-check your counts by spelling the word out letter by letter. ", 60)

	ask := func() {
		response, err := client.Messages.New(ctx, anthropic.MessageNewParams{
			Model:     "Claude Sonnet 5",
			MaxTokens: 1024,
			System: []anthropic.TextBlockParam{
				{
					Text:         longSystemPrompt,
					CacheControl: anthropic.NewCacheControlEphemeralParam(),
				},
			},
			Messages: []anthropic.MessageParam{
				anthropic.NewUserMessage(anthropic.NewTextBlock("how many letters 'r' in the word 'strawberry'")),
			},
		})
		if err != nil {
			panic(err)
		}
		fmt.Printf("cache_creation_input_tokens=%d cache_read_input_tokens=%d\n",
			response.Usage.CacheCreationInputTokens, response.Usage.CacheReadInputTokens)
	}

	ask() // first call writes the cache
	ask() // second call reads it back at a reduced rate
}
```

### Messages streaming

Receive the reply incrementally as server-sent events instead of waiting for the whole message — useful for chat UIs and long outputs.

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
	"github.com/joho/godotenv"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	// The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1
	client := anthropic.NewClient(
		option.WithBaseURL("https://api.nexos.ai"),
		option.WithAPIKey(apiKey),
	)
	stream := client.Messages.NewStreaming(context.Background(), anthropic.MessageNewParams{
		Model:     "Claude Sonnet 5",
		MaxTokens: 1024,
		Messages: []anthropic.MessageParam{
			anthropic.NewUserMessage(anthropic.NewTextBlock("how many letters 'r' in the word 'strawberry'")),
		},
	})
	for stream.Next() {
		event := stream.Current()
		switch eventVariant := event.AsAny().(type) {
		case anthropic.ContentBlockDeltaEvent:
			switch deltaVariant := eventVariant.Delta.AsAny().(type) {
			case anthropic.TextDelta:
				fmt.Print(deltaVariant.Text)
			}
		}
	}
	if stream.Err() != nil {
		panic(stream.Err())
	}
	fmt.Println()
}
```

### Messages with thinking

Let the model reason internally before answering — the response starts with a `thinking` block followed by the final text.

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
	"github.com/joho/godotenv"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	// The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1
	client := anthropic.NewClient(
		option.WithBaseURL("https://api.nexos.ai"),
		option.WithAPIKey(apiKey),
	)

	// Claude 5 models use adaptive thinking with an effort level
	// (older models use ThinkingConfigParamOfEnabled(budgetTokens) instead)
	response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
		Model:     "Claude Sonnet 5",
		MaxTokens: 4096,
		Thinking: anthropic.ThinkingConfigParamUnion{
			OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
		},
		OutputConfig: anthropic.OutputConfigParam{
			Effort: anthropic.OutputConfigEffortMedium,
		},
		Messages: []anthropic.MessageParam{
			anthropic.NewUserMessage(anthropic.NewTextBlock("how many letters 'r' in the word 'strawberry'")),
		},
	})
	if err != nil {
		panic(err)
	}
	for _, block := range response.Content {
		switch variant := block.AsAny().(type) {
		case anthropic.ThinkingBlock:
			thinking := variant.Thinking
			if len(thinking) > 120 {
				thinking = thinking[:120]
			}
			fmt.Printf("[thinking] %s...\n", thinking)
		case anthropic.TextBlock:
			fmt.Println(variant.Text)
		}
	}
}
```

### Messages with tool calls

Let the model call functions you define: it responds with a `tool_use` block, your code runs the tool and sends the result back, and the model produces the final answer.

```go
package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"
	"strconv"
	"strings"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
	"github.com/joho/godotenv"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	// The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1
	client := anthropic.NewClient(
		option.WithBaseURL("https://api.nexos.ai"),
		option.WithAPIKey(apiKey),
	)
	ctx := context.Background()

	tools := []anthropic.ToolUnionParam{
		{
			OfTool: &anthropic.ToolParam{
				Name:        "count_letters",
				Description: anthropic.String("Count occurrences of a letter in a word"),
				InputSchema: anthropic.ToolInputSchemaParam{
					Properties: map[string]any{
						"word":   map[string]any{"type": "string"},
						"letter": map[string]any{"type": "string"},
					},
					Required: []string{"word", "letter"},
				},
			},
		},
	}
	messages := []anthropic.MessageParam{
		anthropic.NewUserMessage(anthropic.NewTextBlock("Use the count_letters tool to count letters 'r' in the word 'strawberry'")),
	}

	response, err := client.Messages.New(ctx, anthropic.MessageNewParams{
		Model:     "Claude Sonnet 5",
		MaxTokens: 1024,
		Tools:     tools,
		Messages:  messages,
	})
	if err != nil {
		panic(err)
	}

	var toolUse anthropic.ToolUseBlock
	for _, block := range response.Content {
		if variant, ok := block.AsAny().(anthropic.ToolUseBlock); ok {
			toolUse = variant
		}
	}
	fmt.Printf("tool call: %s(%s)\n", toolUse.Name, string(toolUse.Input))

	var input struct {
		Word   string `json:"word"`
		Letter string `json:"letter"`
	}
	err = json.Unmarshal(toolUse.Input, &input)
	if err != nil {
		panic(err)
	}
	result := strconv.Itoa(strings.Count(input.Word, input.Letter))

	messages = append(messages, response.ToParam())
	messages = append(messages, anthropic.NewUserMessage(anthropic.NewToolResultBlock(toolUse.ID, result, false)))

	final, err := client.Messages.New(ctx, anthropic.MessageNewParams{
		Model:     "Claude Sonnet 5",
		MaxTokens: 1024,
		Tools:     tools,
		Messages:  messages,
	})
	if err != nil {
		panic(err)
	}
	for _, block := range final.Content {
		if block.Type == "text" {
			fmt.Println(block.Text)
		}
	}
}
```

### Responses

OpenAI's newer generation API: send text or structured input items and get the model output back.&#x20;

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/joho/godotenv"
	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
	"github.com/openai/openai-go/v3/responses"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	client := openai.NewClient(
		option.WithBaseURL("https://api.nexos.ai/v1"),
		option.WithAPIKey(apiKey),
	)
	response, err := client.Responses.New(context.Background(), responses.ResponseNewParams{
		Model: "GPT 5.6 Sol",
		Input: responses.ResponseNewParamsInputUnion{
			OfString: openai.String("how many letters 'r' in the word 'strawberry'"),
		},
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(response.OutputText())
}
```

### Responses - compact conversation

Compress a long stored conversation into a smaller context so it can keep going without hitting the model's context limit. Pass the last response's ID via\
`previous_response_id` — the API returns a new, compacted response whose ID you use to continue the conversation.

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/joho/godotenv"
	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
	"github.com/openai/openai-go/v3/responses"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	client := openai.NewClient(
		option.WithBaseURL("https://api.nexos.ai/v1"),
		option.WithAPIKey(apiKey),
	)
	ctx := context.Background()

	// Compacting summarizes a stored conversation so it can continue with a smaller context
	response, err := client.Responses.New(ctx, responses.ResponseNewParams{
		Model: "GPT 5.6 Sol",
		Input: responses.ResponseNewParamsInputUnion{
			OfString: openai.String("how many letters 'r' in the word 'strawberry'"),
		},
		Store: openai.Bool(true),
	})
	if err != nil {
		panic(err)
	}
	fmt.Printf("created: %s\n", response.ID)

	compacted, err := client.Responses.Compact(ctx, responses.ResponseCompactParams{
		Model:              "GPT 5.6 Sol",
		PreviousResponseID: openai.String(response.ID),
		Input:              responses.ResponseCompactParamsInputUnion{OfResponseInputItemArray: []responses.ResponseInputItemUnionParam{}},
	})
	if err != nil {
		panic(err)
	}
	fmt.Printf("compacted: %s\n", compacted.ID)
}
```

### Responses lifecycle

Stored responses (store=true) live on the platform after creation, so you can work with them later: retrieve a response by ID, list the input items it was created from, and delete it when it's no longer needed.

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/joho/godotenv"
	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
	"github.com/openai/openai-go/v3/responses"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	client := openai.NewClient(
		option.WithBaseURL("https://api.nexos.ai/v1"),
		option.WithAPIKey(apiKey),
	)
	ctx := context.Background()

	// Create a stored response
	response, err := client.Responses.New(ctx, responses.ResponseNewParams{
		Model: "GPT 5.6 Sol",
		Input: responses.ResponseNewParamsInputUnion{
			OfString: openai.String("how many letters 'r' in the word 'strawberry'"),
		},
		Store: openai.Bool(true),
	})
	if err != nil {
		panic(err)
	}
	fmt.Printf("created: %s\n", response.ID)
	fmt.Printf("output: %s\n", response.OutputText())

	// Get a model response
	retrieved, err := client.Responses.Get(ctx, response.ID, responses.ResponseGetParams{})
	if err != nil {
		panic(err)
	}
	fmt.Printf("retrieved: %s status=%s\n", retrieved.ID, retrieved.Status)

	// List input items
	inputItems, err := client.Responses.InputItems.List(ctx, response.ID, responses.InputItemListParams{})
	if err != nil {
		panic(err)
	}
	for _, item := range inputItems.Data {
		fmt.Printf("input item: %s\n", item.Type)
	}

	// Delete a model response
	err = client.Responses.Delete(ctx, response.ID)
	if err != nil {
		panic(err)
	}
	fmt.Printf("deleted: %s\n", response.ID)
}
```

### Embeddings

Convert text into a numeric vector for semantic search, clustering, and RAG. One vector is returned per input.

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/joho/godotenv"
	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	client := openai.NewClient(
		option.WithBaseURL("https://api.nexos.ai/v1"),
		option.WithAPIKey(apiKey),
	)
	response, err := client.Embeddings.New(context.Background(), openai.EmbeddingNewParams{
		Model: "Text Embedding 3 Large",
		Input: openai.EmbeddingNewParamsInputUnion{
			OfString: openai.String("There are three letters 'r' in the word 'strawberry'."),
		},
	})
	if err != nil {
		panic(err)
	}
	embedding := response.Data[0].Embedding
	fmt.Printf("dimensions: %d\n", len(embedding))
	fmt.Printf("first values: %v\n", embedding[:5])
}
```

### Audio Generation

Convert text to spoken audio (text-to-speech).

```go
package main

import (
	"context"
	"io"
	"os"

	"github.com/joho/godotenv"
	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	client := openai.NewClient(
		option.WithBaseURL("https://api.nexos.ai/v1"),
		option.WithAPIKey(apiKey),
	)
	response, err := client.Audio.Speech.New(context.Background(), openai.AudioSpeechNewParams{
		Model: "tts-1",
		Input: "There are three letters 'r' in the word 'strawberry'.",
		Voice: openai.AudioSpeechNewParamsVoiceUnion{OfString: openai.String("ash")},
	})
	if err != nil {
		panic(err)
	}
	file, err := os.Create("generated.mp3")
	if err != nil {
		panic(err)
	}
	defer file.Close()
	_, err = io.Copy(file, response.Body)
	if err != nil {
		panic(err)
	}
}
```

### Audio Transcription

Transcribe an audio file to text in its original language.

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/joho/godotenv"
	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	client := openai.NewClient(
		option.WithBaseURL("https://api.nexos.ai/v1"),
		option.WithAPIKey(apiKey),
	)
	file, err := os.Open("sound.mp3")
	if err != nil {
		panic(err)
	}
	defer file.Close()
	response, err := client.Audio.Transcriptions.New(context.Background(), openai.AudioTranscriptionNewParams{
		Model: "Whisper",
		File:  file,
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(response.Text)
}
```

### Audio Translation

Transcribe an audio file and translate the text into English.

```go
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/joho/godotenv"
	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	client := openai.NewClient(
		option.WithBaseURL("https://api.nexos.ai/v1"),
		option.WithAPIKey(apiKey),
	)
	file, err := os.Open("sound.mp3")
	if err != nil {
		panic(err)
	}
	defer file.Close()
	response, err := client.Audio.Translations.New(context.Background(), openai.AudioTranslationNewParams{
		Model: "Whisper",
		File:  file,
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(response.Text)
}
```

### Image Generation

Generate an image from a text prompt.

```go
package main

import (
	"context"
	"encoding/base64"
	"fmt"
	"os"

	"github.com/joho/godotenv"
	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
)

func main() {
	err := godotenv.Load()
	if err != nil {
		panic(err)
	}
	apiKey := os.Getenv("API_KEY")
	client := openai.NewClient(
		option.WithBaseURL("https://api.nexos.ai/v1"),
		option.WithAPIKey(apiKey),
	)
	response, err := client.Images.Generate(context.Background(), openai.ImageGenerateParams{
		Model:  "GPT Image 2",
		Prompt: "three letters 'r' with strawberry texture",
	})
	if err != nil {
		panic(err)
	}
	image := response.Data[0]
	if image.URL != "" {
		fmt.Println(image.URL)
		return
	}
	data, err := base64.StdEncoding.DecodeString(image.B64JSON)
	if err != nil {
		panic(err)
	}
	err = os.WriteFile("generated.png", data, 0o644)
	if err != nil {
		panic(err)
	}
	fmt.Println("saved to generated.png")
}
```


# .NET SDK

Runnable versions of every example on this page live in [nexos-ai/dotnet-examples](https://github.com/nexos-ai/dotnet-examples).

## Setup

Install the packages:

```bash
dotnet add package Microsoft.Extensions.AI
dotnet add package Microsoft.Extensions.AI.OpenAI
dotnet add package DotNetEnv
```

All examples read the API key from a `.env` file:

```
API_KEY=YOUR_NEXOS_API_KEY
```

OpenAI-compatible clients use the base URL `https://api.nexos.ai/v1`; the Anthropic Messages API takes the bare `https://api.nexos.ai` because the SDK appends `/v1/messages` itself.

Model IDs on nexos.ai are the model names shown in the console (e.g. `GPT 5.5`, `Claude Sonnet 5`, `Whisper`). List them with `GET /v1/models`.

The examples below use `Microsoft.Extensions.AI` — the provider-neutral abstraction layer — over an `OpenAIClient` pointed at the gateway. Where a capability has no `Microsoft.Extensions.AI` surface, the raw `OpenAI` SDK client is used directly.

## Chat Completion

Send a conversation and get the model's next reply — the standard OpenAI-compatible endpoint, supported by most chat models on the platform.

```csharp
using DotNetEnv;
using Microsoft.Extensions.AI;
using OpenAI;
using System.ClientModel;

Env.TraversePath().Load();
var apiKey = Environment.GetEnvironmentVariable("API_KEY")!;

var options = new OpenAIClientOptions { Endpoint = new Uri("https://api.nexos.ai/v1") };

IChatClient chatClient = new OpenAIClient(new ApiKeyCredential(apiKey), options)
    .GetChatClient("GPT 5.5")
    .AsIChatClient();

var response = await chatClient.GetResponseAsync(
    "how many letters 'r' in the word 'strawberry'");

Console.WriteLine(response.Text);
```

## Chat Completion with history

Keep the full message list between turns so the model can resolve references to earlier context.

```csharp
List<ChatMessage> messages =
[
    new(ChatRole.System, "You are a meticulous linguist who counts letters in words."),
    new(ChatRole.User, "how many letters 'r' in the word 'strawberry'"),
];

var first = await chatClient.GetResponseAsync(messages);
Console.WriteLine(first.Text);

messages.AddMessages(first);
messages.Add(new ChatMessage(ChatRole.User, "and how many 'b'?"));

var second = await chatClient.GetResponseAsync(messages);
Console.WriteLine(second.Text);
```

## Streaming

Receive the reply incrementally as server-sent events instead of waiting for the whole message — useful for chat UIs and long outputs.

```csharp
await foreach (var update in chatClient.GetStreamingResponseAsync(
    "how many letters 'r' in the word 'strawberry'"))
{
    Console.Write(update.Text);
}

Console.WriteLine();
```

## Reasoning

Let the model reason internally before answering — the response carries reasoning content alongside the final text. Reasoning effort is an experimental surface in the OpenAI SDK, so the `OPENAI001` diagnostic is suppressed.

```csharp
#pragma warning disable OPENAI001

using Microsoft.Extensions.AI;
using OpenAI.Chat;

var chatOptions = new ChatOptions
{
    RawRepresentationFactory = _ => new ChatCompletionOptions
    {
        ReasoningEffortLevel = ChatReasoningEffortLevel.Medium,
    },
};

var response = await chatClient.GetResponseAsync(
    "how many letters 'r' in the word 'strawberry'",
    chatOptions);

foreach (var content in response.Messages.SelectMany(m => m.Contents))
{
    if (content is TextReasoningContent reasoning)
    {
        Console.WriteLine($"[thinking] {reasoning.Text}");
    }
    else if (content is TextContent text)
    {
        Console.WriteLine(text.Text);
    }
}

#pragma warning restore OPENAI001
```

## Function calling

Let the model call functions you define. With `FunctionInvokingChatClient` in the pipeline, the round trip is automatic: the model requests the tool, the client runs your delegate, sends the result back, and returns the final answer.

```csharp
using Microsoft.Extensions.AI;

[Description("Count occurrences of a letter in a word")]
static int CountLetters(string word, string letter) =>
    word.Count(c => c.ToString().Equals(letter, StringComparison.OrdinalIgnoreCase));

IChatClient chatClient = new OpenAIClient(new ApiKeyCredential(apiKey), options)
    .GetChatClient("GPT 5.5")
    .AsIChatClient()
    .AsBuilder()
    .UseFunctionInvocation()
    .Build();

var chatOptions = new ChatOptions
{
    Tools = [AIFunctionFactory.Create(CountLetters)],
};

var response = await chatClient.GetResponseAsync(
    "Use the count_letters tool to count letters 'r' in the word 'strawberry'",
    chatOptions);

Console.WriteLine(response.Text);
```

## Caching

Wrap the client in `DistributedCachingChatClient` to serve identical requests from a local cache instead of calling the gateway again — the second call below returns without a network round trip.

```csharp
using Microsoft.Extensions.AI;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Options;

IDistributedCache cache = new MemoryDistributedCache(
    Options.Create(new MemoryDistributedCacheOptions()));

IChatClient chatClient = new OpenAIClient(new ApiKeyCredential(apiKey), options)
    .GetChatClient("GPT 5.5")
    .AsIChatClient()
    .AsBuilder()
    .UseDistributedCache(cache)
    .Build();

const string prompt = "how many letters 'r' in the word 'strawberry'";

var first = await chatClient.GetResponseAsync(prompt);   // hits the gateway
var second = await chatClient.GetResponseAsync(prompt);  // served from cache

Console.WriteLine(first.Text);
Console.WriteLine(second.Text);
```

## Structured output

Ask for the answer as a typed .NET object. The client derives a JSON schema from the record, sends it as the response format, and deserializes the reply.

```csharp
using Microsoft.Extensions.AI;

record LetterCount(string Word, string Letter, int Count);

var response = await chatClient.GetResponseAsync<LetterCount>(
    "how many letters 'r' in the word 'strawberry'");

var result = response.Result;
Console.WriteLine($"{result.Letter} appears {result.Count} times in {result.Word}");
```

## Embedding

Convert text into a numeric vector for semantic search, clustering, and RAG. One vector is returned per input.

```csharp
using Microsoft.Extensions.AI;
using OpenAI;
using System.ClientModel;

var options = new OpenAIClientOptions { Endpoint = new Uri("https://api.nexos.ai/v1") };

IEmbeddingGenerator<string, Embedding<float>> generator =
    new OpenAIClient(new ApiKeyCredential(apiKey), options)
        .GetEmbeddingClient("Text Embedding 3 Large")
        .AsIEmbeddingGenerator();

var embedding = await generator.GenerateVectorAsync(
    "There are three letters 'r' in the word 'strawberry'.");

Console.WriteLine($"dimensions: {embedding.Length}");
Console.WriteLine($"first values: {string.Join(", ", embedding.ToArray().Take(5))}");
```

## Image Generation

Generate an image from a text prompt. `IImageGenerator` is experimental in `Microsoft.Extensions.AI.Abstractions`, so the `MEAI001` diagnostic is suppressed.

```csharp
#pragma warning disable MEAI001

using Microsoft.Extensions.AI;

IImageGenerator imageGenerator = new OpenAIClient(new ApiKeyCredential(apiKey), options)
    .GetImageClient("GPT Image 2")
    .AsIImageGenerator();

var response = await imageGenerator.GenerateImagesAsync(
    "three letters 'r' with strawberry texture");

foreach (var content in response.Contents)
{
    if (content is UriContent uri)
    {
        Console.WriteLine(uri.Uri);
    }
    else if (content is DataContent data)
    {
        await File.WriteAllBytesAsync("generated.png", data.Data.ToArray());
        Console.WriteLine("saved to generated.png");
    }
}

#pragma warning restore MEAI001
```

## Audio Generation

Convert text to spoken audio (text-to-speech).

```csharp
using OpenAI;
using OpenAI.Audio;
using System.ClientModel;

var options = new OpenAIClientOptions { Endpoint = new Uri("https://api.nexos.ai/v1") };
var audioClient = new OpenAIClient(new ApiKeyCredential(apiKey), options)
    .GetAudioClient("tts-1");

BinaryData speech = await audioClient.GenerateSpeechAsync(
    "There are three letters 'r' in the word 'strawberry'.",
    GeneratedSpeechVoice.Alloy);

await File.WriteAllBytesAsync("generated.mp3", speech.ToArray());
```

## Audio Transcription

Transcribe an audio file to text in its original language. The example reads `sound.mp3` — you can create one with the Audio Generation example above.

```csharp
using OpenAI.Audio;

var audioClient = new OpenAIClient(new ApiKeyCredential(apiKey), options)
    .GetAudioClient("Whisper");

var transcription = await audioClient.TranscribeAudioAsync("sound.mp3");

Console.WriteLine(transcription.Value.Text);
```

## Audio Translation

Transcribe an audio file and translate the text into English. The example reads `sound.mp3` — you can create one with the Audio Generation example above.

```csharp
using OpenAI.Audio;

var audioClient = new OpenAIClient(new ApiKeyCredential(apiKey), options)
    .GetAudioClient("Whisper");

var translation = await audioClient.TranslateAudioAsync("sound.mp3");

Console.WriteLine(translation.Value.Text);
```

## Dependency injection

In ASP.NET Core, register `IChatClient` once and inject it wherever it's needed. The key comes from configuration — user secrets, an environment variable, or `appsettings.Development.json`.

```csharp
using Microsoft.Extensions.AI;
using OpenAI;
using System.ClientModel;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddChatClient(sp =>
{
    var apiKey = sp.GetRequiredService<IConfiguration>()["API_KEY"]!;
    var options = new OpenAIClientOptions { Endpoint = new Uri("https://api.nexos.ai/v1") };

    return new OpenAIClient(new ApiKeyCredential(apiKey), options)
        .GetChatClient("GPT 5.5")
        .AsIChatClient();
})
.UseFunctionInvocation()
.UseLogging();

var app = builder.Build();

app.MapPost("/chat", async (ChatRequest request, IChatClient chatClient) =>
{
    var response = await chatClient.GetResponseAsync(request.Message);
    return Results.Ok(new { reply = response.Text });
});

app.Run();

record ChatRequest(string Message);
```

Set the key and call the endpoint:

```bash
dotnet user-secrets set API_KEY "YOUR_NEXOS_API_KEY"
dotnet run

curl -X POST http://localhost:5000/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "how many letters r in the word strawberry"}'
```

## Anthropic Messages API

The `/v1/messages` endpoint implements the Anthropic Messages API — including `cache_control` prompt caching, thinking blocks, and `tool_use` — and is available for models that list the messages endpoint in `GET /v1/models` (e.g. Claude models).

There is no Microsoft-owned provider for it. Use the community [`Anthropic.SDK`](https://www.nuget.org/packages/Anthropic.SDK) package against the bare base URL `https://api.nexos.ai`, or call the endpoint with a plain `HttpClient`.

```csharp
using Anthropic.SDK;
using Anthropic.SDK.Messaging;

// The Anthropic SDK appends /v1/messages itself, so the base URL must not include /v1
var anthropic = new AnthropicClient(new APIAuthentication(apiKey))
{
    ApiUrlFormat = "https://api.nexos.ai/{0}/{1}",
};

var response = await anthropic.Messages.GetClaudeMessageAsync(new MessageParameters
{
    Model = "Claude Sonnet 5",
    MaxTokens = 1024,
    Messages =
    [
        new Message(RoleType.User, "how many letters 'r' in the word 'strawberry'"),
    ],
});

Console.WriteLine(response.Message);
```


# OpenClaw on Hostinger

### **How to set up OpenClaw on Hostinger: AI model guide and fallbacks** <a href="#h-how-to-set-up-openclaw-on-hostinger" id="h-how-to-set-up-openclaw-on-hostinger"></a>

This documentation provides essential information about the AI models available through the OpenClaw platform, on how to configure them for optimal performance.

**Available AI models**:

* GPT 4.1 (default model)
* Claude Sonnet 4.5
* Gemini 3 Flash Preview
* Claude Opus 4
* Grok 4
* Claude Opus 4.6
* GPT 5.2

### How to Select and Configure AI Models and fallback in OpenClaw

OpenClaw allows you to choose from a variety of powerful AI models, each with different strengths and cost implications. By default, OpenClaw is configured to use GPT 4.1. However, for specific tasks or to manage your usage, you can easily switch models and set up fallbacks.

**Steps to Change Your Primary Model:**

1. Log in to your OpenClaw dashboard.
2. Navigate to `[Settings]` .
3. From the `[Primary model]` dropdown, select your desired LLM.
4. Save your changes.

**Setting Up Fallback Models:**

Fallback models are essential for ensuring service continuity. If your primary model is unavailable or exceeds its rate limits, OpenClaw can automatically switch to a pre-defined fallback.

1. In the `[Settings]` section, locate `[Fallbacks (comma-separated)]`.&#x20;
2. Enter one or more models `nexos/5adca0fc-xxxx-xxxx-xxxx-fa8a81ff649f` from the `[Model Selection]` list, ordering them by preference and separated by a comma.
3. Save your changes.

**Full Set Up Tutorial:** For a detailed tutorial on setting up OpenClaw, please refer to the Hostinger tutorial: [How to Set Up OpenClaw](https://www.hostinger.com/tutorials/how-to-set-up-openclaw).

**Disclaimer:** Please note that all rate limits, model availability, and pricing are subject to change based on adjustments from our underlying AI model providers and our internal platform policies. This documentation will be updated to reflect any such changes.

<br>


# testing gitlab sync


# Latest updates

***

**August 12**

### &#x20;<i class="fa-hexagon-nodes">:hexagon-nodes:</i>  Models

\
You can now explore all available models in one place, including what is available to you, what your company has enabled, and what nexos.ai supports across the full catalog. This makes it easier to discover models, compare them, and copy the exact model ID you need for API use.

This means you can:

* browse, search, sort, and filter models in one catalog
* see availability across different scopes, such as to you, your company, and across nexos.ai
* open a model detail page to review specs, pricing, privacy, and data retention
* copy the model ID with one click and use it directly in API calls

This feature is currently available through the **Gateway API**. Learn more [here](https://docs.nexos.ai/gateway-api/models).

***

**August 7**

### &#x20;<i class="fa-link">:link:</i>  Connect integrations mid-conversations&#x20;

\
nexos.ai can now prompt you to connect a required integration directly in the conversation when it needs access to a work tool to complete your request.

This means you can:

* connect tools like Figma, Miro, and other apps without leaving the conversation
* give nexos.ai access exactly when it is needed
* continue your task with less interruption when a required integration is missing
* move faster without manually setting everything up in advance

***

**July 30**

### &#x20;<i class="fa-message-bot">:message-bot:</i>  Microsoft Teams&#x20;

Microsoft Teams is now available in nexos.ai, so you can access AI directly from the conversations where your team already works.

This means you can:

* connect nexos.ai to Microsoft Teams
* research topics and analyze files without leaving Teams
* create content, manage tasks, and get results delivered back into the conversation
* continue work without switching between apps

***

**July**&#x20;

### &#x20;<i class="fa-message-bot">:message-bot:</i>  New models available from July&#x20;

New AI models are now available in nexos.ai: **Kimi K3**, **DeepSeek V4 Flash**, **GPT-5.6 Sol**, **Grok 4.5**, and **Gemini 3.6 Flash**.

This means you can:

* try the latest models as they become available in nexos.ai
* compare new options for speed, quality, and task fit
* choose from a broader set of models for different types of work

{% hint style="info" %}
Model availability may vary depending on your company settings.
{% endhint %}

***

**June 29**

### &#x20;<i class="fa-head-side-gear">:head-side-gear:</i>  Human-in-the-Loop (HITL) Approvals

nexos.ai can now pause before completing actions that change something in another tool, so you can review and approve the action before it happens. This works in both chat-based workflows and Agents, helping you stay in control of important changes.

This means you can:

* review actions like sending messages, creating tickets, updating records, or deleting data before they happen
* approve, decline, or set an integration to always approve for a specific agent
* keep read-only actions flowing normally without interruptions
* pick up pending approvals later from chat or Activity history if you step away

Try it in [Agents](https://workspace.nexos.ai/agents).

***

**June 29**

### &#x20;<i class="fa-globe-pointer">:globe-pointer:</i>  Web Scraper now supports URLs from more sources

Web Scraper can now automatically process URLs found in **web search results, uploaded text files, and Agent instructions**, in addition to user messages.

This enables Agents to analyze web pages and continue tasks automatically without requiring users to manually provide URLs.

***

**June 18**

### &#x20;<i class="fa-grid-round">:grid-round:</i>  Access nexos.ai directly from Slack, Telegram, and WhatsApp

You can now access nexos.ai directly from supported messaging apps like Slack, Telegram, and WhatsApp, so you can ask questions, get answers, and continue work without switching back to the workspace. This gives you a faster way to use nexos.ai from the tools your team already communicates in every day.

You can connect messaging apps from Settings → My apps and start using nexos.ai directly in the app you prefer. Once connected, you can continue conversations, ask questions, and complete tasks from the same nexos.ai account across supported messaging surfaces.

Available in [My apps](https://workspace.nexos.ai/management/apps)

***

**June 1**

### &#x20;<i class="fa-paperclip">:paperclip:</i> Higher file upload limits in chats

We've increased file upload limits to make it easier to work with larger documents and multi-file workflows in a single chat.&#x20;

These higher limits reduce the need to split documents across multiple chats, making research, document analysis, long PDFs, and file-heavy workflows much smoother.

**New limits:**

* **25 MB** per file
* **200 MB** total upload size per chat
* **Unlimited files** per chat

***

**May 27**

### &#x20;<i class="fa-file">:file:</i>  **File previews**

You can now preview generated files directly inside nexos.ai, including **PPTX** and **DOCX**, without leaving your workspace.

This means you can:

* open supported files instantly in the platform
* review documents, presentations, spreadsheets, and reports before downloading them
* stay in your workflow across Chats, Agents, Agent Drafts, and Projects

Available for **HTML, PDF, TXT, PNG, XLSX, CSV, PPTX, and DOCX**.

***

**May 16**

### &#x20;<i class="fa-magnifying-glass-waveform">:magnifying-glass-waveform:</i>  Chat search

Quickly find past conversations with the new **Chat Search**. Search by keyword across your **Chats** and **Agents** history to instantly jump back to previous discussions, answers, and context.

Use the search bar in the sidebar or the **CMD/CTRL + K** shortcut to start searching. *(Projects and Compare Models are not currently included.)*

***

**April 16**

### &#x20;<i class="fa-rocketchat">:rocketchat:</i>  Interactive Chat

nexos.ai can now pause during a conversation to ask follow-up questions when more context is needed, helping you get **stronger results without having to provide every detail upfront**.

This means you can:

* get more relevant responses when your request is broad or missing context
* let nexos.ai clarify details like audience, format, time period, tools, or output type before continuing
* reduce repeated prompting and manual back-and-forth
* reach the expected outcome faster

Available in [Chat](https://workspace.nexos.ai/chat).

***

**March 12**

### &#x20;<i class="fa-robot">:robot:</i>  Agent Builder and Scheduling

You can now create an AI Agent by simply describing what you need in plain language. Then set a schedule and let it run automatically in the background. This means you can:

* Create Agents without complex setup or forms
* Schedule recurring work (hourly, daily, monthly, or yearly) so you stop triggering agents manually
* Track every run in the Activity Log, so you always know what happened

You can find it in [Agents](https://workspace.nexos.ai/agents/new) (create a new agent from scratch, then add a schedule in the agent settings).

***

**March 6**

### &#x20;<i class="fa-coins">:coins:</i>  User Memory and Personalization

nexos.ai can now remember helpful context about you across Chats and Agents, so you spend less time repeating yourself and get more consistent answers.\
\
This means you can:

* Keep useful context between conversations with Memory
* Add your role and preferences so answers fit your style
* Use custom instructions (write your own or choose suggested options) to guide how responses are written
* Stay in control by turning Memory on or off and managing what is saved

You can find it in Settings → [Personalization](https://workspace.nexos.ai/user/settings?tab=personalization).

***

**February 26**

### &#x20;<i class="fa-coins">:coins:</i>  API Credits Add-on

You can now purchase API credits as an add on for nexos.ai. API usage is prepaid and runs on credits, where 1 euro equals 1 credit. The API works while you have credits available, and you can always see your remaining balance in Billing. API access requires a Pro plan, and Pro users will only have API access after they purchase credits.

***

**February 17**

### &#x20;<i class="fa-magnifying-glass-arrows-rotate">:magnifying-glass-arrows-rotate:</i>  Deep Research

Users can now use Deep Research to automate complex web searches and generate comprehensive, cited reports in minutes. The feature plans a search strategy, browses multiple sources across the web, and synthesizes everything into a structured report directly in your chat interface, saving you hours of manual data gathering.

***

**February 6**

### &#x20;<i class="fa-file-half-dashed">:file-half-dashed:</i>  AI Agents

Users can now create AI Agents from scratch or start fast with pre-made templates to automate routine tasks. Agents can then be connected to your tools like Google Drive, Gmail, SharePoint, Slack, and more.

Key capabilities:

* Create a no-code AI Agent in minutes, with a simple setup any team can master (Marketing, Sales, HR, etc.)
* Use ready-made templates or build from scratch
* Connect knowledge sources and integrations for real-time context
* Share AI Agents with your team
* Choose from top AI models and switch anytime

***

**January 30**

### &#x20;<i class="fa-wand-magic-sparkles">:wand-magic-sparkles:</i>  Smart Routing (Auto AI Model Selection)

Smart Routing is now available in Chat. Just pick "Auto" from the model menu and the system will automatically choose the most suitable organization-approved AI model for each message, based on your prompt and available models. You can switch back to a specific AI model anytime by reopening the model menu and choosing a different model.

***

**January 29**

### &#x20;<i class="fa-copy">:copy:</i>  File Generation & Analysis

Code Interpreter is available in Chat, Projects, and Agents. It helps users to analyze data, create charts, and generate downloadable files right inside nexos.ai.

Common use cases include cleaning and exporting CSVs, summarizing trends, creating reports, and finding data errors.

***

**December 18**

### &#x20;<i class="fa-sidebar-flip">:sidebar-flip:</i>  **Browser extension**

Browser extension for nexos.ai released for all Chromium-based browsers (Chrome, Edge, Brave, etc.)

Key capabilities:

* Page summarization with a single click
* Chat directly about webpage content
* Access to the same models available in nexos.ai Workspace
* Browser chat history syncs with nexos.ai Workspace

[Get it from Chrome Web Store](https://chromewebstore.google.com/detail/nexosai-make-ai-work-wher/oekflhblfcpkcopglgkomdcaopmejfdm)

***

**December 11**

### &#x20;<i class="fa-mobile">:mobile:</i>  **Mobile apps**

Mobile apps for nexos.ai have been released for iOS and Android

Features include:

* Access to all models and assistants available in the web app
* Synced conversations between web and mobile
* Photo and file analysis capabilities

[Download on iOS](https://apps.apple.com/us/app/nexos-ai/id6751948632)

[Download on Android](https://play.google.com/store/apps/details?id=ai.nexos.app\&pcampaignid=web_share)

***

**November 27**

### &#x20;<i class="fa-chart-tree-map">:chart-tree-map:</i>  **Integrations**

New integrations are now available for Microsoft SharePoint, Atlassian (Confluence, Jira, Compass), Slack, and HiBob with more coming soon.

Integrations are currently supported in Chat, and company owners can enable them under “Management / Integrations” in order for employees to use them.

All Integrations inherit the original work tool permissions and accesses - an employee will only be able to access the files they have permissions to view/edit.

***

**November 10**

### &#x20;<i class="fa-shield-check">:shield-check:</i>  **Company-wide guardrails**

Set organization-wide guardrails once, override per model, or exclude models entirely - with a clear priority: Excluded → Custom → Company. Configuration and visibility are now centralized in the Guardrails tab and Management → Models/Teams, replacing the old per‑model toggle.

***

**October 30**

### &#x20;<i class="fa-sparkles">:sparkles:</i>  **Auto-generated instructions in Assistants**&#x20;

Assistant setup just got easier with auto-generated instructions. Simply describe what you want your assistant to do in plain language, and we'll automatically craft detailed instructions for you. No more staring at blank fields or guessing what format to use - just explain your goal, review the generated instructions, and customize as needed.

***

**October 17**

### &#x20;<i class="fa-airplay">:airplay:</i>  **Streaming in Model Comparison**&#x20;

Model Comparison now streams responses in real-time. Watch as each model generates its answer character by character, making it immediately clear which models respond faster and how they construct their responses differently. The new streaming interface also makes the comparison experience more dynamic and engaging.

***

**October 17**

### &#x20;<i class="fa-user-magnifying-glass">:user-magnifying-glass:</i>  **Full list of Organization users**&#x20;

User management now includes a unified view across all teams. Instead of jumping between teams to manage individual users, you can now access and manage everyone from a single, comprehensive list. Search, filter, and update user permissions across your entire organization in one place.

***

**October 17**

### &#x20;<i class="fa-screwdriver-wrench">:screwdriver-wrench:</i>  **Log time selection** + **Log spans**&#x20;

We've expanded observability with Log Spans and extended visibility windows. Log Spans now provide line-by-line performance breakdowns for every request, giving you granular insights into exactly how your queries are processed. Plus, we've extended data retention significantly—logs are now available for 7 days (up from 1) and metrics for 90 days (up from 30).

***

**October 10**

### &#x20;<i class="fa-shield">:shield:</i>  **Guardrails for free trial companies**&#x20;

Free Trial companies can now access and configure Guardrails. This update allows trial users to create, test, and apply validators (such as Regex and No PII) to control model behavior and protect sensitive data.

***

**October 3**

### &#x20;<i class="fa-user">:user:</i>  **Assistants in compare models**&#x20;

We have added support for using custom assistants in Compare Models. You can now test assistants side‑by‑side with other models to evaluate performance and output differences.

***

**October 3**

### &#x20;<i class="fa-folder-image">:folder-image:</i>  **Image gen models**

We have added support for new image generation models: gpt-image-1 and imagen 4.0. These models are now available in the model selection menu for generating high‑quality AI‑created images.

<figure><img src="/files/u7tTCWqDkbhllxjbaBb2" alt=""><figcaption></figcaption></figure>

***

**September 16**

### <i class="fa-face-thinking">:face-thinking:</i>  **Reasoning**

Reasoning is now available across **chat**, **projects**, and **assistants**. You can now turn on a reasoning toggle to see when the model uses its internal “thinking” loop. This is how the model breaks down your query, decides which tools to use, and pulls everything together into a stronger response.

The result: more accurate, higher-quality answers from any model.

<figure><img src="/files/rRJ4nk7KfEO3Z64rChfh" alt=""><figcaption></figcaption></figure>

***

**September 16**

### <i class="fa-folder-image">:folder-image:</i>  Enhanced image recognition

We've improved our image data parsing in projects. Models can now better understand what's in pictures, identify image content, and extract text from handwritten notes and scanned documents for newly uploaded images, making visual information in your projects searchable and actionable.

***

**September 3**

### <i class="fa-message-check">:message-check:</i>  **A**nnotations & sources

We've improved annotation parsing and display: annotations now process more accurately and show multiple sources with clear citations, making it easier to track where information comes from. Available in Chats and Projects.

<figure><img src="/files/g6KZ5IX6QgxSQ75JxQj0" alt="" width="375"><figcaption></figcaption></figure>

***

**August 29**

### <i class="fa-paintbrush-pencil">:paintbrush-pencil:</i>  Creativity controls in Projects&#x20;

Not every task needs the same approach. Some demand strict facts, others thrive on fresh ideas. Now you can set the right creativity level for each Project:

* **Grounded** – facts only
* **Guided** – factual with light flexibility
* **Balanced** – blend of accuracy and creativity
* **Analytical** – structured, data-driven responses
* **Creative** – open, idea-driven exploration

Pick the mode that matches your work. More control, better outcomes.

***

**August 26**

### <i class="fa-share">:share:</i>  **Assistants & Projects sharing**&#x20;

Assistants can now be shared with teams or individual users.\
\
Choose whether others can **view or edit** your Assistants and Projects, with role-based permissions for better control.

***

**August 12**

### <i class="fa-sparkles">:sparkles:</i>  **Assistants now available**

You can now create **reusable custom assistants with their own role, rules and model.**

Add your files and knowledge → set instructions → get an AI Assistant built for your tasks.

[**More on how-to in our docs →** ](/workspace/agents)

***

**August 8**

### <i class="fa-screwdriver-wrench">:screwdriver-wrench:</i>  **Improvements**

Improvements on Project files handling - less errors, quicker processing.

Better search results provision.

Better markdown parsing.&#x20;

***

**August 6**

### <i class="fa-sparkle">:sparkle:</i> **New models added**&#x20;

*Claude `Opus 4.1`  and* `Llama 4` *is now available.*\
Enable it in **Management → Models** to start generating with the newest Claude engine.

*`gpt-oss-120b` and `gpt-oss-20b` are now available.*\
Find them under **Management → Models** to enable and start using. \
Free-trial workspaces already have both  `OSS` models switched on.

***

#### July 31&#x20;

### <i class="fa-folder-open">:folder-open:</i> Projects now available

You can now create Projects: dedicated workspaces where AI works with your files, your context, and your knowledge.

Upload documents, start a conversation, switch models and everything stays in one place.\
Your files don’t mix across projects. Your history doesn’t reset.\
**Each Project keeps its own memory, so you can pick up where you left off, with answers grounded in the data you’ve provided.**


# Feature request

We’re building the most secure, enterprise-ready AI platform, and your input plays a huge role in that.\
Tell us what’s working, what’s missing, and what you need next.

{% embed url="<https://docs.google.com/forms/d/e/1FAIpQLSdhLWAAgo06znlUNpgO1npMVBIe0Yv3C4O2tfob9uG3LVNR2g/viewform?usp=header>" %}


# Models

<mark style="color:$primary;">Explore all available models in nexos.ai; we suggest using search if you have a specific model in mind - unless you'd like to read about 99+ models.</mark>

## nexos.ai Recommended Models

We focus on a select group of recommended models to guarantee full feature support and superior result quality. By using these models, you can access nexos.ai's complete capabilities: **document generation, deep research, and tool integrations** (Slack, Jira, Confluence, GitHub, and more) - ensuring the best possible performance and stability.

<table data-view="cards"><thead><tr><th align="center"></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td align="center"><strong>Anthropic</strong></td><td><ul><li>Claude Haiku 4.5</li></ul></td><td><ul><li>Claude Sonnet 4.6</li></ul></td><td><ul><li>Claude Opus 4.8</li></ul></td><td><ul><li>Claude Sonnet 5</li></ul></td><td><ul><li>Claude Opus 5</li></ul></td></tr><tr><td align="center"><strong>Google</strong></td><td><ul><li>Gemini 3 Flash Preview</li></ul></td><td><ul><li>Gemini 3.1 Pro Preview</li></ul></td><td><ul><li>Gemini 3.5 Flash</li></ul></td><td></td><td></td></tr><tr><td align="center"><strong>OpenAI</strong></td><td><ul><li>GPT 5.4 mini</li></ul></td><td><ul><li>GPT-OSS 120b</li></ul></td><td><ul><li>GPT 5.5</li></ul></td><td><ul><li>GPT 5.6 Terra</li></ul></td><td><ul><li>GPT 5.6 Sol</li></ul></td></tr></tbody></table>

### All Models

<details>

<summary>Annotations</summary>

<table><thead><tr><th width="241.03125"></th><th></th></tr></thead><tbody><tr><td><strong>Model</strong></td><td>Name of the model variant (includes version or size).</td></tr><tr><td><strong>Hosted</strong></td><td>Platform where the model is served (e.g. Azure, Bedrock, nexos.ai).</td></tr><tr><td><strong>Developer</strong></td><td>Organization that created the model (e.g. OpenAI, Meta, Google).</td></tr><tr><td><strong>Region</strong></td><td>Deployment location. <strong>EU</strong> = Europe, <strong>US</strong> = United States, <strong>OTHER</strong> = global or unspecified region.</td></tr><tr><td><strong>Info used for model training</strong></td><td>Indicates whether user inputs and model outputs are used to improve or retrain the model.</td></tr><tr><td><strong>Data Retention Period (days)</strong></td><td>Number of days that user inputs and model outputs are stored by the provider before automatic deletion.</td></tr><tr><td><strong>Input cost per 1M tokens</strong></td><td>Price for 1 million tokens sent to the model as input.</td></tr><tr><td><strong>Output cost per 1M tokens</strong></td><td>Price for 1 million tokens generated by the model as output.</td></tr><tr><td><strong>Cost per image</strong></td><td>Price per image generated by the model.</td></tr><tr><td><strong>Cache creation cost per 1M tokens</strong></td><td>Price for storing 1 million tokens in prompt cache.</td></tr><tr><td><strong>Cache creation cost per 1M tokens (1h TTL)</strong></td><td>Price for storing 1 million tokens in prompt cache with a 1-hour time-to-live.</td></tr><tr><td><strong>Cached input cost per 1M tokens</strong></td><td>Price for 1 million input tokens retrieved from prompt cache.</td></tr><tr><td><strong>Long context boundary</strong></td><td>Token threshold beyond which long-context pricing rates apply.</td></tr><tr><td><strong>Long context input cost per 1M tokens</strong></td><td>Price for 1 million input tokens when context length exceeds the boundary.</td></tr><tr><td><strong>Long context output cost per 1M tokens</strong></td><td>Price for 1 million output tokens when context length exceeds the boundary.</td></tr><tr><td><strong>Long context cache creation cost per 1M tokens</strong></td><td>Price for storing 1 million tokens in prompt cache when context length exceeds the boundary.</td></tr><tr><td><strong>Long context cache creation cost per 1M tokens (1h TTL)</strong></td><td>Price for storing 1 million tokens in prompt cache (1h TTL) when context length exceeds the boundary.</td></tr><tr><td><strong>Long context cached input cost per 1M tokens</strong></td><td>Price for 1 million input tokens retrieved from prompt cache when context length exceeds the boundary.</td></tr><tr><td><strong>Input cost per audio second</strong></td><td>Price for every second of audio input processed by the model.</td></tr></tbody></table>

</details>

{% hint style="info" %}
You may enable or disable large language models (LLMs) at your discretion and are solely responsible for such choice. Information about the LLMs below is sourced from publicly available terms and may change without notice. We strive to provide accurate information but make no guarantees. We encourage you to review official provider terms to verify all details.
{% endhint %}

<details>

<summary>Hosted by nexos.ai</summary>

**OpenAI**

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT-OSS 120b</td></tr><tr><td>Hosted</td><td>nexos.ai</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.8</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.08</td></tr></tbody></table>

</details>

<details>

<summary>Alibaba</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Qwen 3.7 Plus</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>Alibaba</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.08</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Qwen 3.8 Max</td></tr><tr><td>Hosted</td><td>Alibaba Cloud</td></tr><tr><td>Developer</td><td>Alibaba</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.65</td></tr><tr><td>Output cost per 1M tokens</td><td>$4.951</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.206</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Qwen 3.7 Plus</td></tr><tr><td>Hosted</td><td>Alibaba Cloud</td></tr><tr><td>Developer</td><td>Alibaba</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.2208</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.8808</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.0448</td></tr><tr><td>Long context boundary</td><td>256,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.6608</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$2.6408</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.1328</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Qwen 3.8 Max</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>Alibaba</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.25</td></tr></tbody></table>

</details>

<details>

<summary>Amazon</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Nova Lite</td></tr><tr><td>Hosted</td><td>Bedrock</td></tr><tr><td>Developer</td><td>Amazon</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.078</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.312</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.0195</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Nova Pro</td></tr><tr><td>Hosted</td><td>Bedrock</td></tr><tr><td>Developer</td><td>Amazon</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.05</td></tr><tr><td>Output cost per 1M tokens</td><td>$4.2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2625</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Nova 2 Lite</td></tr><tr><td>Hosted</td><td>Bedrock</td></tr><tr><td>Developer</td><td>Amazon</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.43</td></tr><tr><td>Output cost per 1M tokens</td><td>$3.597</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Nova Lite</td></tr><tr><td>Hosted</td><td>Bedrock</td></tr><tr><td>Developer</td><td>Amazon</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.06</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.24</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.015</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Nova Pro</td></tr><tr><td>Hosted</td><td>Bedrock</td></tr><tr><td>Developer</td><td>Amazon</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.8</td></tr><tr><td>Output cost per 1M tokens</td><td>$3.2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Nova Premier</td></tr><tr><td>Hosted</td><td>Bedrock</td></tr><tr><td>Developer</td><td>Amazon</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$12.5</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Nova 2 Lite</td></tr><tr><td>Hosted</td><td>Bedrock</td></tr><tr><td>Developer</td><td>Amazon</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.33</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.75</td></tr></tbody></table>

</details>

<details>

<summary>Anthropic</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 4.5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$3.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$4.13</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$6.6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.33</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$6.6</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$24.75</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$8.25</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$13.2</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.66</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Haiku 4.5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.1</td></tr><tr><td>Output cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$1.375</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$2.2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.11</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Haiku 4.5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1</td></tr><tr><td>Output cost per 1M tokens</td><td>$5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 4.5</td></tr><tr><td>Hosted</td><td>Anthropic</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$3</td></tr><tr><td>Output cost per 1M tokens</td><td>$15</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$3.75</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.3</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 4.5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$3</td></tr><tr><td>Output cost per 1M tokens</td><td>$15</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$3.75</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$6</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$22.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$7.5</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$12</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.6</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 4.5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$3.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$4.13</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$6.6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.33</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$6.6</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$24.75</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$8.25</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$13.2</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.66</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Haiku 4.5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.1</td></tr><tr><td>Output cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$1.375</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$2.2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.11</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Haiku 4.5</td></tr><tr><td>Hosted</td><td>Anthropic</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$1</td></tr><tr><td>Output cost per 1M tokens</td><td>$5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5</td></tr><tr><td>Output cost per 1M tokens</td><td>$25</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.25</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$10</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.6</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 4.6</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$3.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$4.13</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$6.6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.33</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$3.3</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$4.13</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$6.6</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.33</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 4.6</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$3</td></tr><tr><td>Output cost per 1M tokens</td><td>$15</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$3.75</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$3</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$15</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$3.75</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$6</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.3</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.7</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.8</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.8</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5</td></tr><tr><td>Output cost per 1M tokens</td><td>$25</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.25</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$10</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$25</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.25</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$10</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.5</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Output cost per 1M tokens</td><td>$11</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$4.4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.22</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$11</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$4.4</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.22</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$10</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$10</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$4</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.2</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Fable 5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>60</td></tr><tr><td>Input cost per 1M tokens</td><td>$11</td></tr><tr><td>Output cost per 1M tokens</td><td>$55</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$13.75</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$22</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$1.1</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$11</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$55</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$13.75</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$22</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1.1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Fable 5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>60</td></tr><tr><td>Input cost per 1M tokens</td><td>$10</td></tr><tr><td>Output cost per 1M tokens</td><td>$50</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$12.5</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$20</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$1</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$10</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$50</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$12.5</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$20</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.6</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.7</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 4.8</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 4.6</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$3.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$4.13</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$6.6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.33</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$3.3</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$4.13</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$6.6</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.33</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Sonnet 5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Output cost per 1M tokens</td><td>$11</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$4.4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.22</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$11</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$4.4</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.22</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Fable 5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>60</td></tr><tr><td>Input cost per 1M tokens</td><td>$11</td></tr><tr><td>Output cost per 1M tokens</td><td>$55</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$13.75</td></tr><tr><td>Cache creation cost per 1M tokens (1h TTL)</td><td>$22</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$1.1</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$11</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$55</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$13.75</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$22</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1.1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$27.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$11</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Claude Opus 5</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Anthropic</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$5</td></tr><tr><td>Output cost per 1M tokens</td><td>$25</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.25</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$25</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.25</td></tr><tr><td>Long context cache creation cost per 1M tokens (1h TTL)</td><td>$10</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.5</td></tr></tbody></table>

</details>

<details>

<summary>Black Forest Labs</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>FLUX 1.1 Pro</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>Black Forest Labs</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Cost per image</td><td>$0.044</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>FLUX 1.1 Pro</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>Black Forest Labs</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Cost per image</td><td>$0.044</td></tr></tbody></table>

</details>

<details>

<summary>DeepSeek</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>DeepSeek V4 Pro</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>DeepSeek</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.74</td></tr><tr><td>Output cost per 1M tokens</td><td>$3.48</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.145</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>DeepSeek V4 Flash 0731</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>DeepSeek</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.14</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.28</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.028</td></tr></tbody></table>

</details>

<details>

<summary>Google</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 2.5 Flash Lite</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.1</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.01</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.1</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.01</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 2.5 Pro</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$10</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.13</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$15</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.25</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 2.5 Flash</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.03</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.03</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Imagen 4</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Cost per image</td><td>$0.04</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Imagen 4 Fast</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Cost per image</td><td>$0.02</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Imagen 4 Ultra</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Cost per image</td><td>$0.06</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 2.5 Pro</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$10</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.13</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$15</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.25</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 2.5 Flash Lite</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.1</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.01</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.1</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.01</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 2.5 Flash</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.03</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.03</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3 Flash Preview</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$3</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.05</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$3</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.05</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 2.5 Pro</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$10</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.13</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$15</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.25</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 2.5 Flash</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.03</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.03</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 2.5 Flash Lite</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.1</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.01</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.1</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.01</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Imagen 4</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Cost per image</td><td>$0.04</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Imagen 4 Fast</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Cost per image</td><td>$0.02</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Imagen 4 Ultra</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Cost per image</td><td>$0.06</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.1 Pro Preview</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$12</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$4</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$18</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.4</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.1 Flash Lite</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.025</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.25</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$1.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.025</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemma 4 31B</td></tr><tr><td>Hosted</td><td>DeepInfra</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.13</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.38</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.1 Flash Lite</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.275</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.65</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.0275</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.275</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$1.65</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.0275</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.5 Flash</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.65</td></tr><tr><td>Output cost per 1M tokens</td><td>$9.9</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.165</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$1.65</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$9.9</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.165</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.5 Flash</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$9</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.15</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$1.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$9</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.15</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.1 Flash Lite</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.275</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.65</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.0275</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.275</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$1.65</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.0275</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.5 Flash</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.65</td></tr><tr><td>Output cost per 1M tokens</td><td>$9.9</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.165</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$1.65</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$9.9</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.165</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.6 Flash</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$7.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.15</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$1.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$7.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.15</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.5 Flash Lite</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.03</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.03</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.5 Flash Lite</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.33</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.033</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.33</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.033</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Gemini 3.5 Flash Lite</td></tr><tr><td>Hosted</td><td>Agent Platform (Vertex AI)</td></tr><tr><td>Developer</td><td>Google</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>1</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.33</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.033</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.33</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.033</td></tr></tbody></table>

</details>

<details>

<summary>Meta</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Muse Glimmer 30B</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>Meta</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.35</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.04</td></tr></tbody></table>

</details>

<details>

<summary>MiniMax</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>MiniMax M2.7</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>MiniMax</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.059</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>MiniMax M3</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>MiniMax</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.059</td></tr></tbody></table>

</details>

<details>

<summary>Mistral AI</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Mistral Medium 3</td></tr><tr><td>Hosted</td><td>Mistral AI</td></tr><tr><td>Developer</td><td>Mistral AI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Output cost per 1M tokens</td><td>$2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.04</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Codestral</td></tr><tr><td>Hosted</td><td>Mistral AI</td></tr><tr><td>Developer</td><td>Mistral AI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.9</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.03</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Mistral Medium 3.1</td></tr><tr><td>Hosted</td><td>Mistral AI</td></tr><tr><td>Developer</td><td>Mistral AI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Output cost per 1M tokens</td><td>$2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.04</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Mistral Large 3</td></tr><tr><td>Hosted</td><td>Mistral AI</td></tr><tr><td>Developer</td><td>Mistral AI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.05</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Mistral Small 4</td></tr><tr><td>Hosted</td><td>Mistral AI</td></tr><tr><td>Developer</td><td>Mistral AI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.15</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.015</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Mistral Medium 3.5</td></tr><tr><td>Hosted</td><td>Mistral AI</td></tr><tr><td>Developer</td><td>Mistral AI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$7.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.15</td></tr></tbody></table>

</details>

<details>

<summary>Moonshot AI</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Kimi K2.6</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>Moonshot AI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.95</td></tr><tr><td>Output cost per 1M tokens</td><td>$4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.16</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Kimi K2.6</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>Moonshot AI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.95</td></tr><tr><td>Output cost per 1M tokens</td><td>$4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.16</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Kimi K2.7 Code</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>Moonshot AI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.95</td></tr><tr><td>Output cost per 1M tokens</td><td>$4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.19</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Kimi K3</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>Moonshot AI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$3</td></tr><tr><td>Output cost per 1M tokens</td><td>$15</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.3</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Kimi K3 Fast</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>Moonshot AI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$4.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$22.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.45</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Kimi K3</td></tr><tr><td>Hosted</td><td>Nebius Token Factory</td></tr><tr><td>Developer</td><td>Moonshot AI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$3</td></tr><tr><td>Output cost per 1M tokens</td><td>$15</td></tr></tbody></table>

</details>

<details>

<summary>OpenAI</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4.1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Output cost per 1M tokens</td><td>$8.8</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4o</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$1.375</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5 mini</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.28</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.03</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5 nano</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.06</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.44</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.01</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.38</td></tr><tr><td>Output cost per 1M tokens</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.14</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Text Embedding 3 Large</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.143</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT Image 1 mini</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$8</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.1</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$10</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.125</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.38</td></tr><tr><td>Output cost per 1M tokens</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.14</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Text to Speech 1</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.2</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$14</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.175</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.2 Pro</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$21</td></tr><tr><td>Output cost per 1M tokens</td><td>$168</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT Image 1.5</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$5</td></tr><tr><td>Output cost per 1M tokens</td><td>$32</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$1.25</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.2</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$14</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.18</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Whisper 1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per audio second</td><td>$0.00012222</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Text to Speech 1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4.1</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$8</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Text Embedding 3 Large</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.13</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Text Embedding 3 Small</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.02</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Whisper 1</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per audio second</td><td>$0.0001</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4.1 mini</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4.1 nano</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.1</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.025</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT-OSS 20b</td></tr><tr><td>Hosted</td><td>Groq</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.075</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.037</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$10</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.125</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5 mini</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.025</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5 nano</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.05</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.005</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5 mini</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.28</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.03</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4.1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Output cost per 1M tokens</td><td>$8.8</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT-OSS 120b</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.15</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.6</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$10</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.13</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Text Embedding 3 Large</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.143</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.38</td></tr><tr><td>Output cost per 1M tokens</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.14</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5 nano</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.06</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.44</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.01</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4o</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$11</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$1.375</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Whisper 1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per audio second</td><td>$0.00011111</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4.1 mini</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.44</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.76</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.11</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4.1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$8</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$10</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.13</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.3 Codex</td></tr><tr><td>Hosted</td><td>OpenAI</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>30</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$14</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.175</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.4</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$15</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.25</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$22.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.5</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.4 nano</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.02</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.4 mini</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$4.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.08</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT-OSS 120b</td></tr><tr><td>Hosted</td><td>nexos.ai</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.8</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.08</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.5</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$5</td></tr><tr><td>Output cost per 1M tokens</td><td>$30</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$10</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$45</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.5</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$33</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$11</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$49.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1.1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT Image 2</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$5</td></tr><tr><td>Output cost per 1M tokens</td><td>$30</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$1.25</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.4</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.28</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$24.75</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT Instant Latest</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$5</td></tr><tr><td>Output cost per 1M tokens</td><td>$30</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Text Embedding 3 Small</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.025</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.4</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.28</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$24.75</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.5</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$33</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$11</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$49.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1.1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Text to Speech 1</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.6 Luna</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.1</td></tr><tr><td>Output cost per 1M tokens</td><td>$6.6</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$1.375</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.11</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$9.9</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.22</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.6 Terra</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$3.4375</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.275</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$24.75</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.6 Sol</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$33</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$11</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$49.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$13.75</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1.1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.6 Sol</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Output cost per 1M tokens</td><td>$33</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.55</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$11</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$49.5</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$13.75</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1.1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.6 Terra</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Output cost per 1M tokens</td><td>$16.5</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$3.4375</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.275</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$5.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$24.75</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$6.875</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.55</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.6 Luna</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.1</td></tr><tr><td>Output cost per 1M tokens</td><td>$6.6</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$1.375</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.11</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.2</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$9.9</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$2.75</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.22</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.6 Sol</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$5</td></tr><tr><td>Output cost per 1M tokens</td><td>$30</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$6.25</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$10</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$45</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$12.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.6 Terra</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$12</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$4</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$18</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.2</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 5.6 Luna</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Output cost per 1M tokens</td><td>$1.2</td></tr><tr><td>Cache creation cost per 1M tokens</td><td>$0.25</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.02</td></tr><tr><td>Long context boundary</td><td>272,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$0.4</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$1.8</td></tr><tr><td>Long context cache creation cost per 1M tokens</td><td>$0.25</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.02</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GPT 4.1 nano</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.11</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.44</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.03</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Text Embedding 3 Small</td></tr><tr><td>Hosted</td><td>Azure</td></tr><tr><td>Developer</td><td>OpenAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.022</td></tr></tbody></table>

</details>

<details>

<summary>SpaceXAI</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Grok 4.20 Reasoning</td></tr><tr><td>Hosted</td><td>SpaceXAI</td></tr><tr><td>Developer</td><td>SpaceXAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.4</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Grok 4.3</td></tr><tr><td>Hosted</td><td>SpaceXAI</td></tr><tr><td>Developer</td><td>SpaceXAI</td></tr><tr><td>Region</td><td>EU</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.4</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Grok 4.3</td></tr><tr><td>Hosted</td><td>SpaceXAI</td></tr><tr><td>Developer</td><td>SpaceXAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.4</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Grok 4.3</td></tr><tr><td>Hosted</td><td>SpaceXAI</td></tr><tr><td>Developer</td><td>SpaceXAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.25</td></tr><tr><td>Output cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2.5</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$5</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.4</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Grok Build 0.1</td></tr><tr><td>Hosted</td><td>SpaceXAI</td></tr><tr><td>Developer</td><td>SpaceXAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1</td></tr><tr><td>Output cost per 1M tokens</td><td>$2</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.2</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$2</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$4</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.4</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Grok 4.5</td></tr><tr><td>Hosted</td><td>SpaceXAI</td></tr><tr><td>Developer</td><td>SpaceXAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$4</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$12</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.6</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Grok 4.5</td></tr><tr><td>Hosted</td><td>SpaceXAI</td></tr><tr><td>Developer</td><td>SpaceXAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$4</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$12</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$0.6</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Grok 4.6</td></tr><tr><td>Hosted</td><td>SpaceXAI</td></tr><tr><td>Developer</td><td>SpaceXAI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$4</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$12</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1</td></tr></tbody></table>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Grok 4.6</td></tr><tr><td>Hosted</td><td>SpaceXAI</td></tr><tr><td>Developer</td><td>SpaceXAI</td></tr><tr><td>Region</td><td>US</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$2</td></tr><tr><td>Output cost per 1M tokens</td><td>$6</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.5</td></tr><tr><td>Long context boundary</td><td>200,000</td></tr><tr><td>Long context input cost per 1M tokens</td><td>$4</td></tr><tr><td>Long context output cost per 1M tokens</td><td>$12</td></tr><tr><td>Long context cached input cost per 1M tokens</td><td>$1</td></tr></tbody></table>

</details>

<details>

<summary>StepFun</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>Step 3.5 Flash</td></tr><tr><td>Hosted</td><td>DeepInfra</td></tr><tr><td>Developer</td><td>StepFun</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$0.09</td></tr><tr><td>Output cost per 1M tokens</td><td>$0.3</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.02</td></tr></tbody></table>

</details>

<details>

<summary>Zhipu AI</summary>

<table data-header-hidden data-header-sticky data-search="false"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Model</td><td>GLM 5.2</td></tr><tr><td>Hosted</td><td>Fireworks AI</td></tr><tr><td>Developer</td><td>Zhipu AI</td></tr><tr><td>Region</td><td>OTHER</td></tr><tr><td>Info used for model training</td><td>No</td></tr><tr><td>Data Retention Period (days)</td><td>0</td></tr><tr><td>Input cost per 1M tokens</td><td>$1.4</td></tr><tr><td>Output cost per 1M tokens</td><td>$4.4</td></tr><tr><td>Cached input cost per 1M tokens</td><td>$0.14</td></tr></tbody></table>

</details>


# Workspace Model Limitations

<mark style="color:$primary;">Each purchased seat includes up to 3,000 credits per month/per seat, unless otherwise agreed. Additional usage may require the purchase of extra credits or an upgraded plan. By using nexos.ai, you agree to the prompt limits per user and timeframe which are in place to ensure all users have access to all models at all times. These limits prevent any single user from monopolizing resources, helping maintain reliability and availability for everyone. We may take any reasonable measures to ensure your compliance with the workspace model limitations.</mark>

<h4 align="center">Category 1</h4>

<table data-view="cards"><thead><tr><th align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Codestral</strong></td></tr><tr><td align="center"><strong>DeepSeek V4 Flash 0731</strong></td></tr><tr><td align="center"><strong>DeepSeek V4 Pro</strong></td></tr><tr><td align="center"><strong>GLM 5.2</strong></td></tr><tr><td align="center"><strong>GPT 4.1 mini</strong></td></tr><tr><td align="center"><strong>GPT 4.1 nano</strong></td></tr><tr><td align="center"><strong>GPT 5 mini</strong></td></tr><tr><td align="center"><strong>GPT 5 nano</strong></td></tr><tr><td align="center"><strong>GPT 5.4 mini</strong></td></tr><tr><td align="center"><strong>GPT 5.4 nano</strong></td></tr><tr><td align="center"><strong>GPT-OSS 120b</strong></td></tr><tr><td align="center"><strong>GPT-OSS 20b</strong></td></tr><tr><td align="center"><strong>Gemini 2.5 Flash</strong></td></tr><tr><td align="center"><strong>Gemini 2.5 Flash Lite</strong></td></tr><tr><td align="center"><strong>Gemini 3 Flash Preview</strong></td></tr><tr><td align="center"><strong>Gemini 3.1 Flash Lite</strong></td></tr><tr><td align="center"><strong>Gemini 3.5 Flash Lite</strong></td></tr><tr><td align="center"><strong>Gemma 4 31B</strong></td></tr><tr><td align="center"><strong>Grok 4.20 Reasoning</strong></td></tr><tr><td align="center"><strong>Grok 4.3</strong></td></tr><tr><td align="center"><strong>Grok Build 0.1</strong></td></tr><tr><td align="center"><strong>Kimi K2.6</strong></td></tr><tr><td align="center"><strong>Kimi K2.7 Code</strong></td></tr><tr><td align="center"><strong>MiniMax M2.7</strong></td></tr><tr><td align="center"><strong>MiniMax M3</strong></td></tr><tr><td align="center"><strong>Mistral Large 3</strong></td></tr><tr><td align="center"><strong>Mistral Medium 3</strong></td></tr><tr><td align="center"><strong>Mistral Medium 3.1</strong></td></tr><tr><td align="center"><strong>Mistral Small 4</strong></td></tr><tr><td align="center"><strong>Muse Glimmer 30B</strong></td></tr><tr><td align="center"><strong>Nova 2 Lite</strong></td></tr><tr><td align="center"><strong>Nova Lite</strong></td></tr><tr><td align="center"><strong>Nova Pro</strong></td></tr><tr><td align="center"><strong>Qwen 3.7 Plus</strong></td></tr><tr><td align="center"><strong>Qwen 3.8 Max</strong></td></tr><tr><td align="center"><strong>Step 3.5 Flash</strong></td></tr><tr><td align="center"><strong>Whisper 1</strong></td></tr></tbody></table>

<h4 align="center">Category 2 - 200 messages / 3 hours</h4>

<table data-view="cards"><thead><tr><th align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Claude Haiku 4.5</strong></td></tr><tr><td align="center"><strong>Claude Sonnet 5</strong></td></tr><tr><td align="center"><strong>GPT 4.1</strong></td></tr><tr><td align="center"><strong>GPT 4o</strong></td></tr><tr><td align="center"><strong>GPT 5</strong></td></tr><tr><td align="center"><strong>GPT 5.1</strong></td></tr><tr><td align="center"><strong>GPT 5.2</strong></td></tr><tr><td align="center"><strong>GPT 5.3 Codex</strong></td></tr><tr><td align="center"><strong>GPT 5.6 Luna</strong></td></tr><tr><td align="center"><strong>GPT Image 1 mini</strong></td></tr><tr><td align="center"><strong>Gemini 2.5 Pro</strong></td></tr><tr><td align="center"><strong>Gemini 3.1 Pro Preview</strong></td></tr><tr><td align="center"><strong>Gemini 3.5 Flash</strong></td></tr><tr><td align="center"><strong>Gemini 3.6 Flash</strong></td></tr><tr><td align="center"><strong>Grok 4.5</strong></td></tr><tr><td align="center"><strong>Grok 4.6</strong></td></tr><tr><td align="center"><strong>Mistral Medium 3.5</strong></td></tr><tr><td align="center"><strong>Nova Premier</strong></td></tr></tbody></table>

<h4 align="center">Category 3 - 100 messages / 3 hours</h4>

<table data-view="cards"><thead><tr><th align="center"></th></tr></thead><tbody><tr><td align="center"><strong>Claude Fable 5</strong></td></tr><tr><td align="center"><strong>Claude Opus 4.5</strong></td></tr><tr><td align="center"><strong>Claude Opus 4.6</strong></td></tr><tr><td align="center"><strong>Claude Opus 4.7</strong></td></tr><tr><td align="center"><strong>Claude Opus 4.8</strong></td></tr><tr><td align="center"><strong>Claude Opus 5</strong></td></tr><tr><td align="center"><strong>Claude Sonnet 4.5</strong></td></tr><tr><td align="center"><strong>Claude Sonnet 4.6</strong></td></tr><tr><td align="center"><strong>FLUX 1.1 Pro</strong></td></tr><tr><td align="center"><strong>GPT 5.2 Pro</strong></td></tr><tr><td align="center"><strong>GPT 5.4</strong></td></tr><tr><td align="center"><strong>GPT 5.5</strong></td></tr><tr><td align="center"><strong>GPT 5.6 Sol</strong></td></tr><tr><td align="center"><strong>GPT 5.6 Terra</strong></td></tr><tr><td align="center"><strong>GPT Image 1.5</strong></td></tr><tr><td align="center"><strong>GPT Image 2</strong></td></tr><tr><td align="center"><strong>GPT Instant Latest</strong></td></tr><tr><td align="center"><strong>Imagen 4</strong></td></tr><tr><td align="center"><strong>Imagen 4 Fast</strong></td></tr><tr><td align="center"><strong>Imagen 4 Ultra</strong></td></tr><tr><td align="center"><strong>Kimi K3</strong></td></tr><tr><td align="center"><strong>Kimi K3 Fast</strong></td></tr></tbody></table>


