openrouter

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 9 Imported by: 3

Documentation

Overview

Package openrouter reads OpenRouter key allowances and account credit balances.

Index

Constants

View Source
const (
	ProviderID = "openrouter"
	Endpoint   = "https://openrouter.ai/api/v1/key"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct{ Transport http.RoundTripper }

Reader uses the supplied transport or http.DefaultTransport. It never acquires credentials.

func (Reader) Read

func (r Reader) Read(ctx context.Context, credential usage.Credential) (wire.AccountUsageResponse, error)

Read observes the key allowance and any account balance that the same credential can read.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL