Skip to main content
The Beam AI API uses bearer token authentication for most endpoints. You’ll need to obtain an access token using your API key.

Base URL

https://api.beamstudio.ai

Get Access Token

POST /auth/access-token
Fetch an access token using your API key to authenticate subsequent requests.

Request Body

apiKey
string
required
Your Beam AI API key

Response

accessToken
string
The bearer token to use in subsequent API requests
refreshToken
string
Token used to obtain a new access token when it expires
expiresIn
number
Token expiration time in seconds

Example

curl -X POST https://api.beamstudio.ai/auth/access-token \
  -H "Content-Type: application/json" \
  -d '{"apiKey": "your-api-key-here"}'

Refresh Access Token

POST /auth/refresh-token
Get a new access token using your refresh token when the current token expires.

Request Body

refreshToken
string
required
The refresh token received from the initial authentication

Response

Returns the same structure as the access token endpoint with a new access token and refresh token.

Example

curl -X POST https://api.beamstudio.ai/auth/refresh-token \
  -H "Content-Type: application/json" \
  -d '{"refreshToken": "your-refresh-token-here"}'

Using Bearer Tokens

Once you have an access token, include it in the Authorization header of your requests:
Authorization: Bearer your-access-token-here
Additionally, most endpoints require a current-workspace-id header:
current-workspace-id: your-workspace-id

Example Authenticated Request

curl -X GET https://api.beamstudio.ai/v2/user/me \
  -H "Authorization: Bearer your-access-token-here" \
  -H "current-workspace-id: your-workspace-id"