Skip to main content
GET
/
v2
/
workflows
/
{workflow_id}
/
files
/
curl -X GET 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/files/?page=1&page_size=20' \
  -H 'Authorization: Bearer YOUR_API_KEY'
import requests

workflow_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"https://api.anyformat.ai/v2/workflows/{workflow_id}/files/"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}
params = {
    "page": 1,
    "page_size": 20
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const params = new URLSearchParams({
  page: '1',
  page_size: '20'
});

const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/files/?${params}`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
interface FileItem {
  id: string;        // collection id
  file_id: string | null;  // file id — pass to the run-staged endpoint
  name: string | null;
  status: string;
  created_at: string | null;
  updated_at: string | null;
}

interface FileListResponse {
  results: FileItem[];
  count: number;
  page: number;
  page_size: number;
}

const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const params = new URLSearchParams({
  page: '1',
  page_size: '20'
});

const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/files/?${params}`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`API error: ${response.status}`);
}

const data: FileListResponse = await response.json();
console.log(data.results);
{
  "count": 15,
  "page": 1,
  "page_size": 20,
  "results": [
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "file_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
      "name": null,
      "status": "processed",
      "created_at": "2024-03-24T12:00:00.000Z",
      "updated_at": "2024-03-24T12:05:00.000Z"
    },
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "file_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
      "name": null,
      "status": "in_progress",
      "created_at": "2024-03-24T13:00:00.000Z",
      "updated_at": "2024-03-24T13:00:30.000Z"
    }
  ]
}

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (minimum: 1)
page_sizeinteger20Items per page (minimum: 1, maximum: 100)
The maximum page_size is 100. Requests exceeding this value are silently capped at 100.
Each result’s id is the collection id. The accompanying file_id is the file’s UUID — pass it to Run Uploaded File (POST /v2/workflows/{workflow_id}/files/{file_id}/run/) to start extraction on an already-uploaded file.

Possible status Values

StatusDescription
pendingFile created, processing not yet started
queuedWaiting for an available processing slot
in_progressProcessing is actively running
processedProcessing complete, results available
errorProcessing failed
cancelledProcessing was cancelled
curl -X GET 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/files/?page=1&page_size=20' \
  -H 'Authorization: Bearer YOUR_API_KEY'
import requests

workflow_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"https://api.anyformat.ai/v2/workflows/{workflow_id}/files/"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}
params = {
    "page": 1,
    "page_size": 20
}

response = requests.get(url, headers=headers, params=params)
print(response.json())
const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const params = new URLSearchParams({
  page: '1',
  page_size: '20'
});

const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/files/?${params}`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);
interface FileItem {
  id: string;        // collection id
  file_id: string | null;  // file id — pass to the run-staged endpoint
  name: string | null;
  status: string;
  created_at: string | null;
  updated_at: string | null;
}

interface FileListResponse {
  results: FileItem[];
  count: number;
  page: number;
  page_size: number;
}

const workflowId = '550e8400-e29b-41d4-a716-446655440000';
const params = new URLSearchParams({
  page: '1',
  page_size: '20'
});

const response = await fetch(`https://api.anyformat.ai/v2/workflows/${workflowId}/files/?${params}`, {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

if (!response.ok) {
  throw new Error(`API error: ${response.status}`);
}

const data: FileListResponse = await response.json();
console.log(data.results);
{
  "count": 15,
  "page": 1,
  "page_size": 20,
  "results": [
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "file_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
      "name": null,
      "status": "processed",
      "created_at": "2024-03-24T12:00:00.000Z",
      "updated_at": "2024-03-24T12:05:00.000Z"
    },
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "file_id": "e5f6a7b8-c9d0-1234-efab-345678901234",
      "name": null,
      "status": "in_progress",
      "created_at": "2024-03-24T13:00:00.000Z",
      "updated_at": "2024-03-24T13:00:30.000Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.

Path Parameters

workflow_id
string
required

Query Parameters

page
integer
default:1
deprecated

Deprecated. Use cursor for stable keyset pagination — offset pagination can skip or repeat rows when the underlying list changes between requests.

Required range: x >= 1
page_size
integer
default:20
Required range: 1 <= x <= 100
cursor
string | null

Opaque token from a previous response's next_cursor. When present, page is ignored and pagination uses keyset order.

Response

Successful Response

results
CollectionListItem · object[]
required

List of items for the current page.

count
integer
required

Total number of items matching the query.

page
integer
required
deprecated

Deprecated. Current page number when using offset pagination. Prefer next_cursor.

page_size
integer
required

Number of results per page.

next_cursor
string | null

Opaque token to fetch the next page in keyset order. Present when the caller sent a cursor query param and more rows may follow; null on the last page. Ignore unless you're using cursor pagination — offset pagination via page is unaffected.