Expenses API

Create an Expense

POST /api/v2/expenses

Creates a project expense. For LLM cost tracking, use the “LLM Usage” expense category from your company.

Request Body

FieldTypeRequiredDescription
project_idstringYesProject ID
expense_category_idstringYesExpense category ID
spent_datestringYesDate of expense (YYYY-MM-DD)
total_costnumberYes*Total cost amount
unitsnumberYes*Quantity
notesstringNoDescription
billablebooleanNoWhether the expense is billable
sourcestringNoweb, cli, api, or agent
metadataobjectNoJSON object, max 4KB

*Provide either total_cost or units.

Example Request

curl -X POST https://app.keito.ai/api/v2/expenses \
  -H "Authorization: Bearer kto_xxxxx" \
  -H "Keito-Account-Id: your_company_id" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "project_id_here",
    "expense_category_id": "category_id_here",
    "spent_date": "2026-05-05",
    "total_cost": 0.135,
    "notes": "LLM usage for review session",
    "source": "agent",
    "metadata": {
      "session_id": "550e8400-e29b-41d4-a716-446655440000",
      "model": "claude-opus-4-6",
      "input_tokens": 30000,
      "output_tokens": 15000
    }
  }'

List Expenses

GET /api/v2/expenses

Returns a paginated list of expenses.

Query Parameters

ParameterTypeDescription
pagenumberPage number
per_pagenumberResults per page
sourcestringFilter by source
project_idstringFilter by project
client_idstringFilter by client
user_idstringFilter by user
fromstringStart date, inclusive
tostringEnd date, inclusive
is_billedbooleanFilter billed status
updated_sincestringISO timestamp lower bound

Example Request

curl "https://app.keito.ai/api/v2/expenses?source=agent&from=2026-05-01" \
  -H "Authorization: Bearer kto_xxxxx" \
  -H "Keito-Account-Id: your_company_id"