For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
LoginBook a Demo
  • Getting Started
    • Athena SDK Quickstart
  • Database API
    • Database Filters & CRUD
  • Python Guides
    • Build with Agents
    • Use Models Directly
    • Load Data Frames
    • Upload Files
    • Create Assets
    • Structured Output
    • Long-Running AOP Execution
  • TypeScript Guides
    • Build with Agents
    • Working with Assets
    • Use Models Directly
    • Execute AOPs
    • Sheets API
    • Browser JavaScript (ESM)
    • UI Registry (Assistant.js)
    • Upload Files
    • Create Assets
    • Structured Output
  • API Reference
      • POSTGenerate Cube API Token
      • GETGet Semantic Model Metadata
      • POSTQuery Semantic Model
Logo
LoginBook a Demo
API ReferenceSemantic Model

Generate Cube API Token

Beta
POST
https://api.athenaintel.com/api/v0/semantic-model/:asset_id/generate-token
POST
/api/v0/semantic-model/:asset_id/generate-token
$curl -X POST https://api.athenaintel.com/api/v0/semantic-model/asset_id/generate-token \
> -H "X-API-KEY: <apiKey>"
1{
2 "cube_url": "string",
3 "expires_at": "string",
4 "token": "string"
5}

Generate a short-lived JWT token for direct access to the semantic model’s Cube REST API. Use this token to query /cubejs-api/v1/load and /cubejs-api/v1/meta directly. Token expires after 1 hour. The token carries only the model ID and schema hash — database credentials are NOT included and are resolved server-side by Cube via callback.

Was this page helpful?
Previous

Get Semantic Model Metadata

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

asset_idstringRequired

Response

Successful Response
cube_urlstring
Base URL of the Cube instance
expires_atstring
ISO 8601 timestamp when the token expires
tokenstring
JWT for direct Cube REST API access

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error