Skip to main content
Promptfoo is an open source library for evaluating LLM output quality. With Portkey, you can:
  • Manage prompts with versioning and call them in Promptfoo
  • Run evals on 1600+ LLMs including private/local models
  • Track costs and metrics for all eval runs
  • Avoid rate limits with load balancing and caching

1. Reference Portkey Prompts

Use prompts stored in Portkey directly in Promptfoo:
  1. Set PORTKEY_API_KEY environment variable
  2. Use portkey:// prefix with your prompt ID:
Variables from test cases are automatically plugged into the Portkey prompt.
Promptfoo doesnโ€™t follow temperature, model, and other parameters set in Portkey. Set them in the providers configuration.

2. Route to Any Provider

Set PORTKEY_API_KEY and configure providers with the portkey: prefix:

Cloud Providers (Azure, Bedrock, Vertex)

3. Track Costs & Metrics

Add metadata to segment requests and track costs per team/project:
Filter and group by these keys in Portkey dashboards.

4. Avoid Rate Limits with Caching

Create a config with load balancing and caching for high-volume evals:
Reference the config in your YAML:

Roadmap

๐Ÿšง Coming soon: View Promptfoo eval results in Portkeyโ€™s feedback section.

Next Steps

Model Catalog

Set up providers

Prompt Management

Version and manage prompts
Last modified on March 13, 2026