# API Token

API tokens are required to access the Eraser API. Tokens are provisioned per team and access is limited to **[paid teams](https://www.eraser.io/pricing)**.

### How to get an API token

1. [Sign up](https://app.eraser.io/auth/sign-up) to Eraser. You will create a team during the sign up process.
2. Upgrade to a [Paid plan](https://app.eraser.io/dashboard/all/?settings=plans). Learn more about [Eraser pricing](https://www.eraser.io/pricing).
3. Open team settings.

<Figure src="/https/docs.eraser.io/assets/52b1ac6-image.png" alt="" width="200px" />

4. Select [API Token](https://app.eraser.io/dashboard/all?settings=api-tokens) and click on "Generate Token".

<Figure src="/https/docs.eraser.io/assets/6ccead0-image.png" alt="" border />

5. Include API token as a **bearer token** in API request headers. Here is an example:

```eraser
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](https://app.eraser.io/dashboard/all?settings=api-tokens) settings page. Requests using it fail straight away, and every [embed](/reference/embedding) it created stops working.

### Organization API tokens

Org admins can generate an organization API token from **API tokens** in the [Organization Dashboard](/organizations). One token works on every team in the organization:

* Name the team with `teamId` – in the query string for `GET` requests, in the JSON body otherwise. Requests for a specific file, folder, or AI request don't need it.
* [`GET /api/teams`](/reference/list-teams) lists the teams the token can act on, with their ids.
* Render calls are billed to the team you name.
* On the [MCP server](/mcp), pass `teamId` on every tool call. Organization tokens can also edit the rules, templates, and references of the organization's own presets.
