Note
You can access our API directly from the Cradl AI App without any additional credentials—just sign up to get started.
Base URL
Cradl’s API follows REST principles and is served over HTTPS. For security, unencrypted HTTP is not supported. All API endpoints use the following base URL:Authentication
To authenticate with Cradl’s API, use theAuthorization
header with a Bearer token. You can obtain an access token by making the following request:
Creating a Run
1
Find your agent
You can find your agent ID in the Cradl AI UI. It will always be on the form `cradl:agent:xxx’. Alternatively, you can list your agents using the API:Example response:
2
Create a new run
Once you have the agent ID on the form `cradl:agent:xxx’, create a run:Example response:
3
Create and upload a document
Create a document and associate it with your run:This response includes a
fileUrl
on the form https://files.api.cradl.ai/las:file:xxx that you’ll use to upload your document file: