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

1. Reference AI Gateway Prompts

Use prompts stored in the AI Gateway 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 AI Gateway prompt.
Promptfoo doesn’t follow temperature, model, and other parameters set in the AI Gateway. 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 Strata Cloud Manager.

4. Avoid Rate Limits with Caching

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

Next Steps

Model Catalog

Set up providers
Last modified on September 15, 2026