Skip to navigation

API v2

One API host per organization. One Job object for sync calls, async calls, streams and webhooks.
View as Markdown

API v2 is the CloudRaker API for documents and agents. Each organization has its own API host. /v1 on api.cloudraker.com continues without changes.

API v2 is in beta.

The API host

https://{slug}.cloudraker.run/v2

{slug} is the slug of your organization. The slug never changes. Dash shows it in Settings. Each crk_ key contains it.

How it works

  • Every call creates a job. 200 and 202 return the same Job object.
  • The client selects the delivery. Read the result in the answer, in a stream or in a webhook. The headers select the mode, not the route.
  • A slow call does not fail. When the wait ends, the job continues and the answer is 202. Read Sync and async.
  • Credentials stay in your organization. You create API keys and OIDC trusts in Dash.
  • A failed job costs nothing. The job records its use in paperwork credits when it ends.

Capabilities

Each capability has one route and one scope. The scope name is the capability name.

CapabilityRouteScope
parsePOST /v2/parseparse
extractPOST /v2/extractextract
classifyPOST /v2/classifyclassify
splitPOST /v2/splitsplit
fillPOST /v2/fillfill
redactPOST /v2/redactredact
generatePOST /v2/generategenerate
convertPOST /v2/convertconvert
redline/v2/redline/*redline
signPOST /v2/signsign
transcribePOST /v2/transcribetranscribe
agentsPOST /v2/agents/{base}/{agent}agents and run

A POST body is JSON, with a maximum size of 1 MiB. Send a large file by URL. A capability that reads a file takes { "url": "https://…" } or { "id": "…" }. The id is a file that you registered with POST /v1/files.

The agents capability refuses test keys with 403 test_key_not_allowed, because Run has no test mode.

Other routes

RoutePurpose
GET /v2/meThe credential of the request.
GET /v2/jobsList jobs. Needs jobs:read.
GET /v2/jobs/{id}Read a job, or wait for it.
POST /v2/jobs/{id}/cancelCancel a job.
POST /v2/oauth/tokenExchange an OIDC token for a crt_ token.
GET /v2/healthA public health check. No credential.

Next steps