Azure.AI.Agents (preview:2025-05-15)

2025/08/04 • 15 updated methods

ListAgents (updated)
Description Gets a list of agents that were previously created.
Reference Link ¶

⚶ Changes

{
  "#id": "ListAgents",
  "$responses": {
    "200": {
      "$properties": {
        "data": {
          "$properties": {
            "tool_resources": [
              {
                "mcp": {
                  "$properties": {
                    "require_approval": {
                      "new": [],
                      "old": [
                        [
                          "never",
                          ""
                        ],
                        [
                          "always",
                          ""
                        ]
                      ]
                    }
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}

⚼ Request

GET:  /assistants
{
api-version: string ,
limit: integer ,
order: string ,
after: string ,
before: string ,
}

⚐ Response (200)

{
data:
[
{
id: string ,
object: enum ,
created_at: integer ,
name: string ,
description: string ,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
temperature: number ,
top_p: number ,
response_format: string ,
metadata: object ,
}
,
]
,
last_id: string ,
has_more: boolean ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
CreateAgent (updated)
Description Creates a new agent.
Reference Link ¶

⚶ Changes

{
  "#id": "CreateAgent",
  "$parameters": {
    "body": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  },
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /assistants
{
api-version: string ,
body:
{
model: string ,
name: string ,
description: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
temperature: number ,
top_p: number ,
response_format: string ,
metadata: object ,
}
,
}

⚐ Response (200)

{
id: string ,
object: enum ,
created_at: integer ,
name: string ,
description: string ,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
temperature: number ,
top_p: number ,
response_format: string ,
metadata: object ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
GetAgent (updated)
Description Retrieves an existing agent.
Reference Link ¶

⚶ Changes

{
  "#id": "GetAgent",
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

GET:  /assistants/{assistantId}
{
api-version: string ,
assistantId: string ,
}

⚐ Response (200)

{
id: string ,
object: enum ,
created_at: integer ,
name: string ,
description: string ,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
temperature: number ,
top_p: number ,
response_format: string ,
metadata: object ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
UpdateAgent (updated)
Description Modifies an existing agent.
Reference Link ¶

⚶ Changes

{
  "#id": "UpdateAgent",
  "$parameters": {
    "body": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  },
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /assistants/{assistantId}
{
api-version: string ,
assistantId: string ,
body:
{
model: string ,
name: string ,
description: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
temperature: number ,
top_p: number ,
response_format: string ,
metadata: object ,
}
,
}

⚐ Response (200)

{
id: string ,
object: enum ,
created_at: integer ,
name: string ,
description: string ,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
temperature: number ,
top_p: number ,
response_format: string ,
metadata: object ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Threads_ListThreads (updated)
Description Gets a list of threads that were previously created.
Reference Link ¶

⚶ Changes

{
  "#id": "Threads_ListThreads",
  "$responses": {
    "200": {
      "$properties": {
        "data": {
          "$properties": {
            "tool_resources": [
              {
                "mcp": {
                  "$properties": {
                    "require_approval": {
                      "new": [],
                      "old": [
                        [
                          "never",
                          ""
                        ],
                        [
                          "always",
                          ""
                        ]
                      ]
                    }
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}

⚼ Request

GET:  /threads
{
api-version: string ,
limit: integer ,
order: string ,
after: string ,
before: string ,
}

⚐ Response (200)

{
data:
[
{
id: string ,
object: enum ,
created_at: integer ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
metadata: object ,
}
,
]
,
last_id: string ,
has_more: boolean ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Threads_CreateThread (updated)
Description Creates a new thread. Threads contain messages and can be run by agents.
Reference Link ¶

⚶ Changes

{
  "#id": "Threads_CreateThread",
  "$parameters": {
    "body": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  },
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /threads
{
api-version: string ,
body:
{
messages:
[
{
role: enum ,
content: string ,
attachments:
[
{
file_id: string ,
data_source:
{
uri: string ,
type: enum ,
}
,
tools:
[
string ,
]
,
}
,
]
,
metadata: object ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
metadata: object ,
}
,
}

⚐ Response (200)

{
id: string ,
object: enum ,
created_at: integer ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
metadata: object ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Threads_GetThread (updated)
Description Gets information about an existing thread.
Reference Link ¶

⚶ Changes

{
  "#id": "Threads_GetThread",
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

GET:  /threads/{threadId}
{
api-version: string ,
threadId: string ,
}

⚐ Response (200)

{
id: string ,
object: enum ,
created_at: integer ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
metadata: object ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Threads_UpdateThread (updated)
Description Modifies an existing thread.
Reference Link ¶

⚶ Changes

{
  "#id": "Threads_UpdateThread",
  "$parameters": {
    "body": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  },
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /threads/{threadId}
{
api-version: string ,
threadId: string ,
body:
{
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
metadata: object ,
}
,
}

⚐ Response (200)

{
id: string ,
object: enum ,
created_at: integer ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
metadata: object ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Runs_ListRuns (updated)
Description Gets a list of runs for a specified thread.
Reference Link ¶

⚶ Changes

{
  "#id": "Runs_ListRuns",
  "$responses": {
    "200": {
      "$properties": {
        "data": {
          "$properties": {
            "tool_resources": [
              {
                "mcp": {
                  "$properties": {
                    "require_approval": {
                      "new": [],
                      "old": [
                        [
                          "never",
                          ""
                        ],
                        [
                          "always",
                          ""
                        ]
                      ]
                    }
                  }
                }
              }
            ]
          }
        }
      }
    }
  }
}

⚼ Request

GET:  /threads/{threadId}/runs
{
threadId: string ,
api-version: string ,
limit: integer ,
order: string ,
after: string ,
before: string ,
}

⚐ Response (200)

{
data:
[
{
id: string ,
object: enum ,
thread_id: string ,
assistant_id: string ,
status: enum ,
required_action:
{
type: string ,
}
,
last_error:
{
code: string ,
message: string ,
}
,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
created_at: integer ,
expires_at: integer ,
started_at: integer ,
completed_at: integer ,
cancelled_at: integer ,
failed_at: integer ,
incomplete_details:
{
reason: enum ,
}
,
usage:
{
completion_tokens: integer ,
prompt_tokens: integer ,
total_tokens: integer ,
}
,
temperature: number ,
top_p: number ,
max_prompt_tokens: integer ,
max_completion_tokens: integer ,
truncation_strategy:
{
type: enum ,
last_messages: integer ,
}
,
tool_choice: string ,
response_format: string ,
metadata: object ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
parallel_tool_calls: boolean ,
}
,
]
,
last_id: string ,
has_more: boolean ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Runs_CreateRun (updated)
Description Creates a new run for an agent thread.
Reference Link ¶

⚶ Changes

{
  "#id": "Runs_CreateRun",
  "$parameters": {
    "body": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  },
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /threads/{threadId}/runs
{
api-version: string ,
threadId: string ,
include[]: array ,
body:
{
assistant_id: string ,
model: string ,
instructions: string ,
additional_instructions: string ,
additional_messages:
[
{
role: enum ,
content: string ,
attachments:
[
{
file_id: string ,
data_source:
{
uri: string ,
type: enum ,
}
,
tools:
[
string ,
]
,
}
,
]
,
metadata: object ,
}
,
]
,
tools:
[
{
type: string ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
stream: boolean ,
temperature: number ,
top_p: number ,
max_prompt_tokens: integer ,
max_completion_tokens: integer ,
truncation_strategy:
{
type: enum ,
last_messages: integer ,
}
,
tool_choice: string ,
response_format: string ,
parallel_tool_calls: boolean ,
metadata: object ,
}
,
}

⚐ Response (200)

{
id: string ,
object: enum ,
thread_id: string ,
assistant_id: string ,
status: enum ,
required_action:
{
type: string ,
}
,
last_error:
{
code: string ,
message: string ,
}
,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
created_at: integer ,
expires_at: integer ,
started_at: integer ,
completed_at: integer ,
cancelled_at: integer ,
failed_at: integer ,
incomplete_details:
{
reason: enum ,
}
,
usage:
{
completion_tokens: integer ,
prompt_tokens: integer ,
total_tokens: integer ,
}
,
temperature: number ,
top_p: number ,
max_prompt_tokens: integer ,
max_completion_tokens: integer ,
truncation_strategy:
{
type: enum ,
last_messages: integer ,
}
,
tool_choice: string ,
response_format: string ,
metadata: object ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
parallel_tool_calls: boolean ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Runs_GetRun (updated)
Description Gets an existing run from an existing thread.
Reference Link ¶

⚶ Changes

{
  "#id": "Runs_GetRun",
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

GET:  /threads/{threadId}/runs/{runId}
{
api-version: string ,
threadId: string ,
runId: string ,
}

⚐ Response (200)

{
id: string ,
object: enum ,
thread_id: string ,
assistant_id: string ,
status: enum ,
required_action:
{
type: string ,
}
,
last_error:
{
code: string ,
message: string ,
}
,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
created_at: integer ,
expires_at: integer ,
started_at: integer ,
completed_at: integer ,
cancelled_at: integer ,
failed_at: integer ,
incomplete_details:
{
reason: enum ,
}
,
usage:
{
completion_tokens: integer ,
prompt_tokens: integer ,
total_tokens: integer ,
}
,
temperature: number ,
top_p: number ,
max_prompt_tokens: integer ,
max_completion_tokens: integer ,
truncation_strategy:
{
type: enum ,
last_messages: integer ,
}
,
tool_choice: string ,
response_format: string ,
metadata: object ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
parallel_tool_calls: boolean ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Runs_UpdateRun (updated)
Description Modifies an existing thread run.
Reference Link ¶

⚶ Changes

{
  "#id": "Runs_UpdateRun",
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /threads/{threadId}/runs/{runId}
{
api-version: string ,
threadId: string ,
runId: string ,
body:
{
metadata: object ,
}
,
}

⚐ Response (200)

{
id: string ,
object: enum ,
thread_id: string ,
assistant_id: string ,
status: enum ,
required_action:
{
type: string ,
}
,
last_error:
{
code: string ,
message: string ,
}
,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
created_at: integer ,
expires_at: integer ,
started_at: integer ,
completed_at: integer ,
cancelled_at: integer ,
failed_at: integer ,
incomplete_details:
{
reason: enum ,
}
,
usage:
{
completion_tokens: integer ,
prompt_tokens: integer ,
total_tokens: integer ,
}
,
temperature: number ,
top_p: number ,
max_prompt_tokens: integer ,
max_completion_tokens: integer ,
truncation_strategy:
{
type: enum ,
last_messages: integer ,
}
,
tool_choice: string ,
response_format: string ,
metadata: object ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
parallel_tool_calls: boolean ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Runs_CancelRun (updated)
Description Cancels a run of an in‐progress thread.
Reference Link ¶

⚶ Changes

{
  "#id": "Runs_CancelRun",
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /threads/{threadId}/runs/{runId}/cancel
{
api-version: string ,
threadId: string ,
runId: string ,
}

⚐ Response (200)

{
id: string ,
object: enum ,
thread_id: string ,
assistant_id: string ,
status: enum ,
required_action:
{
type: string ,
}
,
last_error:
{
code: string ,
message: string ,
}
,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
created_at: integer ,
expires_at: integer ,
started_at: integer ,
completed_at: integer ,
cancelled_at: integer ,
failed_at: integer ,
incomplete_details:
{
reason: enum ,
}
,
usage:
{
completion_tokens: integer ,
prompt_tokens: integer ,
total_tokens: integer ,
}
,
temperature: number ,
top_p: number ,
max_prompt_tokens: integer ,
max_completion_tokens: integer ,
truncation_strategy:
{
type: enum ,
last_messages: integer ,
}
,
tool_choice: string ,
response_format: string ,
metadata: object ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
parallel_tool_calls: boolean ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
Runs_SubmitToolOutputsToRun (updated)
Description Submits outputs from tools as requested by tool calls in a run.
Reference Link ¶

⚶ Changes

{
  "#id": "Runs_SubmitToolOutputsToRun",
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /threads/{threadId}/runs/{runId}/submit_tool_outputs
{
api-version: string ,
threadId: string ,
runId: string ,
body:
{
tool_outputs:
[
{
tool_call_id: string ,
output: string ,
}
,
]
,
tool_approvals:
[
{
tool_call_id: string ,
approve: boolean ,
headers: object ,
}
,
]
,
stream: boolean ,
}
,
}

⚐ Response (200)

{
id: string ,
object: enum ,
thread_id: string ,
assistant_id: string ,
status: enum ,
required_action:
{
type: string ,
}
,
last_error:
{
code: string ,
message: string ,
}
,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
created_at: integer ,
expires_at: integer ,
started_at: integer ,
completed_at: integer ,
cancelled_at: integer ,
failed_at: integer ,
incomplete_details:
{
reason: enum ,
}
,
usage:
{
completion_tokens: integer ,
prompt_tokens: integer ,
total_tokens: integer ,
}
,
temperature: number ,
top_p: number ,
max_prompt_tokens: integer ,
max_completion_tokens: integer ,
truncation_strategy:
{
type: enum ,
last_messages: integer ,
}
,
tool_choice: string ,
response_format: string ,
metadata: object ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
parallel_tool_calls: boolean ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}
CreateThreadAndRun (updated)
Description Creates a new agent thread and immediately starts a run using that new thread.
Reference Link ¶

⚶ Changes

{
  "#id": "CreateThreadAndRun",
  "$parameters": {
    "body": {
      "$properties": {
        "thread": [
          {
            "tool_resources": [
              {
                "mcp": {
                  "$properties": {
                    "require_approval": {
                      "new": [],
                      "old": [
                        [
                          "never",
                          ""
                        ],
                        [
                          "always",
                          ""
                        ]
                      ]
                    }
                  }
                }
              }
            ]
          }
        ],
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  },
  "$responses": {
    "200": {
      "$properties": {
        "tool_resources": [
          {
            "mcp": {
              "$properties": {
                "require_approval": {
                  "new": [],
                  "old": [
                    [
                      "never",
                      ""
                    ],
                    [
                      "always",
                      ""
                    ]
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
}

⚼ Request

POST:  /threads/runs
{
api-version: string ,
body:
{
assistant_id: string ,
thread:
{
messages:
[
{
role: enum ,
content: string ,
attachments:
[
{
file_id: string ,
data_source:
{
uri: string ,
type: enum ,
}
,
tools:
[
string ,
]
,
}
,
]
,
metadata: object ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
metadata: object ,
}
,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
stream: boolean ,
temperature: number ,
top_p: number ,
max_prompt_tokens: integer ,
max_completion_tokens: integer ,
truncation_strategy:
{
type: enum ,
last_messages: integer ,
}
,
tool_choice: string ,
response_format: string ,
parallel_tool_calls: boolean ,
metadata: object ,
}
,
}

⚐ Response (200)

{
id: string ,
object: enum ,
thread_id: string ,
assistant_id: string ,
status: enum ,
required_action:
{
type: string ,
}
,
last_error:
{
code: string ,
message: string ,
}
,
model: string ,
instructions: string ,
tools:
[
{
type: string ,
}
,
]
,
created_at: integer ,
expires_at: integer ,
started_at: integer ,
completed_at: integer ,
cancelled_at: integer ,
failed_at: integer ,
incomplete_details:
{
reason: enum ,
}
,
usage:
{
completion_tokens: integer ,
prompt_tokens: integer ,
total_tokens: integer ,
}
,
temperature: number ,
top_p: number ,
max_prompt_tokens: integer ,
max_completion_tokens: integer ,
truncation_strategy:
{
type: enum ,
last_messages: integer ,
}
,
tool_choice: string ,
response_format: string ,
metadata: object ,
tool_resources:
{
code_interpreter:
{
file_ids:
[
string ,
]
,
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
file_search:
{
vector_store_ids:
[
string ,
]
,
vector_stores:
[
{
name: string ,
configuration:
{
data_sources:
[
{
uri: string ,
type: enum ,
}
,
]
,
}
,
}
,
]
,
}
,
azure_ai_search:
{
indexes:
[
{
index_connection_id: string ,
index_name: string ,
query_type: enum ,
top_k: integer ,
filter: string ,
index_asset_id: string ,
}
,
]
,
}
,
mcp:
[
{
server_label: string ,
headers: object ,
require_approval: string ,
}
,
]
,
}
,
parallel_tool_calls: boolean ,
}

⚐ Response (default)

{
error:
{
message: string ,
type: string ,
param: string ,
code: string ,
}
,
}