Skip to content
Navigation

Register a file by URL, or get a presigned upload URL

Adds a file to your reusable corpus, either by URL or by uploading the bytes yourself.

Two request shapes, both pure JSON — send one or the other, never both.

By URL. { url, name?, processing? } registers the file and fetches it over http(s). The media type is sniffed from the response, so any mimeType you send is ignored. You get the file back with status: "processing".

{ "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf", "name": "fw9.pdf" }

By upload. { name, mimeType, processing? } reserves the record and returns uploadUrl plus uploadExpiresAt (15 minutes). PUT the bytes to that URL with a Content-Type header exactly equal to the mimeType you sent; parsing starts the moment they land.

{ "name": "recording.mp3", "mimeType": "audio/mpeg" }

Parsing engine — processing accepts auto (the default, self-upgrades to OCR on scans), ocr, simple, transcribe and transcribe_diarize. Audio and video default to transcribe_diarize.

Note: Files registered here are persistent — no TTL — and reusable across any number of runs as file: { "id": "…" }. That is what makes parse-once-run-many work: pass the same id to extract, redact and pipeline without re-parsing.

Learn more: Working with files

POST
https://api.cloudraker.com/v1/files
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

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
      or
      none
  • object
    • name
      string
      required
      minLength: 1
    • mimeType
      string
      required
      minLength: 1
    • processing
      optional
      auto
      or
      ocr
      or
      simple
      or
      transcribe
      or
      transcribe_diarize
      or
      none

Returns

201

The registered file.

JSON
  • object
    string
    required
  • id
    string
    required
  • name
    string
    required
  • mimeType
    string
    required
  • status
    uploading
    or
    processing
    or
    ready
    or
    failed
    required
  • createdAt
    string
    required
  • parentFileId
    optional
    string
  • metadata
    optional
    map of
    string
  • error
    optional
    string
  • uploadUrl
    optional
    string
  • uploadExpiresAt
    optional
    string
  • urls
    optional
    object
    • content
      optional
      string
    • markdown
      optional
      string
    • json
      optional
      string

400

Validation Error
JSON
  • success
    false
    required
  • error
    array of
    unknown
    required
  • data
    unknown
    required

422

The URL could not be fetched (file_fetch_failed).

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

502

The fetched bytes could not be stored (file_upload_failed).

Type to search…

↑↓ navigate↵ selectEsc close