List vector store files in a batch

GEThttps:/api.openai.com/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files

Returns a list of vector store files in a batch.

Path parameters

  • vector_store_id
    string
    Required
    The ID of the vector store that the files belong to.
  • batch_id
    string
    Required
    The ID of the file batch that the files belong to.

Query parameters

  • limit
    integer
    Defaults: 20
    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
  • order
    string
    Defaults: desc

    Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

  • after
    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.

  • before
    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, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

  • filter
    string

    Filter by file status. One of in_progress, completed, failed, cancelled.

Response

A list of vector store file objects.

Example request
1
curl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/files \
2
-H "Authorization: Bearer $OPENAI_API_KEY" \
3
-H "Content-Type: application/json" \
4
-H "OpenAI-Beta: assistants=v2"
Example response
1
{
2
"object": "list",
3
"data": [
4
{
5
"id": "file-abc123",
6
"object": "vector_store.file",
7
"created_at": 1699061776,
8
"vector_store_id": "vs_abc123"
9
},
10
{
11
"id": "file-abc456",
12
"object": "vector_store.file",
13
"created_at": 1699061776,
14
"vector_store_id": "vs_abc123"
15
}
16
],
17
"first_id": "file-abc123",
18
"last_id": "file-abc456",
19
"has_more": false
20
}
Built with