Skip to main content
These endpoints support either an organization API key in the X-API-Key header or a valid signed-in authorization token for a user who belongs to the organization.
Generate an organization API key from your team’s Settings → API Keys page.

Daily usage data

Retrieve daily usage statistics for your organization. Endpoint: POST https://api.firebender.com/v2/organization/daily-usage-data

Example

curl https://api.firebender.com/v2/organization/daily-usage-data \
  -H "X-API-Key: firebender_your_org_api_key_here" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{"startDate": 1752144000000, "endDate": 1752230400000}' \
  | jq
{
  "data": [
    {
      "date": 1752192000000,
      "ideOpened": true,
      "agentPrompts": 4,
      "agentAccepts": 3,
      "agentFullAccepts": 1,
      "agentAcceptedLinesAdded": 134,
      "agentAcceptedLinesRemoved": 37,
      "inlineEdits": 0,
      "inlineEditAccepts": 0,
      "inlineAcceptedLinesAdded": 23,
      "inlineAcceptedLinesRemoved": 12,
      "autocompleteAccepts": 2,
      "autocompleteShown": 6,
      "autocompleteAcceptedCharactersAdded": 237,
      "autocompleteAcceptedCharactersRemoved": 0,
      "email": "user1@firebender.com"
    }
  ],
  "period": {
    "startDate": 1752144000000,
    "endDate": 1752230400000
  }
}

Request Parameters

ParameterTypeRequiredDescription
startDatenumberYesUnix timestamp in milliseconds for the start date
endDatenumberYesUnix timestamp in milliseconds for the end date

Response Fields

FieldTypeDescription
dataarrayArray of daily usage records
data[].datenumberUnix timestamp for the day
data[].ideOpenedbooleanWhether the IDE was opened that day
data[].agentPromptsnumberNumber of agent prompts sent
data[].agentAcceptsnumberNumber of agent suggestions accepted (file accepted, individual hunk accepted)
data[].agentFullAcceptsnumberNumber of full agent suggestions accepted (user accepted all changes at once)
data[].agentAcceptedLinesAddednumberLines added through agent accepts
data[].agentAcceptedLinesRemovednumberLines removed through agent accepts
data[].inlineEditsnumberNumber of inline edits performed
data[].inlineEditAcceptsnumberNumber of inline edit accepts
data[].inlineAcceptedLinesAddednumberLines added through inline accepts
data[].inlineAcceptedLinesRemovednumberLines removed through inline accepts
data[].autocompleteAcceptsnumberNumber of autocomplete accepts
data[].autocompleteShownnumberNumber of times autocomplete was shown
data[].autocompleteAcceptedCharactersAddednumberCharacters added through autocomplete
data[].autocompleteAcceptedCharactersRemovednumberCharacters removed through autocomplete
data[].emailstringUser email address
periodobjectRequest period information
period.startDatenumberRequested start date timestamp
period.endDatenumberRequested end date timestamp

Model requests

Retrieve per-request model usage for your organization, including tokens, cost, and request mode. Endpoint: POST https://api.firebender.com/v2/organization/model-requests

Example

curl https://api.firebender.com/v2/organization/model-requests \
  -H "X-API-Key: firebender_your_org_api_key_here" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{
    "startDate": 1767222900000,
    "endDate": 1767226560000
  }' \
  | jq
{
  "data": [
    {
      "requestId": "0f8fad5b-d9cb-469f-a165-70867728950e",
      "timestamp": "2026-01-01T00:15:00Z",
      "email": "user1@firebender.com",
      "model": "gpt-5.4",
      "inputTokens": 120,
      "cacheReadTokens": 25,
      "outputTokens": 30,
      "cacheWriteTokens": 5,
      "totalTokens": 180,
      "costUsd": 1.2345,
      "spendType": "on-demand",
      "mode": "write"
    }
  ],
  "nextCursor": null
}

Request Parameters

ParameterTypeRequiredDescription
startDatenumberYesStart of the time window as a Unix timestamp in milliseconds. Data is only available on or after 2025-12-31T00:00:00Z
endDatenumberYesEnd of the time window as a Unix timestamp in milliseconds. Must be greater than startDate
emailstringNoFilter results to a single user email within the organization
limitnumberNoNumber of rows to return. Defaults to 100 and caps at 500
cursorstringNoOpaque cursor returned in a previous response to fetch the next page

Response Fields

FieldTypeDescription
dataarrayArray of model request records sorted oldest first
data[].requestIdstringUnique request identifier
data[].timestampstringRequest timestamp in ISO 8601 format
data[].emailstringUser email address
data[].modelstringModel identifier used for the request. See Models for valid model IDs
data[].inputTokensnumberInput tokens billed for the request
data[].cacheReadTokensnumberCache read tokens billed for the request
data[].outputTokensnumberOutput tokens billed for the request
data[].cacheWriteTokensnumberCache write tokens billed for the request
data[].totalTokensnumberSum of input, cache read, output, and cache write tokens
data[].costUsdnumberRequest cost in USD
data[].spendTypeenumSpending bucket for the request: included for plan-included usage, on-demand for metered overage usage, or byok for bring-your-own-key usage
data[].modestringAgent mode when available. Built-in modes include write, plan, ask, and debug. This can also be another user-defined string for custom agents. See Agents/Subagents
nextCursorstring or nullCursor for the next page, or null when there are no more results

Notes

  • Date ranges cannot exceed 90 days.
  • Data is only returned for requests on or after 2025-12-31T00:00:00Z.
  • Very recent non-final requests may be withheld briefly to avoid returning unstable data.