> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spatius.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Token API

> Console API endpoint for issuing Spatius Session Tokens.

The Spatius Console API runs at the host below. Call it from your backend when you need to mint short-lived Session Tokens for Direct Mode clients.

| Region | Console API host |
| - | - |
| `us-west` (default) | `console.us-west.spatius.ai` |
| `ap-northeast` | `console.ap-northeast.spatius.ai` |
| `cn-beijing` | `console.cn-beijing.spatialwalk.top` |

See [Regions](/api-reference/regions) for the full endpoint reference and override options.

## Obtain a session token

Call the endpoint `POST /v1/console/session-tokens` on your console host.

### Request parameters

* **Body**
  * **expireAt**: int, expiration timestamp in seconds. Range: now \< expireAt \< now + 24 hours
  * **modelVersion**: string, optional model version override
* **Header**
  * **X-API-Key**: your API key

### Request example

```bash theme={null}
EXPIRE_AT=$(($(date +%s) + 3600))

curl --location --request POST 'https://console.us-west.spatius.ai/v1/console/session-tokens' \
  --header 'X-API-Key: <your-api-key>' \
  --header 'Content-Type: application/json' \
  --data-raw "{\"expireAt\": ${EXPIRE_AT}}"
```

### Response example

The response returns the token in `sessionToken`.

```json theme={null}
{
  "sessionToken": "..."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.