Skip to main content
GET
/
v2
/
workflows
/
{workflow_id}
/
files
/
{collection_id}
/
results
curl -X GET 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/files/b2c3d4e5-f6a7-8901-bcde-f12345678901/results/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "results": [
    {
      "field_name": "invoice_number",
      "value": "INV-001",
      "confidence": 95,
      "evidence": [{"text": "Invoice #INV-001", "page_number": 1}],
      "verification_status": "not_verified",
      "value_unit": null
    },
    {
      "field_name": "total_amount",
      "value": "1250.00",
      "confidence": 92,
      "evidence": [{"text": "Total: $1,250.00", "page_number": 1}],
      "verification_status": "not_verified",
      "value_unit": null
    }
  ]
}
Retrieve processing results for a file collection. Returns results from all configured workflow nodes (parse, extraction, classification, etc.) in a flat dictionary keyed by node category.
The collection_id in the URL is the id returned by POST /v2/workflows/{workflow_id}/files/ or POST /v2/workflows/{workflow_id}/run/.
The endpoint returns:
  • 412 Precondition Failed while processing is in progress
  • 200 OK with results when processing is complete
Prefer webhooks over polling for production integrations. Webhooks deliver results immediately without consuming your rate limit.

Polling Example with Backoff

import time
import anyformat
from anyformat import Anyformat

client = Anyformat()
workflow_id = "550e8400-e29b-41d4-a716-446655440000"
file_id = "b2c3d4e5-f6a7-8901-bcde-f12345678901"

max_attempts = 60
base_delay = 5

for attempt in range(max_attempts):
    try:
        results = client.files.get_results(workflow_id, file_id)
        print(results)
        break
    except anyformat.APIStatusError as e:
        if e.status_code == 412:
            delay = min(base_delay * (1.5 ** min(attempt, 5)), 30)
            time.sleep(delay)
        elif e.status_code == 429:
            time.sleep(10)
        else:
            print(f"Error: {e.message}")
            break
else:
    print("Polling timed out — consider using webhooks for production")
curl -X GET 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/files/b2c3d4e5-f6a7-8901-bcde-f12345678901/results/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "results": [
    {
      "field_name": "invoice_number",
      "value": "INV-001",
      "confidence": 95,
      "evidence": [{"text": "Invoice #INV-001", "page_number": 1}],
      "verification_status": "not_verified",
      "value_unit": null
    },
    {
      "field_name": "total_amount",
      "value": "1250.00",
      "confidence": 92,
      "evidence": [{"text": "Total: $1,250.00", "page_number": 1}],
      "verification_status": "not_verified",
      "value_unit": null
    }
  ]
}

Headers

authorization
string | null

Path Parameters

workflow_id
string
required
collection_id
string
required

Response

Successful Response