Authorizations
Bearer token authentication used for standard API calls. Format: 'Bearer YOUR_API_KEY'
Body
Unique identifier for the AI API request
"req_01K7QJT2YSVV0YR2NPK4Z2GRXQ"
Secret key for the connection that made this request
"cons_live_Gv3Kl2uKH_4BxcFQlhDRKimWlp2dBpmne3eK_cYoATblRRADynmmY9"
Secret key for the product configuration used for this request
"cons_live_oe9egtYLNza5t6SVUdGOBmpC7VrX7c6SVDJfQbeLYBc3maNVoAu3Db"
Optional metadata to associate with the request. Must be a JSON object with up to 100 key-value pairs, where both keys and values are strings between 1-255 characters. Keys must contain only ASCII letters, numbers, and underscores (no spaces or special characters).
{
"user_id": "123456",
"session_id": "abc123"
}Number of input/prompt tokens used in the request
x >= 0845
Number of output/completion tokens generated in the response
x >= 0412
Number of input characters used in the request
x >= 05000
Number of output characters generated in the response
x >= 02500
Number of seconds spent processing the input
x >= 02
Number of seconds spent generating the output
x >= 05
Response
Request created or retrieved
Unique identifier for the AI API request
"req_01K7QJT2YQKB9E6SB3J4VRDJEV"
Status of the request: 'pending' (request was created but not yet completed), 'completed' (request was completed and metered successfully), 'error' (request failed to be metered)
pending, completed, error "pending"
Provider used for the request (e.g., openai, anthropic, deepseek, mistral, xai, google)
"openai"
Full endpoint path used for the forwarded request
"POST https://api.openai.com/v1/chat/completions"
Indicates whether the provider key used for this request was managed by Lava ('managed') or provided by the customer ('unmanaged')
managed, unmanaged "managed"
Total cost of the request including fees and service charges (high precision decimal as string)
"0.0639100000"
Total cost of the request charged to the wallet (high precision decimal as string)
"0.0639100000"
Total cost of the request charged to the you, the merchant (high precision decimal as string)
"0.0000000000"
Metadata associated with the request, key-value pairs that can be used to help track the request in your system. Keys must contain only ASCII letters, numbers, and underscores (no spaces or special characters).
ISO 8601 timestamp when the request was created and initially recorded by Lava
"2023-05-15T14:22:31Z"
Identifier for the connection that made this request
"con_01K7QJT2YQ2E3FYAXD1VEJM5ZJ"
Identifier for the product configuration used for this request
"prd_01K7QJT2YQPDBCFD7FR9MWF077"
AI model used for the request (e.g., gpt-4, claude-3-opus)
"gpt-4"
Original response ID returned from the AI provider
"chatcmpl-abc123def456ghi789"
ISO 8601 request completion timestamp returned by the provider
"2023-05-15T14:22:31Z"