Portkey

{/* Generated by scripts/generate-integration-catalog.mjs. Do not edit by hand. */}

At a glance

  • Availability: Experimental (how to enable).
  • Authentication: API key.
  • Connection: The key from PORTKEY_API_KEY is sent as the x-portkey-api-key header.
  • Provider documentation: Authentication reference.

Credentials

Set these per environment. See Connect an integration.

VariableRequiredDescription
PORTKEY_API_KEYYesPortkey API key - analytics endpoints require an Admin API key (organization-wide) rather than a workspace key Docs.

Setup

  1. Create a Portkey account: Go to https://app.portkey.ai and sign up - the free developer plan is enough to test the gateway and analytics.
  2. Create an Admin API key: In the Portkey dashboard, open API Keys (https://app.portkey.ai/api-keys) and create an Admin API key. Admin keys grant organization-wide access; workspace keys cannot call the analytics endpoints. You need the Organization Owner or Admin role.
  3. Store the key: Add it to your .env file as PORTKEY_API_KEY=...
  4. Find your workspace slug: The workspace slug is visible in the Portkey dashboard URL and workspace settings; analytics tools require it as the workspace_slug parameter.
  5. Verify access: Run Get Cost Analytics with a recent date range. A 401 means the key is invalid; a 403 usually means you used a workspace key instead of an Admin key.

Provider notes

  • Analytics only covers traffic routed through the Portkey gateway - direct provider calls won't appear
  • Time range parameters (time_of_generation_min/max) are required on all analytics endpoints and must be ISO8601 timestamps
  • The virtual keys API is deprecated in favor of the newer Providers API, but existing virtual keys still work and remain listable

Provider API reference.

Tools

ToolAccessDescription
Get Cost Analytics<br /><code className="reference-identifier">portkey__get_cost_analytics</code>ReadGet cost analytics
Get Request Analytics<br /><code className="reference-identifier">portkey__get_request_analytics</code>ReadGet request analytics
Get Token Analytics<br /><code className="reference-identifier">portkey__get_token_analytics</code>ReadGet token analytics
Get User Analytics Summary<br /><code className="reference-identifier">portkey__get_user_analytics_summary</code>ReadGet user analytics summary
Get Model Analytics Summary<br /><code className="reference-identifier">portkey__get_model_analytics_summary</code>ReadGet model analytics summary
List Workspaces<br /><code className="reference-identifier">portkey__list_workspaces</code>ReadList workspaces
List Virtual Keys<br /><code className="reference-identifier">portkey__list_virtual_keys</code>ReadList virtual keys
List Log Exports<br /><code className="reference-identifier">portkey__list_log_exports</code>ReadList log exports

Verify the connection

Call a read tool such as portkey__get_cost_analytics with arguments for your account. Confirm that the result comes from the intended account or workspace before enabling write tools.