Files
List the authenticated user's uploaded files in the request's workspace.
workspace_id narrows a master-key listing to one workspace; a keyed request is already confined to its key's own and cannot widen or move it.
Each flavor pages with its own cursor. OpenAI's after names the last file of the previous page, and has_more says whether to ask again. Anthropic's next_page is passed back as page, and ids[] reads up to 100 named files in one page. A cursor whose file has since been deleted or has expired is still a position. An after the caller never owned is a 404, and a page token this gateway did not issue is a 400.
Enter your API key here (sent as Otari-Key header).
100descPossible values: Successful Response
Validation Error
GET /api/v1/files HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"data": [
{
"bytes": 1,
"created_at": 1,
"expires_at": 1,
"filename": "text",
"id": "text",
"object": "file",
"purpose": "text"
}
],
"first_id": "text",
"has_more": true,
"last_id": "text",
"object": "list"
}Upload a file. Answers in the OpenAI or Anthropic file shape, following the caller's headers.
Enter your API key here (sent as Otari-Key header).
user_dataSuccessful Response
The upload exceeds the configured maximum size.
Validation Error
POST /api/v1/files HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 51
{
"file": "text",
"purpose": "user_data",
"user": "text"
}{
"bytes": 1,
"created_at": 1,
"expires_at": 1,
"filename": "text",
"id": "text",
"object": "file",
"purpose": "text"
}Retrieve metadata for a single file.
Enter your API key here (sent as Otari-Key header).
Successful Response
Validation Error
GET /api/v1/files/{file_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"bytes": 1,
"created_at": 1,
"expires_at": 1,
"filename": "text",
"id": "text",
"object": "file",
"purpose": "text"
}Soft-delete a file's metadata and remove its bytes from the backend.
Enter your API key here (sent as Otari-Key header).
Successful Response
Validation Error
DELETE /api/v1/files/{file_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"deleted": true,
"id": "text",
"object": "file"
}Download the raw bytes of a file, streamed rather than buffered whole.
Enter your API key here (sent as Otari-Key header).
File content. Content-Type reflects the stored media type; application/octet-stream is the fallback.
Validation Error
GET /api/v1/files/{file_id}/content HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
binaryLast updated
Was this helpful?
