Expand description
This library includes helpers and structs to communicate with OpenRouter.
Modules§
- completions
- Request and response types for completion endpoints.
- credits
- Request and response types for the credit endpoint. https://openrouter.ai/api/v1/credits
- error
- General error type for various endpoints. https://openrouter.ai/docs/errors
- generation
- Request and Response types for the generation endpoint.
- key
- Request and Response types for the key endpoint. https://openrouter.ai/api/v1/auth/key
- models
- Request and Response types for the model endpoints. https://openrouter.ai/api/v1/models
- providers
- Types and implementations for known available providers on OpenRouter.
Structs§
- Open
Router - There are types that serialize and deserialize into the
Enums§
- Error
OpenRouter
specific error type. This will indicate what part of the communication with OpenRouter failed.
Statics§
- DEFAULT_
USER_ AGENT - If a custom client is used, this user agent is provided so that user agents are still identifiable.