curl -H "X-API-Key: $PARTICLE_API_KEY" \
"https://api.particle.pro/v1/me/usage?period=current"{
"api_key": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"key_prefix": "<string>",
"name": "<string>",
"created_by": {
"id": "<string>",
"name": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z"
},
"billable_basis": "requests",
"billable_requests": 123,
"endpoints": [
{
"billable_requests": 123,
"endpoint": "<string>",
"errors": 123,
"method": "<string>",
"requests": 123,
"mcp_tool": "<string>"
}
],
"endpoints_truncated": true,
"errors": 123,
"period": {
"end": "2023-11-07T05:31:56Z",
"name": "current",
"source": "billing_period",
"start": "2023-11-07T05:31:56Z",
"counts_since": "2023-11-07T05:31:56Z"
},
"requests": 123,
"totals_partial": true
}{
"detail": "Property foo is required but is missing.",
"error_code": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"resolve": {
"message": "<string>",
"action": "<string>",
"endpoint": "<string>",
"method": "<string>",
"url": "<string>"
},
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Get your API key's usage
Returns the requests this API key made in the current billing period (or today), broken down by endpoint and MCP tool, with how many bill per call. Free. Counts come from the request log, which keeps 90 days. MCP calls made through an OAuth grant are not attributed to any key.
curl -H "X-API-Key: $PARTICLE_API_KEY" \
"https://api.particle.pro/v1/me/usage?period=current"{
"api_key": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"key_prefix": "<string>",
"name": "<string>",
"created_by": {
"id": "<string>",
"name": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z"
},
"billable_basis": "requests",
"billable_requests": 123,
"endpoints": [
{
"billable_requests": 123,
"endpoint": "<string>",
"errors": 123,
"method": "<string>",
"requests": 123,
"mcp_tool": "<string>"
}
],
"endpoints_truncated": true,
"errors": 123,
"period": {
"end": "2023-11-07T05:31:56Z",
"name": "current",
"source": "billing_period",
"start": "2023-11-07T05:31:56Z",
"counts_since": "2023-11-07T05:31:56Z"
},
"requests": 123,
"totals_partial": true
}{
"detail": "Property foo is required but is missing.",
"error_code": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"resolve": {
"message": "<string>",
"action": "<string>",
"endpoint": "<string>",
"method": "<string>",
"url": "<string>"
},
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Authorizations
Query Parameters
Response
OK
What billable_requests counts. requests: the plan bills in requests, so each call counts the requests it draws. calls: the plan bills calls in dollars, or the organization has no plan, so each call that bills counts once. calls_fallback: billing data could not be reached, so each call that bills counts once and a transcription request counts 1 rather than the requests it draws.
requests, calls, calls_fallback Requests this key's calls billed in the period, counted as billable_basis says. On a plan billed in requests, each call counts the requests it draws from the plan's included requests, or past them as overage: most draw 1, and a transcription request, which is charged in USD instead, draws nothing, as does a call to an endpoint or tool your subscription does not price. Otherwise each call that bills counts once. Calls that bill: successful calls to priced endpoints, and calls to paid MCP tools, which are metered when the call starts and so count even when the tool then fails or is denied. Free endpoints such as /v1/me are never counted, nor are endpoints and MCP tools billed through plan features rather than per call (alerts, the episode archive and stream), a retried write answered from its first response under an Idempotency-Key, or a transcription request whose charge was refunded because the episode could not be transcribed.
Was this page helpful?