---
title: "POST /assistants/{assistantId}"
method: POST
path: "/assistants/{assistantId}"
---

# POST /assistants/{assistantId}

`POST /assistants/{assistantId}`

Modifies an existing assistant.

## Path parameters

- `assistantId` string, required

## Request body

- UpdateAssistantOptions — The request details to use when modifying an existing assistant.
  - `model` string — The ID of the model to use.
  - `name` string, nullable — The modified name for the assistant to use.
  - `description` string, nullable — The modified description for the assistant to use.
  - `instructions` string, nullable — The modified system instructions for the new assistant to use.
  - `tools` ToolDefinition[] — The modified collection of tools to enable for the assistant.
    - `type` string, required — The object type.
  - `tool_resources` UpdateToolResourcesOptions — Request object. A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.
    - `code_interpreter` UpdateCodeInterpreterToolResourceOptions — Request object to update `code_interpreted` tool resources.
      - `file_ids` string[] — A list of file IDs to override the current list of the assistant.
    - `file_search` UpdateFileSearchToolResourceOptions — Request object to update `file_search` tool resources.
      - `vector_store_ids` string[] — A list of vector store IDs to override the current list of the assistant.
  - `temperature` number, float, nullable — 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.
  - `top_p` number, float, nullable — 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. We generally recommend altering this or temperature but not both.
  - `response_format` unknown
  - `metadata` object, nullable — A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

## Response `200`

The updated assistant instance.

- Assistant — Represents an assistant that can call the model and use tools.
  - `id` string, required — The identifier, which can be referenced in API endpoints.
  - `object` 'assistant', required — The object type, which is always assistant.
  - `created_at` integer, required — The Unix timestamp, in seconds, representing when this object was created.
  - `name` string, nullable, required — The name of the assistant.
  - `description` string, nullable, required — The description of the assistant.
  - `model` string, required — The ID of the model to use.
  - `instructions` string, nullable, required — The system instructions for the assistant to use.
  - `tools` ToolDefinition[], required — The collection of tools enabled for the assistant.
    - `type` string, required — The object type.
  - `tool_resources` ToolResources, required — A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.
    - `code_interpreter` CodeInterpreterToolResource — A set of resources that are used by the `code_interpreter` tool.
      - `file_ids` string[], required — A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
    - `file_search` FileSearchToolResource — A set of resources that are used by the `file_search` tool.
      - `vector_store_ids` string[] — The ID of the vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.
  - `temperature` number, float, nullable, required — 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.
  - `top_p` number, float, nullable, required — 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. We generally recommend altering this or temperature but not both.
  - `response_format` unknown
  - `metadata` object, nullable, required — A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

---

[API](https://skmtc.net/azure/apis/ai-openai-assistants-openapiv2.md) · [All operations](https://skmtc.net/azure/apis/ai-openai-assistants-openapiv2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/ai-openai-assistants-openapiv2/revisions/453a64f820f0/schema)
