CLI: Logging Expenses

The current production Keito CLI tracks time only. It does not include:

  • keito expense log
  • keito expense list
  • automatic LLM token-cost capture

Use one of these options for expenses:

NeedUse
Manual expense entryKeito web app
Scripted expense entryExpenses API
Agent time plus LLM cost metadataNode SDK, Python SDK, or REST API

Example API Request

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

See LLM Usage Expenses for how these costs appear in Keito.