--- title: Session Usage | Luma Agents --- GET /v1/sessions/{session\_id}/usage Select code samplecURL (shell:curl) ```js const url = 'https://agents.lumalabs.ai/v1/sessions/example/usage'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```sh curl --request GET \ --url https://agents.lumalabs.ai/v1/sessions/example/usage \ --header 'Authorization: Bearer ' ``` - Productionagents.lumalabs.ai/v1/sessions/{session\_id}/usage What a session and every session it started cost, by stage and by job. Each stage line carries its credits with the LLM tokens and calls behind them, and each job line carries its credits and whether they are still an estimate. `total_credits` is the session total. ## Authorizations - **[BearerAuth](/api/agents/index.md#bearerauth)** ## Parameters ### Path Parameters **session\_id** required *Session Id* string ## Responses ### 200 Successful Response Media typeapplication/json *SessionUsageRollup* Payload for `GET /v1/sessions/{id}/usage` and the BFF mirror. object **jobs** *Jobs* Array\ *JobUsage* What one generation dispatch cost. Deliberately not a job state: `GET /v1/sessions/{id}/jobs` owns that answer and derives it from the artifacts, so a second, weaker copy here would be a drift surface. The two join on `job_id`. object **credits** required *Credits* integer **credits\_estimated** required *Credits Estimated* boolean **job\_id** required *Job Id* string **model** Any of: - [string](#tab-panel-0-0) - [null](#tab-panel-0-1) string null **session\_id** required *Session Id* string **stages** *Stages* Array\ *StageUsage* Rollup line for one stage bucket of a session. object **cache\_creation\_input\_tokens** *Cache Creation Input Tokens* integer 0 **cache\_read\_input\_tokens** *Cache Read Input Tokens* integer 0 **credits** required *Credits* integer **event\_count** required *Event Count* integer **generation\_count** required *Generation Count* integer **input\_tokens** required *Input Tokens* integer **llm\_call\_count** required *Llm Call Count* integer **output\_tokens** required *Output Tokens* integer **stage** required *Stage* string **total\_credits** required *Total Credits* integer **unresolved\_event\_count** required *Unresolved Event Count* integer ##### Example ```json { "stages": [ { "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0 } ] } ``` ### 422 Validation Error Media typeapplication/json *HTTPValidationError* object **detail** *Detail* Array\ *ValidationError* object **ctx** *Context* object **input** *Input* **loc** required *Location* Array **msg** required *Message* string **type** required *Error Type* string ##### Examplegenerated ```json { "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ] } ```