List files

GET https://api.inoneapi.com/v1/files

Page through metadata owned by the current API key, ordered by creation time descending, then ID descending for ties. This does not download files or return signed URLs.

Send Authorization: Bearer $INONEAPI_API_KEY; no request body is needed. Access is restricted to the uploading key, including within the same user or project. These operations incur no model inference charges and require no positive balance, but key rate/concurrency limits and project status still apply.

Request parameters

ParameterTypeRequiredDescription
limitintegerNoDefault 20, range 1–100.
afterstringNoPrevious page's last_id. Omit initially; the cursor must exist and belong to this key.

Offset, sort direction, media-type filters, and status filters are not provided. Do not delete the active cursor's metadata before completing pagination.

Request examples

Run the JavaScript examples on Node.js 20+ servers with INONEAPI_API_KEY set.

curl  --get https://api.inoneapi.com/v1/files \
  -H "Authorization: Bearer $INONEAPI_API_KEY" \
  --data-urlencode limit=20

Response

{
  "object": "list",
  "data": [
    {
      "id": "file_ioa_0123456789abcdef0123456789abcdef",
      "object": "file",
      "filename": "sample.pdf",
      "mime_type": "application/pdf",
      "media_type": "document",
      "bytes": 1024,
      "status": "ready",
      "created_at": 1789430400,
      "purpose": "user_data"
    }
  ],
  "has_more": false,
  "first_id": "file_ioa_0123456789abcdef0123456789abcdef",
  "last_id": "file_ioa_0123456789abcdef0123456789abcdef"
}

object is list; data contains metadata with the same fields as the upload response; has_more indicates another page; first_id and last_id identify the page boundaries. An empty page returns data: [], has_more: false, and empty strings for both IDs. Stop based on has_more, not an inferred count.

Errors and boundaries

Invalid limit or malformed after returns 400 INVALID_FILE_REQUEST. A missing or foreign cursor returns 404 FILE_NOT_FOUND. Database failure returns 503 FILE_STORAGE_UNAVAILABLE. Key rate limiting may return 429; honor Retry-After when present.

Both ready and uploading records may appear. COS lifecycle deletion does not delete metadata, so an old ready record does not prove the object is readable. Pagination is not a fixed snapshot: concurrent uploads are not inserted into already visited pages. Restart from the first page when fresh results are required.

Files guide · POST /v1/files · Error codes

List files · Documentation · InOneAPI