Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
openrouter
v1.0.1
OpenRouter
ApiError
BadGatewayError
BadRequestError
Choice
Client
CompletionRequest
Content
ContentPart
Error
ForbiddenError
Function
FunctionParameter
InvalidJSONResponse
Message
Model
PaymentRequiredError
Reasoning
RequestTimeoutError
Response
ResponseObject
Role
ServiceUnavailableError
Tool
ToolCall
ToolCallArgument
ToolFunction
TooManyRequestsError
UnauthorizedError
Usage
Generated using Crystal 1.16.3
2025-10-10 04:16:00 UTC
struct
OpenRouter::
Usage
OpenRouter::Usage
Struct
Value
Object
Included Modules
JSON::Serializable
Defined in:
openrouter/types/response.cr
Constructors
.new
(prompt : Int32, completion : Int32, total : Int32)
.new
(pull : JSON::PullParser)
Instance Method Summary
#completion
: Int32
#prompt
: Int32
#total
: Int32
Constructor Detail
def self.
new
(prompt : Int32, completion : Int32, total : Int32)
#
[
View source
]
def self.
new
(pull : JSON::PullParser)
#
[
View source
]
Instance Method Detail
def
completion
: Int32
#
[
View source
]
def
prompt
: Int32
#
[
View source
]
def
total
: Int32
#
[
View source
]