Skip to main content
POST
/
v2
/
files
curl -X POST 'https://api.anyformat.ai/v2/files/' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'workflow_id=550e8400-e29b-41d4-a716-446655440000' \
  -F 'files=@invoice.pdf'
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "name": null,
  "files": [
    {
      "filename": "invoice.pdf",
      "status": "uploaded"
    }
  ],
  "workflow_id": "550e8400-e29b-41d4-a716-446655440000"
}
Upload a file without triggering processing. This is useful when you want to upload a file separately from running a workflow.
This endpoint uploads a file. It does not trigger processing. To upload and process in one step, use Run Workflow instead.

Request Body

This endpoint uses multipart/form-data:
FieldTypeRequiredDescription
workflow_idstringYesThe workflow ID to associate with this file
filesfileYesThe file to upload
curl -X POST 'https://api.anyformat.ai/v2/files/' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'workflow_id=550e8400-e29b-41d4-a716-446655440000' \
  -F 'files=@invoice.pdf'
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "name": null,
  "files": [
    {
      "filename": "invoice.pdf",
      "status": "uploaded"
    }
  ],
  "workflow_id": "550e8400-e29b-41d4-a716-446655440000"
}

Headers

authorization
string | null

Body

multipart/form-data
workflow_id
string
required
files
string[]
required

Response

Successful Response

Response from creating a file collection.

id
string
required
files
FileItem · object[]
required
workflow_id
string
required
name
string | null