Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
API Version: v1
Server: {endpoint}/openai/v1 — Azure AI Foundry Models APIs
Server Variables:
| Variable | Default | Description |
|---|---|---|
| endpoint | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
Authentication
ApiKeyAuth (API Key)
Pass your API key in the api-key header.
ApiKeyAuth_ (API Key)
Pass your API key in the authorization header.
OAuth2Auth (OAuth 2.0)
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Scopes:
https://cognitiveservices.azure.com/.default
Security Requirements
Endpoints accept any one of the following authentication methods:
- ApiKeyAuth
- ApiKeyAuth_
- OAuth2Auth (scopes:
https://cognitiveservices.azure.com/.default)
List vector stores
GET {endpoint}/openai/v1/vector_stores
Returns a list of vector stores.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| limit | query | No | integer (int32) | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Serialization: explode: false |
| order | query | No | string Possible values: asc, desc |
Sort order by the created_at timestamp of the objects. asc for ascending order anddescfor descending order. Serialization: explode: false |
| after | query | No | string | 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. Serialization: explode: false |
| before | query | No | string | A cursor for use in pagination. before 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 before=obj_foo in order to fetch the previous page of the list. Serialization: explode: false |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.ListVectorStoresResponse |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Create vector store
POST {endpoint}/openai/v1/vector_stores
Creates a vector store.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
Request Body
Content-Type: application/json
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| chunking_strategy | OpenAI.ChunkingStrategyRequestParam | The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. |
No | |
| └─ type | OpenAI.ChunkingStrategyRequestParamType | Yes | ||
| description | string | A description for the vector store. Can be used to describe the vector store's purpose. | No | |
| expires_after | OpenAI.VectorStoreExpirationAfter | The expiration policy for a vector store. | No | |
| file_ids | array of string | A list of File IDs that the vector store should use. Useful for tools like file_search that can access files.Constraints: maxItems: 500 |
No | |
| metadata | OpenAI.Metadata or null | No | ||
| name | string | The name of the vector store. | No |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreObject |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Examples
Example
POST {endpoint}/openai/v1/vector_stores?api-version=v1
Get vector store
GET {endpoint}/openai/v1/vector_stores/{vector_store_id}
Retrieves a vector store.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store to retrieve. |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreObject |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Modify vector store
POST {endpoint}/openai/v1/vector_stores/{vector_store_id}
Modifies a vector store.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store to modify. |
Request Body
Content-Type: application/json
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| expires_after | OpenAI.VectorStoreExpirationAfter | The expiration policy for a vector store. | No | |
| metadata | OpenAI.Metadata or null | No | ||
| name | string or null | The name of the vector store. | No |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreObject |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Delete vector store
DELETE {endpoint}/openai/v1/vector_stores/{vector_store_id}
Delete a vector store.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store to delete. |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.DeleteVectorStoreResponse |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Create vector store file batch
POST {endpoint}/openai/v1/vector_stores/{vector_store_id}/file_batches
Create a vector store file batch.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store for which to create a file batch. |
Request Body
Content-Type: application/json
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| attributes | OpenAI.VectorStoreFileAttributes or null | No | ||
| chunking_strategy | OpenAI.ChunkingStrategyRequestParam | The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. |
No | |
| file_ids | array of string | A list of File IDs that the vector store should use. Useful for tools like file_search that can access files. If attributes or chunking_strategy are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with files.Constraints: minItems: 1, maxItems: 2000 |
No | |
| files | array of OpenAI.CreateVectorStoreFileRequest | A list of objects that each include a file_id plus optional attributes or chunking_strategy. Use this when you need to override metadata for specific files. The global attributes or chunking_strategy will be ignored and must be specified for each file. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with file_ids.Constraints: minItems: 1, maxItems: 2000 |
No |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreFileBatchObject |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Get vector store file batch
GET {endpoint}/openai/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}
Retrieves a vector store file batch.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store that the file batch belongs to. |
| batch_id | path | Yes | string | The ID of the file batch being retrieved. |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreFileBatchObject |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Cancel vector store file batch
POST {endpoint}/openai/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel
Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store that the file batch belongs to. |
| batch_id | path | Yes | string | The ID of the file batch to cancel. |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreFileBatchObject |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
List files in vector store batch
GET {endpoint}/openai/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files
Returns a list of vector store files in a batch.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store that the file batch belongs to. |
| batch_id | path | Yes | string | The ID of the file batch that the files belong to. |
| limit | query | No | integer (int32) | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Serialization: explode: false |
| order | query | No | string Possible values: asc, desc |
Sort order by the created_at timestamp of the objects. asc for ascending order anddescfor descending order. Serialization: explode: false |
| after | query | No | string | 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. Serialization: explode: false |
| before | query | No | string | A cursor for use in pagination. before 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 before=obj_foo in order to fetch the previous page of the list. Serialization: explode: false |
| filter | query | No | string Possible values: in_progress, completed, failed, cancelled |
Filter by file status. One of in_progress, completed, failed, cancelled.Serialization: explode: false |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.ListVectorStoreFilesResponse |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
List vector store files
GET {endpoint}/openai/v1/vector_stores/{vector_store_id}/files
Returns a list of vector store files.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store that the files belong to. |
| limit | query | No | integer (int32) | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Serialization: explode: false |
| order | query | No | string Possible values: asc, desc |
Sort order by the created_at timestamp of the objects. asc for ascending order anddescfor descending order. Serialization: explode: false |
| after | query | No | string | 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. Serialization: explode: false |
| before | query | No | string | A cursor for use in pagination. before 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 before=obj_foo in order to fetch the previous page of the list. Serialization: explode: false |
| filter | query | No | string Possible values: in_progress, completed, failed, cancelled |
Filter by file status. One of in_progress, completed, failed, cancelled.Serialization: explode: false |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.ListVectorStoreFilesResponse |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Create vector store file
POST {endpoint}/openai/v1/vector_stores/{vector_store_id}/files
Create a vector store file by attaching a File to a vector store.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store for which to create a File. |
Request Body
Content-Type: application/json
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| attributes | OpenAI.VectorStoreFileAttributes or null | No | ||
| chunking_strategy | OpenAI.ChunkingStrategyRequestParam | The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. |
No | |
| file_id | string | A File ID that the vector store should use. Useful for tools like file_search that can access files. For multi-file ingestion, we recommend file_batches to minimize per-vector-store write requests. |
Yes |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreFileObject |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Get vector store file
GET {endpoint}/openai/v1/vector_stores/{vector_store_id}/files/{file_id}
Retrieves a vector store file.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store that the file belongs to. |
| file_id | path | Yes | string | The ID of the file being retrieved. |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreFileObject |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Update vector store file attributes
POST {endpoint}/openai/v1/vector_stores/{vector_store_id}/files/{file_id}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | |
| file_id | path | Yes | string |
Request Body
Content-Type: application/json
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| attributes | OpenAI.VectorStoreFileAttributes or null | Yes |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreFileObject |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Delete vector store file
DELETE {endpoint}/openai/v1/vector_stores/{vector_store_id}/files/{file_id}
Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the delete file endpoint.
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store that the file belongs to. |
| file_id | path | Yes | string | The ID of the file to delete. |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.DeleteVectorStoreFileResponse |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Retrieve vector store file content
GET {endpoint}/openai/v1/vector_stores/{vector_store_id}/files/{file_id}/content
Retrieve vector store file content
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store to search. |
| file_id | path | Yes | string | The ID of the file to retrieve content for. |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreSearchResultsPage |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Search vector store
POST {endpoint}/openai/v1/vector_stores/{vector_store_id}/search
Search vector store
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| endpoint | server | Yes | string | A supported Azure AI Foundry Models APIs endpoint, including protocol and hostname. For example: https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/). |
| api-version | query | No | string Possible values: v1, preview |
The explicit Azure AI Foundry Models API version to use for this request.v1 if not otherwise specified. |
| vector_store_id | path | Yes | string | The ID of the vector store to search. |
Request Body
Content-Type: application/json
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| filters | OpenAI.ComparisonFilter or OpenAI.CompoundFilter | A filter to apply based on file attributes. | No | |
| max_num_results | integer | The maximum number of results to return. This number should be between 1 and 50 inclusive. Constraints: min: 1, max: 50 |
No | 10 |
| query | string or array of string | A query string for a search | Yes | |
| ranking_options | OpenAI.VectorStoreSearchRequestRankingOptions | No | ||
| └─ ranker | enum | Possible values: none, auto, default-2024-11-15 |
No | auto |
| └─ score_threshold | number | Constraints: min: 0, max: 1 | No | |
| rewrite_query | boolean | Whether to rewrite the natural language query for vector search. | No |
Responses
Status Code: 200
Description: The request has succeeded.
| Content-Type | Type | Description |
|---|---|---|
| application/json | OpenAI.VectorStoreSearchResultsPage |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Status Code: default
Description: An unexpected error response.
| Content-Type | Type | Description |
|---|---|---|
| application/json | object |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | string or null | Yes | ||
| inner_error | No | |||
| message | string | Yes | ||
| param | string or null | No | ||
| type | string | No |
Response Headers:
| Header | Type | Description |
|---|---|---|
| apim-request-id | string | A request ID used for troubleshooting purposes. |
Components
AzureAIFoundryModelsApiVersion
| Property | Value |
|---|---|
| Type | string |
| Values | v1preview |
OpenAI.AutoChunkingStrategyRequestParam
Auto Chunking Strategy
The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| type | enum | Always auto.Possible values: auto |
Yes |
OpenAI.ChunkingStrategyRequestParam
The chunking strategy used to chunk the file(s). If not set, will use the auto strategy.
Discriminator for OpenAI.ChunkingStrategyRequestParam
This component uses the property type to discriminate between different types:
| Type Value | Schema |
|---|---|
auto |
OpenAI.AutoChunkingStrategyRequestParam |
static |
OpenAI.StaticChunkingStrategyRequestParam |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| type | OpenAI.ChunkingStrategyRequestParamType | Yes |
OpenAI.ChunkingStrategyRequestParamType
| Property | Value |
|---|---|
| Type | string |
| Values | autostatic |
OpenAI.ChunkingStrategyResponse
The strategy used to chunk the file.
Discriminator for OpenAI.ChunkingStrategyResponse
This component uses the property type to discriminate between different types:
| Type Value | Schema |
|---|---|
static |
OpenAI.StaticChunkingStrategyResponseParam |
other |
OpenAI.OtherChunkingStrategyResponseParam |
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| type | OpenAI.ChunkingStrategyResponseType | Yes |
OpenAI.ChunkingStrategyResponseType
| Property | Value |
|---|---|
| Type | string |
| Values | staticother |
OpenAI.ComparisonFilter
Comparison Filter
A filter used to compare a specified attribute key to a given value using a defined comparison operation.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| key | string | The key to compare against the value. | Yes | |
| type | enum | Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.- eq: equals- ne: not equal- gt: greater than- gte: greater than or equal- lt: less than- lte: less than or equal- in: in- nin: not inPossible values: eq, ne, gt, gte, lt, lte, in, nin |
Yes | eq |
| value | string or number or boolean or array of string or number | The value to compare against the attribute key; supports string, number, or boolean types. | Yes |
OpenAI.CompoundFilter
Compound Filter
Combine multiple filters using and or or.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| filters | array of OpenAI.ComparisonFilter or object | Array of filters to combine. Items can be ComparisonFilter or CompoundFilter. |
Yes | |
| type | enum | Type of operation: and or or.Possible values: and, or |
Yes |
OpenAI.CreateVectorStoreFileBatchRequest
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| attributes | OpenAI.VectorStoreFileAttributes or null | No | ||
| chunking_strategy | OpenAI.ChunkingStrategyRequestParam | The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. |
No | |
| file_ids | array of string | A list of File IDs that the vector store should use. Useful for tools like file_search that can access files. If attributes or chunking_strategy are provided, they will be applied to all files in the batch. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with files.Constraints: minItems: 1, maxItems: 2000 |
No | |
| files | array of OpenAI.CreateVectorStoreFileRequest | A list of objects that each include a file_id plus optional attributes or chunking_strategy. Use this when you need to override metadata for specific files. The global attributes or chunking_strategy will be ignored and must be specified for each file. The maximum batch size is 2000 files. This endpoint is recommended for multi-file ingestion and helps reduce per-vector-store write request pressure. Mutually exclusive with file_ids.Constraints: minItems: 1, maxItems: 2000 |
No |
OpenAI.CreateVectorStoreFileRequest
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| attributes | OpenAI.VectorStoreFileAttributes or null | No | ||
| chunking_strategy | OpenAI.ChunkingStrategyRequestParam | The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. |
No | |
| file_id | string | A File ID that the vector store should use. Useful for tools like file_search that can access files. For multi-file ingestion, we recommend file_batches to minimize per-vector-store write requests. |
Yes |
OpenAI.CreateVectorStoreRequest
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| chunking_strategy | OpenAI.ChunkingStrategyRequestParam | The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. |
No | |
| └─ type | OpenAI.ChunkingStrategyRequestParamType | Yes | ||
| description | string | A description for the vector store. Can be used to describe the vector store's purpose. | No | |
| expires_after | OpenAI.VectorStoreExpirationAfter | The expiration policy for a vector store. | No | |
| file_ids | array of string | A list of File IDs that the vector store should use. Useful for tools like file_search that can access files.Constraints: maxItems: 500 |
No | |
| metadata | OpenAI.Metadata or null | No | ||
| name | string | The name of the vector store. | No |
OpenAI.DeleteVectorStoreFileResponse
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| deleted | boolean | Yes | ||
| id | string | Yes | ||
| object | enum | Possible values: vector_store.file.deleted |
Yes |
OpenAI.DeleteVectorStoreResponse
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| deleted | boolean | Yes | ||
| id | string | Yes | ||
| object | enum | Possible values: vector_store.deleted |
Yes |
OpenAI.ListVectorStoreFilesResponse
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| data | array of OpenAI.VectorStoreFileObject | Yes | ||
| first_id | string | Yes | ||
| has_more | boolean | Yes | ||
| last_id | string | Yes | ||
| object | string | Yes |
OpenAI.ListVectorStoresResponse
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| data | array of OpenAI.VectorStoreObject | Yes | ||
| first_id | string | Yes | ||
| has_more | boolean | Yes | ||
| last_id | string | Yes | ||
| object | string | Yes |
OpenAI.Metadata
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
Type: object
OpenAI.OtherChunkingStrategyResponseParam
Other Chunking Strategy
This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| type | enum | Always other.Possible values: other |
Yes |
OpenAI.StaticChunkingStrategy
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| chunk_overlap_tokens | integer | The number of tokens that overlap between chunks. The default value is 400.Note that the overlap must not exceed half of max_chunk_size_tokens. |
Yes | |
| max_chunk_size_tokens | integer | The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096.Constraints: min: 100, max: 4096 |
Yes |
OpenAI.StaticChunkingStrategyRequestParam
Static Chunking Strategy
Customize your own chunking strategy by setting chunk size and chunk overlap.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| static | OpenAI.StaticChunkingStrategy | Yes | ||
| type | enum | Always static.Possible values: static |
Yes |
OpenAI.StaticChunkingStrategyResponseParam
Static Chunking Strategy
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| static | OpenAI.StaticChunkingStrategy | Yes | ||
| type | enum | Always static.Possible values: static |
Yes |
OpenAI.UpdateVectorStoreFileAttributesRequest
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| attributes | OpenAI.VectorStoreFileAttributes or null | Yes |
OpenAI.UpdateVectorStoreRequest
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| expires_after | OpenAI.VectorStoreExpirationAfter | The expiration policy for a vector store. | No | |
| metadata | OpenAI.Metadata or null | No | ||
| name | string or null | The name of the vector store. | No |
OpenAI.VectorStoreExpirationAfter
Vector store expiration policy
The expiration policy for a vector store.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| anchor | enum | Anchor timestamp after which the expiration policy applies. Supported anchors: last_active_at.Possible values: last_active_at |
Yes | |
| days | integer | The number of days after the anchor time that the vector store will expire. Constraints: min: 1, max: 365 |
Yes |
OpenAI.VectorStoreFileAttributes
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
Type: object
OpenAI.VectorStoreFileBatchObject
Vector store file batch
A batch of files attached to a vector store.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| created_at | integer (unixtime) | The Unix timestamp (in seconds) for when the vector store files batch was created. | Yes | |
| file_counts | OpenAI.VectorStoreFileBatchObjectFileCounts | Yes | ||
| id | string | The identifier, which can be referenced in API endpoints. | Yes | |
| object | enum | The object type, which is always vector_store.file_batch.Possible values: vector_store.files_batch |
Yes | |
| status | enum | The status of the vector store files batch, which can be either in_progress, completed, cancelled or failed.Possible values: in_progress, completed, cancelled, failed |
Yes | |
| vector_store_id | string | The ID of the vector store that the File is attached to. | Yes |
OpenAI.VectorStoreFileBatchObjectFileCounts
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| cancelled | integer | Yes | ||
| completed | integer | Yes | ||
| failed | integer | Yes | ||
| in_progress | integer | Yes | ||
| total | integer | Yes |
OpenAI.VectorStoreFileObject
Vector store files
A list of files attached to a vector store.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| attributes | OpenAI.VectorStoreFileAttributes or null | No | ||
| chunking_strategy | OpenAI.ChunkingStrategyResponse | The strategy used to chunk the file. | No | |
| created_at | integer (unixtime) | The Unix timestamp (in seconds) for when the vector store file was created. | Yes | |
| id | string | The identifier, which can be referenced in API endpoints. | Yes | |
| last_error | OpenAI.VectorStoreFileObjectLastError or null | Yes | ||
| object | enum | The object type, which is always vector_store.file.Possible values: vector_store.file |
Yes | |
| status | enum | The status of the vector store file, which can be either in_progress, completed, cancelled, or failed. The status completed indicates that the vector store file is ready for use.Possible values: in_progress, completed, cancelled, failed |
Yes | |
| usage_bytes | integer | The total vector store usage in bytes. Note that this may be different from the original file size. | Yes | |
| vector_store_id | string | The ID of the vector store that the File is attached to. | Yes |
OpenAI.VectorStoreFileObjectLastError
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| code | enum | Possible values: server_error, unsupported_file, invalid_file |
Yes | |
| message | string | Yes |
OpenAI.VectorStoreObject
Vector store
A vector store is a collection of processed files can be used by the file_search tool.
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| created_at | integer (unixtime) | The Unix timestamp (in seconds) for when the vector store was created. | Yes | |
| expires_after | OpenAI.VectorStoreExpirationAfter | The expiration policy for a vector store. | No | |
| expires_at | string or null | No | ||
| file_counts | OpenAI.VectorStoreObjectFileCounts | Yes | ||
| id | string | The identifier, which can be referenced in API endpoints. | Yes | |
| last_active_at | string or null | Yes | ||
| metadata | OpenAI.Metadata or null | Yes | ||
| name | string | The name of the vector store. | Yes | |
| object | enum | The object type, which is always vector_store.Possible values: vector_store |
Yes | |
| status | enum | The status of the vector store, which can be either expired, in_progress, or completed. A status of completed indicates that the vector store is ready for use.Possible values: expired, in_progress, completed |
Yes | |
| usage_bytes | integer | The total number of bytes used by the files in the vector store. | Yes |
OpenAI.VectorStoreObjectFileCounts
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| cancelled | integer | Yes | ||
| completed | integer | Yes | ||
| failed | integer | Yes | ||
| in_progress | integer | Yes | ||
| total | integer | Yes |
OpenAI.VectorStoreSearchRequest
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| filters | OpenAI.ComparisonFilter or OpenAI.CompoundFilter | A filter to apply based on file attributes. | No | |
| max_num_results | integer | The maximum number of results to return. This number should be between 1 and 50 inclusive. Constraints: min: 1, max: 50 |
No | 10 |
| query | string or array of string | A query string for a search | Yes | |
| ranking_options | OpenAI.VectorStoreSearchRequestRankingOptions | No | ||
| └─ ranker | enum | Possible values: none, auto, default-2024-11-15 |
No | auto |
| └─ score_threshold | number | Constraints: min: 0, max: 1 | No | |
| rewrite_query | boolean | Whether to rewrite the natural language query for vector search. | No |
OpenAI.VectorStoreSearchRequestRankingOptions
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| ranker | enum | Possible values: none, auto, default-2024-11-15 |
No | auto |
| score_threshold | number | Constraints: min: 0, max: 1 | No |
OpenAI.VectorStoreSearchResultContentObject
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| text | string | The text content returned from search. | Yes | |
| type | enum | The type of content. Possible values: text |
Yes |
OpenAI.VectorStoreSearchResultItem
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| attributes | OpenAI.VectorStoreFileAttributes or null | Yes | ||
| content | array of OpenAI.VectorStoreSearchResultContentObject | Content chunks from the file. | Yes | |
| file_id | string | The ID of the vector store file. | Yes | |
| filename | string | The name of the vector store file. | Yes | |
| score | number | The similarity score for the result. Constraints: min: 0, max: 1 |
Yes |
OpenAI.VectorStoreSearchResultsPage
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
| data | array of OpenAI.VectorStoreSearchResultItem | The list of search result items. | Yes | |
| has_more | boolean | Indicates if there are more results to fetch. | Yes | |
| next_page | string or null | Yes | ||
| object | enum | The object type, which is always vector_store.search_results.pagePossible values: vector_store.search_results.page |
Yes | |
| search_query | array of string | Yes |