Skip to main content

Portkey Integration

Portkey is an AI Gateway that provides observability, caching, and routing for LLM API calls. Configure Portkey to send webhook events to Igris for unified audit logging.

Setup

1. Get Your Igris API Key

Go to Settings → API Keys in the Igris dashboard and create a new key. Label it “Portkey Ingestion” for clarity.

2. Configure Portkey Webhook

In your Portkey dashboard, navigate to Settings → Webhooks and add a new webhook:
  • URL: https://your-igris.fly.dev/api/v1/ingest/portkey
  • Headers:
    Authorization: Bearer ig_your_api_key_here
    Content-Type: application/json
    
  • Events: Select all event types you want to ingest (completions, embeddings, etc.)

3. Verify

Trigger an LLM call through Portkey and check the Igris Observe → Audit Events page. You should see the event with source: portkey.

Payload Normalization

Igris maps Portkey’s webhook payload to the unified event format:
Portkey FieldIgris Field
request.modeltoolName
response.statusaction (200 → allow, 4xx/5xx → deny)
metadata.trace_idmetadata.traceId
request.prompt_tokensmetadata.promptTokens
response.completion_tokensmetadata.completionTokens
timestamptimestamp
latencymetadata.latencyMs

Example Event

After ingestion, the event appears in the audit trail as:
{
  "id": "evt_abc123",
  "orgId": "org_xyz",
  "source": "portkey",
  "type": "completion",
  "toolName": "gpt-4o",
  "action": "allow",
  "metadata": {
    "traceId": "tr_456",
    "promptTokens": 150,
    "completionTokens": 320,
    "latencyMs": 1200
  },
  "timestamp": "2026-03-19T10:00:00.000Z"
}

Troubleshooting

IssueSolution
Events not appearingVerify the webhook URL and API key in Portkey settings
401 UnauthorizedCheck the API key is valid and has ingestion permissions
429 Too Many RequestsYou’ve exceeded your plan’s monthly event limit
Duplicate eventsIgris deduplicates by provider trace ID — duplicates are ignored