Skip to content

GET /api/v1/activity does not return Anthropic/Claude model usage visible in dashboard #206

@raymanguino

Description

@raymanguino

Description

The /api/v1/activity endpoint returns usage records for some models but silently omits others that are clearly visible in the OpenRouter dashboard under the same account.

Steps to reproduce

  1. Call the API
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4-6",
    "messages": [
      { "role": "system", "content": "You are a helpful assistant." },
      { "role": "user", "content": "Hello, test message." }
    ]
  }'
  1. Fetch activity
curl -H "Authorization: Bearer <management-key>" "https://openrouter.ai/api/v1/activity"

Expected behavior

All models with usage during the 30-day window are returned, including anthropic/claude-sonnet-4-6.

Actual behavior

Only OpenAI model usage is returned (openai/gpt-4o-mini, openai/text-embedding-3-small). Anthropic model usage is absent from the API response despite being visible in the OpenRouter dashboard, where it appears under the app label "OpenClaw" with confirmed request counts and costs.

Environment

  • Requests to Anthropic models made via LiteLLM with model string openrouter/anthropic/claude-sonnet-4-6
  • Both OpenAI and Anthropic requests originate from the same OpenRouter account

Additional context

The dashboard clearly shows Claude Sonnet 4.6 usage attributed to the "OpenClaw" app. The OpenAI records in the API response are attributed to "Unknown" (no X-Title header set). It's unclear whether the X-Title / app label is affecting what the activity endpoint aggregates or whether this is a provider-level accounting difference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions