Log Request
Log a request made outside of PromptLayer’s managed run APIs. Use this endpoint for custom providers, background jobs, or direct LLM client calls that you still want to inspect, search, score, and replay in PromptLayer.Documentation Index
Fetch the complete documentation index at: https://promptlayer-claude-nice-fermi-nop3f.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Behavior Notes
inputandoutputmust use Prompt Blueprint format.- Chat message
contentmust be an array of content blocks, not a plain string. - Provider-specific settings such as structured outputs, tools, tool choice, thinking, and reasoning should be recorded in the prompt blueprint or
parameterspayload. - Use
status,error_type, anderror_messageto log failed or degraded requests.
Related
Authorizations
Body
Request body for custom logging. Chat message content must be an array of content blocks, not a plain string.
- Completion Template
- Chat Template
- Completion Template
- Chat Template
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.
1024Response
Successful 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.

