ActivityItem - Python SDK

ActivityItem method reference

The Python SDK and docs are currently in beta. Report issues on GitHub.

Fields

FieldTypeRequiredDescriptionExample
byok_usage_inferencefloat✔️BYOK inference cost in USD (external credits spent)0.012
completion_tokensint✔️Total completion tokens generated125
date_str✔️Date of the activity (YYYY-MM-DD format)2025-08-24
endpoint_idstr✔️Unique identifier for the endpoint550e8400-e29b-41d4-a716-446655440000
modelstr✔️Model slug (e.g., “openai/gpt-4.1”)openai/gpt-4.1
model_permaslugstr✔️Model permaslug (e.g., “openai/gpt-4.1-2025-04-14”)openai/gpt-4.1-2025-04-14
prompt_tokensint✔️Total prompt tokens used50
provider_namestr✔️Name of the provider serving this endpointOpenAI
reasoning_tokensint✔️Total reasoning tokens used25
requestsint✔️Number of requests made5
usagefloat✔️Total cost in USD (OpenRouter credits spent)0.015