Asynchronous Execution
How to run async calls for long running tools
API authorization set up
When on API keys page, scroll down and you will see the Region code and your Project Id.
To generate your Relevance API key, click on "Create new secret key", with the role "Admin". Click on "Generate API key". Copy the values shown on the modal.
- Authorization token
- API key
- Region
- Project
Authorization tokens are formed by combining Project Id:API Key
.
Either directly copy the Authorization token
from the API page or use the
Project id
and API key
combination as shown in the snippet below:
Tool ID
There are different ways to find the ID of a Tool. The easiest way is to use the URL. For example
when on the Tool and Use tab, the component before use/app
and after project ID is the tool ID. The string
below shows the URL structure:
https://app.relevanceai.com/notebook/{region}/{project_id}/{tool_id}/use/app
Make async call for long running tool
Provide tool_id
in the code below to trigger a task and check the progress:
Which Relevance AI Endpoints can we use?
This is our API documentation which shows all Relevance AI Endpoints. You can make requests to any endpoint that doesn’t require organization level permissions. The endpoints that require org level permissions will mention the word “Organization” somewhere in the Required permissions section, as shown in the screenshot below.
Was this page helpful?