ActivityRow

NAME

OpenRouter::API::Result::ActivityRow - One daily activity / spending row

SYNOPSIS


# Requires a management key — see OpenRouter::API::Client.
my @rows = $or.get-activity;
for @rows -> $r {
    printf "%s  %-32s  %6d reqs  \$%7.4f  %d in / %d out\n",
        $r.date, $r.model, $r.requests, $r.cost,
        $r.prompt-tokens, $r.completion-tokens;
}

DESCRIPTION

Wraps one entry from GET /activity. Each row aggregates a single UTC date Ɨ model Ɨ endpoint Ɨ provider. Use cost-per-1k-tokens when comparing across rows — raw cost is hard to reason about without dividing by volume.

OpenRouter::API v0.1.1

Raku client for OpenRouter's non-inference REST API

Authors

  • Matt Doughty

License

Artistic-2.0

Dependencies

Cro::HTTP:ver<0.8.11>:auth<zef:cro>JSON::Fast:ver<0.19>:auth<cpan:TIMOTIMO>

Test Dependencies

Provides

  • OpenRouter::API
  • OpenRouter::API::Client
  • OpenRouter::API::Filter
  • OpenRouter::API::Result::ActivityRow
  • OpenRouter::API::Result::Credits
  • OpenRouter::API::Result::Endpoint
  • OpenRouter::API::Result::Generation
  • OpenRouter::API::Result::Model
  • OpenRouter::API::Result::Provider

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.