> For the complete documentation index, see [llms.txt](https://docs.projectsim.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.projectsim.ai/getting-started/authentication.md).

# Authentication

## Getting a token

Sign up at [dashboard.projectsim.ai](https://dashboard.projectsim.ai/?utm_source=docs\&utm_medium=auth\&utm_content=authentication), verify your email, add a payment method on the **Billing** page, then create your token on the **API token** page. It is shown once; the dashboard keeps only its last four characters. You hold one active token at a time — to rotate it, revoke the current one and create another. Creating or replacing a token requires a trial or active subscription. Internal and manually invoiced accounts do not need a Stripe subscription.

Need a large dataset (1,000–10,000 assets) built for you instead? [**Request a dataset →**](https://www.projectsim.ai/access?utm_source=docs\&utm_medium=auth\&utm_content=authentication)

## Free trial and billing

Usage is counted in **credits**: a standard, measured or high-fidelity asset is 4 credits and each procedural variation-set member is 1. Every member of a variation set counts, and an asset whose job fails is refunded.

Add a payment method on the dashboard's **Billing** page before creating your API token. That starts a free trial with nothing charged: your first **40 credits** are free. The first request that needs more starts the **Starter** plan, $1,000 a month for 400 credits; unused free credits are used first, and you can also upgrade early from the Billing page. Past the included credits, each credit is $4, up to an overage cap of 200 credits a month that you can lower. For more, contact sales from the Billing page for a custom plan.

A request that cannot be paid for creates nothing and returns `402`:

* `type` ending in `/payment-required`: no payment method, or a payment failed. Add or update the card on the Billing page.
* `type` ending in `/overage-cap-reached`: the month's overage cap is used up. Raise the cap, or wait for the next period.

## Use your API token

Every request authenticates with a per-user API token, sent as a bearer token:

```
Authorization: Bearer kps_live_...
```

## Getting a token

Sign up at [dashboard.projectsim.ai](https://dashboard.projectsim.ai), verify your email, add a payment method on the **Billing** page, then create your token on the **API token** page. It is shown once; the dashboard keeps only its last four characters. You hold one active token at a time — to rotate it, revoke the current one and create another. Creating or replacing a token requires a trial or active subscription. Internal and manually invoiced accounts do not need a Stripe subscription.

## Free trial and billing

Usage is counted in **credits**: a standard, measured or high-fidelity asset is 4 credits and an express asset is 1. Every member of a variation set counts, and an asset whose job fails is refunded.

Add a payment method on the dashboard's **Billing** page before creating your API token. That starts a free trial with nothing charged: your first **40 credits** are free. The first request that needs more starts the **Starter** plan, $1,000 a month for 400 credits; unused free credits are used first, and you can also upgrade early from the Billing page. Past the included credits, each credit is $4, up to an overage cap of 200 credits a month that you can lower. For more, contact sales from the Billing page for a custom plan.

A request that cannot be paid for creates nothing and returns `402`:

* `type` ending in `/payment-required`: no payment method, or a payment failed. Add or update the card on the Billing page.
* `type` ending in `/overage-cap-reached`: the month's overage cap is used up. Raise the cap, or wait for the next period.

The **tenant is the user** who owns the token, so no request body ever carries a user id — the token alone scopes what you can see and create. Tokens without the `kps_` prefix are rejected before any lookup, so a malformed token fails fast with `401`.

{% hint style="warning" %}
Treat tokens like passwords. Keep them in a secret manager or environment variable, never in source control, and rotate them if one leaks.
{% endhint %}

## Errors

A missing or invalid token returns `401 Unauthorized`. API error responses use the [Problem Details](https://datatracker.ietf.org/doc/html/rfc7807) JSON format. For example, requesting `GET /v1/assets` without a valid token returns:

```json
{
  "type": "https://docs.projectsim.ai/errors/invalid-token",
  "title": "Invalid or missing API token",
  "status": 401,
  "detail": "provide a valid Bearer token",
  "instance": "urn:robotics:request:req_...",
  "path": "/v1/assets",
  "request_id": "req_..."
}
```

The `type` URL identifies the error category; it is not the API base URL or an endpoint to call. Send API requests to `https://api.projectsim.ai`.

The `request_id` is also returned in the `X-Request-Id` response header — quote it to support when reporting a problem. The `req_...` values above are placeholders for the unique ID assigned to each request.
