API tokens are required to access the Eraser API. Tokens are provisioned per team and access is limited to paid teams.
How to get an API token
- Sign up to Eraser. You will create a team during the sign up process.
- Upgrade to the Professional Plan. Learn more about Eraser pricing.
- Open team settings.
- Select API Token and click on "Generate Token".
- Include API token as a bearer token in API request headers. Here is an example:
curl --location --request POST 'https://app.eraser.io/api/render/elements' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"text": "Draw a data model for a Twitter clone"
}'