What is Request Metadata?
Request Metadata allows you to enhance your API calls with custom data that enables powerful analytics, tracking, and prompt template rendering. By adding metadata to your requests, you can:View request logs in the Requesty Console.
- Track user interactions across sessions
- Group requests by custom tags
- Associate requests with specific workflows
- Add business context to your API usage
- Apply prompt templates per request, pass template variables, and inherit saved prompt settings
How It Works
- Use the standard OpenAI client with Requesty’s base URL
- Add the
extra_bodyparameter 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
Theextra 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
Prompt Templates
Useprompt_id to apply a Prompt Template for a single request, and prompt_variables to pass per-request values into the template. These values are used while Requesty renders the prompt template and are not sent to the model as a separate field.
If the selected prompt has model parameters or a response format configured, Requesty applies those settings after rendering the template. Prompt-level settings override the matching request fields, including temperature, max_tokens, reasoning_effort, and response_format.
For example, if a prompt template named
localized_product_writer contains:
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