Logs
Retrieve log
GET
Retrieve log
The Get Log endpoint allows you to retrieve complete information about a specific log by its unique ID, including:
What is
When you make an LLM request, Keywords AI checks:
Request succeeded. Organization had 49.98 after this $0.02 request.
Request blocked. Customer has used 10 budget, not enough for this request.
- Full input/output content (
inputandoutputfields) - Type-specific fields extracted based on
log_type - Credit and budget check results (
limit_info) - Evaluation scores
- Complete request/response metadata
Response fields
Each log in the response includes:Universal fields (All Span Types)
input(string): JSON-serialized representation of the span’s input dataoutput(string): JSON-serialized representation of the span’s output datalog_type(string): Type of span ("chat","embedding","workflow", etc.)
Legacy compatibility
Forlog_type="chat", "completion", "text", or "response":prompt_messages(array): Full input messages array (extracted frominput)completion_message(object): Full output message object (extracted fromoutput)
log_type. See log types for details.You should first get the log list, and based on the unique_id in the list, retrieve the specific log. Learn more about the log list endpoint.
Credit and Budget Information
Every log includes credit and budget check information in thekeywordsai_params.limit_info field (available in the detail endpoint only).
What is limit_info?
When you make an LLM request, Keywords AI checks:
- Organization Credits: Your organization’s remaining credit balance
- Customer Budgets: Per-customer spending limits (if configured)
limit_info object shows the results of these checks.
Structure
Fields Explained
is_allowed: Whether the request was allowed to proceed (all limits passed)limits: Array of individual limit check resultsname: Type of limit -"org_credits"or"customer_budget"current_value: Balance before this request (USD)new_value: Balance after this request (USD)limit_value: Minimum required balance (USD)is_within_limit: Whether this specific check passed
Use Cases
- Monitor spending: Track credit usage per request
- Debug rejections: Understand why a request was blocked
- Customer analytics: Analyze per-customer spending patterns
- Budget alerts: Build custom alerts when approaching limits
Example: Request Allowed
Example: Request Allowed
Example: Request Blocked
Example: Request Blocked
Path parameters
string
required
The unique ID of the log to get.
Retrieve log