This API allows agent creators to query the usage costs for a given session and retrieve its current session status.
Session Status Values
ThesessionStatus field in the response indicates the current state of the session:
| Status Value | Description |
|---|---|
running | The session is active and can accept new metering requests |
completed | The session has ended normally (either isFinal=true was reported or the session terminated properly) |
error | The session ended abnormally (e.g., platform failure or other errors) |
Response Data
The API returns comprehensive information about the session including:- sessionId: Unique identifier of the session
- sessionStatus: Current status of the session (
running,completed, orerror) - reportCount: Total number of successfully processed metering reports
- isFinalReported: Whether the final report has been received
- meteringRecords: Array of all successfully processed metering records with their
meteringIdandisFinalstatus
Authentication
Authentication is done using your Agent Key as a Bearer token in the Authorization header.Use Cases
This API is useful for:- Verifying that metering reports were successfully received and processed
- Checking the current status of a session
- Confirming that the final report was received
- Debugging billing discrepancies
- Monitoring active sessions
Authorizations
Use your Agent Key as the Bearer token
Path Parameters
Unique identifier of the session