Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORTKEY_API_KEY | Yes | Your Portkey API key |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_all_users | List all users in your Portkey organization, including their roles and account details |
| invite_user | Invite a new user to your Portkey organization with specific workspace access and API key permissions |
| get_user_stats | Retrieve detailed analytics data about user activity within a specified time range, including request counts and costs |
| get_user | Retrieve detailed information about a specific user by their ID |
| update_user | Update a user's profile information including name and organization role |
| delete_user | Remove a user from your Portkey organization. This action cannot be undone. |
| list_user_invites | List all pending and sent user invitations in your Portkey organization |
| get_user_invite | Retrieve details about a specific user invitation |
| delete_user_invite | Cancel and delete a pending user invitation |
| resend_user_invite | Resend an invitation email to a pending user |
| list_workspaces | Retrieve all workspaces in your Portkey organization, including their configurations and metadata |
| get_workspace | Retrieve detailed information about a specific workspace, including its configuration, metadata, and user access details |
| create_workspace | Create a new workspace in your Portkey organization |
| update_workspace | Update an existing workspace's settings and metadata |
| delete_workspace | Delete a workspace from your organization. This action cannot be undone. |
| add_workspace_member | Add a user to a workspace with a specific role |
| list_workspace_members | List all members of a workspace with their roles |
| get_workspace_member | Get details about a specific member of a workspace |
| update_workspace_member | Update a member's role in a workspace |
| remove_workspace_member | Remove a user from a workspace |
| list_configs | Retrieve all configurations in your Portkey organization, including their status and workspace associations |
| get_config | Retrieve detailed information about a specific configuration, including cache settings, retry policies, and routing strategy |
| create_config | Create a new configuration with cache, retry, and routing settings |
| update_config | Update an existing configuration's cache, retry, or routing settings |
| delete_config | Delete a configuration by slug. This action cannot be undone. |
| list_config_versions | List all versions of a configuration to view its change history |
| list_virtual_keys | Retrieve all virtual keys in your Portkey organization, including their usage limits, rate limits, and status |
| create_virtual_key | Create a new virtual key for a provider (e.g., openai, anthropic). Virtual keys securely store provider API keys. |
| get_virtual_key | Retrieve detailed information about a specific virtual key by its slug |
| update_virtual_key | Update an existing virtual key's name, API key, note, or limits |
| delete_virtual_key | Delete a virtual key by slug. This action cannot be undone. |
| create_api_key | Create a new Portkey API key for authentication. Organisation-level keys provide full access, workspace keys are scoped. |
| list_api_keys | List all API keys in your Portkey organization with optional pagination and workspace filtering |
| get_api_key | Retrieve detailed information about a specific API key by its UUID |
| update_api_key | Update an existing API key's name, description, scopes, or limits |
| delete_api_key | Delete an API key by UUID. This action cannot be undone. |
| list_collections | List all prompt collections in your Portkey organization. Collections group prompts by app (e.g., hourlink, apizone, research-pilot). |
| create_collection | Create a new prompt collection for organizing prompts by app. Use one collection per app (hourlink, apizone, research-pilot). |
| get_collection | Retrieve detailed information about a specific collection |
| update_collection | Update a collection's name or description |
| delete_collection | Delete a collection by ID. This action cannot be undone. Prompts in this collection will become orphaned. |
| create_prompt | Create a new prompt template in Portkey. Prompts are versioned message templates with variable substitution support. |
| list_prompts | List all prompts in your Portkey organization with optional filtering by collection, workspace, or search query |
| get_prompt | Retrieve detailed information about a specific prompt including its template, parameters, and version history |
| update_prompt | Update an existing prompt template. Creates a new version with the changes. |
| delete_prompt | Delete a prompt by its ID. This action cannot be undone and will remove the prompt and all its versions. |
| publish_prompt | Publish a specific version of a prompt, making it the default version that will be used when the prompt is called. This is useful for promoting a tested version to production. |
| list_prompt_versions | List all versions of a specific prompt with their details, including version number, description, template content, and creation date. |
| render_prompt | Render a prompt template by substituting variables, returning the final messages without executing |
| run_prompt_completion | Execute a prompt template with variables and get the model completion response. REQUIRES billing metadata (client_id, app, env). |
| migrate_prompt | Create or update a prompt based on whether it exists. Useful for CI/CD and prompt-as-code workflows. Finds existing prompts by name within the collection. |
| promote_prompt | Promote a prompt from one environment to another (e.g., staging → prod). Copies the current version to the target environment. |
| validate_completion_metadata | Validate billing metadata before running a completion. Checks for required fields (client_id, app, env) and valid values. |
| get_cost_analytics | Retrieve detailed cost analytics data over time, including total costs and averages per request |
| get_request_analytics | Retrieve request analytics as time-series data, showing total, successful, and failed requests over time |
| get_token_analytics | Retrieve token usage analytics as time-series data, showing total, prompt, and completion tokens over time |
| get_latency_analytics | Retrieve latency analytics as time-series data, showing average, p50, p90, and p99 latency percentiles over time |
| get_error_analytics | Retrieve error count analytics as time-series data, showing total error counts over time |
| get_error_rate_analytics | Retrieve error rate analytics as time-series data, showing the percentage of failed requests over time |
| get_cache_hit_latency | Retrieve cache hit latency analytics as time-series data, showing total and average latency for cache hits over time |
| get_cache_hit_rate | Retrieve cache hit rate analytics as time-series data, showing hit rate percentage, total hits, and misses over time |
| get_users_analytics | Retrieve user activity analytics over time, showing active and new user counts |
| list_guardrails | List all guardrails in your Portkey organization with optional filtering by workspace or organization |
| get_guardrail | Retrieve detailed information about a specific guardrail, including its checks and actions configuration |
| create_guardrail | Create a new guardrail with specified checks and actions for content moderation and security |
| update_guardrail | Update an existing guardrail's name, checks, or actions configuration |
| delete_guardrail | Delete a guardrail by its ID or slug. This action cannot be undone. |
| list_usage_limits | Retrieve all usage limits in your Portkey organization. Usage limits control how much of a resource (tokens, requests, cost) can be consumed within a time period. |
| get_usage_limit | Retrieve detailed information about a specific usage limit by its ID |
| create_usage_limit | Create a new usage limit to control resource consumption within a time period |
| update_usage_limit | Update an existing usage limit's configuration |
| delete_usage_limit | Delete a usage limit by ID. This action cannot be undone. |
| list_rate_limits | Retrieve all rate limits in your Portkey organization. Rate limits control how many requests can be made within a time window. |
| get_rate_limit | Retrieve detailed information about a specific rate limit by its ID |
| create_rate_limit | Create a new rate limit to control request frequency within a time window |
| update_rate_limit | Update an existing rate limit's configuration |
| delete_rate_limit | Delete a rate limit by ID. This action cannot be undone. |
| list_audit_logs | Retrieve audit logs for your Portkey organization. Audit logs track all administrative actions including user management, configuration changes, and access events. Supports filtering by time range, actor, action type, and resource. |
| create_prompt_label | Create a new prompt label to categorize and organize prompts. Labels can be color-coded and scoped to workspaces or organizations. |
| list_prompt_labels | List all prompt labels in your Portkey organization with optional filtering by workspace, organisation, or search query |
| get_prompt_label | Retrieve detailed information about a specific prompt label |
| update_prompt_label | Update an existing prompt label's name, description, or color |
| delete_prompt_label | Delete a prompt label by ID. This action cannot be undone. |
| create_prompt_partial | Create a new prompt partial (reusable text snippet) that can be included in prompts using mustache syntax like {{> partial_name}} |
| list_prompt_partials | List all prompt partials in your Portkey organization with optional filtering by collection |
| get_prompt_partial | Retrieve detailed information about a specific prompt partial including its content and version info |
| update_prompt_partial | Update an existing prompt partial. Creates a new version with the changes. |
| delete_prompt_partial | Delete a prompt partial by ID. This action cannot be undone. |
| list_partial_versions | List all versions of a prompt partial to view its change history |
| publish_partial | Publish a specific version of a prompt partial, making it the default version |
| create_feedback | Create feedback for a specific trace/request. Use this to capture user feedback (thumbs up/down, ratings) on AI generations. Feedback is linked via trace_id and can include custom metadata for analysis. |
| update_feedback | Update existing feedback by ID. Allows modifying the feedback value, weight, or metadata after initial creation. |
| list_traces | List all traces in your Portkey workspace with optional filtering. Returns trace metadata including requests, responses, costs, and token usage. |
| get_trace | Retrieve detailed information about a specific trace by ID. Returns full request/response data, all spans, metadata, cost, token usage, and any associated feedback. |
| insert_log | Insert a log entry (or multiple entries) into Portkey for tracking AI requests and responses |
| create_log_export | Create a new log export job to export logs matching specified filters |
| list_log_exports | List all log export jobs for a workspace |
| get_log_export | Get details of a specific log export by its ID |
| start_log_export | Start a log export job that was previously created |
| cancel_log_export | Cancel a running log export job |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |