Log a request to the system. This is useful for logging requests from custom LLM providers.Documentation Index
Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt
Use this file to discover all available pages before exploring further.
parameters field using the response_format.json_schema structure.
Example:
input field. This allows request replay to use the exact tools from the original request.
Example:
tool_choice:
"auto" - Model decides whether to use a tool"none" - Model will not call any tools"required" - Model must call at least one tool{"type": "function", "function": {"name": "get_weather"}} - Force a specific toolparameters field using provider-specific formats:
| Provider | Parameter | Example |
|---|---|---|
| Anthropic | thinking | {"thinking": {"type": "enabled", "budget_tokens": 10000}} |
thinking_config | {"thinking_config": {"include_thoughts": true, "thinking_budget": 8000}} | |
| OpenAI | reasoning_effort | {"reasoning_effort": "high"} |
status, error_type, and error_message fields. This is useful for monitoring error rates, debugging issues, and tracking provider reliability.
error_type to categorize warnings and errors consistently across dashboards, API responses, and filters. A full list of supported values is available in the error_type field below.
WARNING status for requests that succeeded but had issues (e.g., retries, degraded responses):
API key to authorize the operation.
Model parameters including temperature, max_tokens, etc. Can also include structured output configuration via response_format.json_schema. See documentation for structured output examples.
512Custom key-value pairs for tracking additional request information. Keys are limited to 1024 characters.
The ID of the prompt template used for this request. This is useful for tracking which prompt was used in the request.
x > 0x >= 0x >= 0x >= 00 <= x <= 100Request status.
| Value | Description |
|---|---|
SUCCESS | Request completed successfully (default) |
WARNING | Request succeeded but had issues (e.g., retries, degraded response) |
ERROR | Request failed |
SUCCESS, WARNING, ERROR Categorized error type.
| Value | Description | Allowed Statuses |
|---|---|---|
PROVIDER_RATE_LIMIT | Rate limit hit on provider API | WARNING, ERROR |
PROVIDER_QUOTA_LIMIT | Account quota or spending limit exceeded | WARNING, ERROR |
PROVIDER_PARTIAL_RESPONSE | Provider returned a successful response, but the saved output may be incomplete, filtered, blocked, malformed, or otherwise partial | WARNING |
VARIABLE_MISSING_OR_EMPTY | Required template variable was missing or empty | WARNING |
PROVIDER_TIMEOUT | Request timed out | ERROR |
PROVIDER_AUTH_ERROR | Authentication failed with provider | ERROR |
PROVIDER_ERROR | General provider-side error | ERROR |
TEMPLATE_RENDER_ERROR | Failed to render prompt template | ERROR |
UNKNOWN_ERROR | Uncategorized error | WARNING, ERROR |
PROVIDER_TIMEOUT, PROVIDER_QUOTA_LIMIT, PROVIDER_RATE_LIMIT, PROVIDER_PARTIAL_RESPONSE, PROVIDER_AUTH_ERROR, PROVIDER_ERROR, TEMPLATE_RENDER_ERROR, VARIABLE_MISSING_OR_EMPTY, UNKNOWN_ERROR Detailed error message describing what went wrong. Maximum 1024 characters.
1024Successful Response
Request status indicating success, warning, or error.
SUCCESS, WARNING, ERROR Categorized error type if status is WARNING or ERROR.
Detailed error message if status is WARNING or ERROR.