API Token
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 a Paid 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/prompt' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"text": "Draw a data model for a Twitter clone"
}' Deleting a token
Delete a token from the same API Token settings page. Requests using it fail straight away, and every embed it created stops working.
Organization API tokens
Org admins can generate an organization API token from API tokens in the Organization Dashboard. One token works on every team in the organization:
- Name the team with
teamId– in the query string forGETrequests, in the JSON body otherwise. Requests for a specific file, folder, or AI request don’t need it. GET /api/teamslists the teams the token can act on, with their ids.- Render calls are billed to the team you name.
- On the MCP server, pass
teamIdon every tool call. Organization tokens can also edit the rules, templates, and references of the organization’s own presets.