Features
Request Metadata
Add custom metadata to your API calls for powerful analytics
What is Request Metadata?
Request Metadata allows you to enhance your API calls with custom data that enables powerful analytics and tracking. By adding metadata to your requests, you can:
- Track user interactions across sessions
- Group requests by custom tags
- Associate requests with specific workflows
- Add business context to your API usage
How It Works
- Use the standard OpenAI client with Requesty’s base URL
- Add the
extra_body
parameter with your metadata - View and analyze this data in your Requesty dashboard
Key Metadata Fields
Core Fields
- tags: Array of strings for grouping related requests
- user_id: Identifier for the end user making the request
- trace_id: Unique identifier to track related requests in a workflow
Extra Context
The extra
object can include any custom fields relevant to your business:
- country: User’s location for geographic analysis
- prompt_title: Descriptive name of the prompt’s purpose
- tier: User’s subscription level
- language: Preferred language of the user
- application: Source application or feature
Benefits
- User Journey Analysis: Track how users interact with AI across sessions
- Cost Attribution: Assign AI usage costs to specific business units
- Performance Optimization: Identify which prompts perform best for specific uses
- Workflow Visualization: See how multiple API calls connect in complex processes
Implementation Examples
Python Example
Node.js Example
For consistent analytics, establish naming conventions for your tags and metadata fields across your organization.