List Files
List uploaded files for the current account with pagination; filter by purpose and search by keyword. user_id is taken from the User-Id request header when applicable, not from query parameters.
GET/v1/files/list
Authorization
AuthorizationstringheaderRequired
HTTP: Bearer Auth
- Security Scheme Type: http
- HTTP Authorization Scheme: Bearer API_key,Used to verify account information, can be viewed in Pay-as-you-go > API Key Management .
Request Header
User-Id string Optional
User identifier when required by your integration; semantics depend on the backend.
Query Parameters
purpose string Optional
Filter by file purpose; omit to return files of all purposes. Allowed values and meanings:
- voice_clone: Original file for fast clone
- prompt_audio: Sample audio for voice clone
- t2a_async_input: Async long-text TTS input file
- t2a_async: Async long-text TTS generated audio file
- a2t_async_input: Async speech transcription input audio file
- ocr_async_input: Document parsing input document file
- ocr_async_md: Document parsing output md file
- ocr_async_json: Document parsing output json file
keyword string Optional
Search keyword: fuzzy match on filename, or exact match on file_id.
page integer Optional
Page number, starting from 1. Default: 1.
size integer Optional
Page size. Default: 10, maximum: 100.
Response Body Structure
totalinteger
Total number of files matching the query (for pagination). 0 when there are no results.
filesarray<object>
Files on this page; empty array [] when there is no data. Each file object includes:
files[i].file_idlong
The unique identifier of the file
files[i].bytesinteger
File size in bytes
files[i].created_atinteger
Unix timestamp when the file was created, in seconds
files[i].filenamestring
Name of the file
files[i].purposestring
Purpose of the file
base_respobject
base_resp.status_codeinteger
Status codes are as follows:
- 100001, Request parameter error
- 101999, Internal server error
For more details, see Error Codes.
base_resp.status_msgstring
Status details