Skip to content
Navigation

Extract from many files in one call

Runs one saved extraction action over up to 100 files, creating one ordinary run per file.

A batch is fan-out sugar, not a new object: there is no batch id and nothing to poll for the batch as a whole. You get back a run id per file — read each one with GET /v1/runs/{id}, or list them together with GET /v1/runs using the metadata you attached.

A saved action is required. Inline schema and hints are accepted on POST /v1/extract only — running the same shape over a hundred files is exactly when that shape should be a reviewed, saved asset.

metadata, webhook, ttl and citations are copied onto every run, so one webhook endpoint receives all of them and one flag grounds the whole batch.

{
  "action": "invoice-fields",
  "files": [{ "id": "a04d6597-…" }, { "url": "https://example.com/invoice-2.pdf" }],
  "metadata": { "batch": "2026-07-25-invoices" }
}

Always asynchronous. The response is 202 right away. runs[] has one entry per file, in the order you sent them: {id, statusUrl, file} when the run was created, or {file, error} when that one file could not start — the other runs still stand, and count reports how many were created.

Note: The whole batch costs a single request against your rate limit, however many files it fans out to.

Learn more: Extraction guide

POST
https://api.cloudraker.com/v1/extract/batch
Try it
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Request body JSON required

  • action
    string
    required

    The saved action every run in the batch uses, by id or slug. Required.

    Inline schema and hints are deliberately not accepted here: a batch runs one reviewed, versionable shape over many files.

    minLength: 1
  • files
    array of
    required

    The input files, up to 100. Each one becomes its own run.

    Any of the following:

    • object
      • url
        string
        required
        format: uri
      • name
        optional
        string
        minLength: 1
      • processing
        optional
        auto
        or
        ocr
        or
        simple
        or
        transcribe
        or
        transcribe_diarize
    • object
      • id
        string
        required
        minLength: 1
      • ephemeral
        optional
        boolean

        Purge this file with the run (TTL expiry or DELETE /v1/runs/{id}), unless you keep the run. API workspace only: ignored under /v1/spaces/{spaceId}/….

  • citations
    optional
    boolean

    Whether to ground each extracted value in the source document. Off by default — grounding is an explicit add-on, so send citations: true to ask for it.

    When on, output.citations maps every extracted field to where it came from — fileId plus page and bounding box for documents, or timecodeStart/timecodeEnd for audio. A field the documents simply do not contain comes back as an entry with notFound: true and no location.

  • metadata
    optional
    map of
    unknown

    Arbitrary JSON you attach to the run and get back on every read of it.

    Use it to carry your own identifiers — an order number, a customer id — so a webhook or a polled run reconciles without a lookup table. Capped at 10 KB serialized.

  • webhook
    optional

    Where to deliver this run's events, given one of two ways.

    • { "url": "…" } — a one-off https endpoint for this run only.
    • { "id": "whe_…" } — a saved endpoint from POST /v1/webhooks. Runs hold the reference, so pausing or re-pointing that endpoint applies to this run too.

    Deliveries are at-least-once and signed — dedupe on eventId and verify against GET /v1/webhooks/jwks.json.

    Any of the following:

    • object
      • url
        string
        required
        format: uri
    • object
      • id
        string
        required
        minLength: 1
  • ttl
    optional
    integer

    How long, in seconds, to keep this run and its files before purging them automatically.

    The maximum is 604800 (7 days). The deadline comes back as expiresAt on every read of the run. Call POST /v1/runs/{id}/keep before then to clear the TTL and move the results into a space permanently.

    E-signature runs are exempt — an envelope waits for its signers however long that takes.

    maximum: 604800 · minimum: 1 · default: 86400

Returns

202

Accepted — one run per file.

JSON
  • object
    string
    required
  • count
    number
    required
  • runs
    array of
    object
    required
    • file
      required

      An input file, given one of two ways.

      • { "url": "…", "name"?: "…", "processing"?: "…" } — fetched over http(s) for this run and purged with it.
      • { "id": "…" } — a file you already registered with POST /v1/files, reusable across runs and never re-parsed.
      • { "id": "…", "ephemeral": true } — a file you uploaded only for this run, purged with it. Use it only on a file no other run uses.

      Any of the following:

      • object
        • url
          string
          required
          format: uri
        • name
          optional
          string
          minLength: 1
        • processing
          optional
          auto
          or
          ocr
          or
          simple
          or
          transcribe
          or
          transcribe_diarize
      • object
        • id
          string
          required
          minLength: 1
        • ephemeral
          optional
          boolean

          Purge this file with the run (TTL expiry or DELETE /v1/runs/{id}), unless you keep the run. API workspace only: ignored under /v1/spaces/{spaceId}/….

    • id
      optional
      string
    • statusUrl
      optional
      string
    • error
      optional
      object
      • code
        string
        required
      • message
        string
        required

400

Invalid request (invalid_request).

422

Unusable webhook endpoint.

429

Rate limited. The /v1 API allows at least 67 requests per minute per organization (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the Retry-After interval and retry — the error is retryable.
JSON
  • code
    rate_limited
    required
  • message
    string
    required
  • retryable
    true
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close