Thank you for your interest in contributing to the Portkey Models repository! This community-maintained database helps developers track AI model pricing and configurations across 35+ providers.
- Getting Started
- Types of Contributions
- Adding or Updating Pricing
- Adding Model Configurations
- Submitting Your Changes
- Code of Conduct
- Fork this repository
- Clone your fork locally
- Make your changes
- Test your changes (validate JSON)
- Submit a pull request
| Contribution | Directory | Description |
|---|---|---|
| Model Pricing | pricing/ |
Token costs, image pricing, additional units |
| Model Configs | general/ |
Parameters, capabilities, supported features |
Pricing files are located in pricing/{provider}.json.
⚠️ Prices are in cents per token, not dollars.
| Provider Pricing | JSON Value | Calculation |
|---|---|---|
| $0.03 / 1K tokens | 0.003 |
$0.03 ÷ 1000 = 0.00003 dollars = 0.003 cents |
| $2.50 / 1M tokens | 0.00025 |
$2.50 ÷ 1,000,000 = 0.0000025 dollars = 0.00025 cents |
| $10 / 1M tokens | 0.001 |
$10 ÷ 1,000,000 = 0.00001 dollars = 0.001 cents |
Quick formula: price_in_cents = (dollars_per_million / 1,000,000) * 100
{
"model-name": {
"pricing_config": {
"pay_as_you_go": {
"request_token": { "price": 0.001 },
"response_token": { "price": 0.002 },
"cache_write_input_token": { "price": 0 },
"cache_read_input_token": { "price": 0.0005 }
},
"currency": "USD"
}
}
}| Field | Description |
|---|---|
request_token |
Input token cost |
response_token |
Output token cost |
cache_write_input_token |
Cache write cost |
cache_read_input_token |
Cache read cost |
request_audio_token |
Audio input cost |
response_audio_token |
Audio output cost |
additional_units |
Provider-specific (web_search, thinking_token, etc.) |
image |
Image generation pricing by quality/size |
- Create
pricing/{provider-name}.json - Use lowercase with hyphens (e.g.,
together-ai.json) - Include a
defaultentry with zero prices - Add model-specific pricing
{
"default": {
"pricing_config": {
"pay_as_you_go": {
"request_token": { "price": 0 },
"response_token": { "price": 0 }
},
"currency": "USD"
}
},
"model-name": {
"pricing_config": {
"pay_as_you_go": {
"request_token": { "price": 0.001 },
"response_token": { "price": 0.002 }
}
}
}
}Configuration files are located in general/{provider}.json.
{
"model-name": {
"params": [
{
"key": "max_tokens",
"maxValue": 16384
},
{
"key": "temperature",
"defaultValue": 1,
"minValue": 0,
"maxValue": 2
}
],
"type": {
"primary": "chat",
"supported": ["tools", "image"]
}
}
}| Primary Type | Description |
|---|---|
chat |
Chat completion models |
text |
Text completion models |
embedding |
Embedding models |
image |
Image generation models |
audio |
Audio models |
| Supported Features | Description |
|---|---|
tools |
Function calling support |
image |
Vision/image input support |
cache_control |
Prompt caching support |
-
Validate JSON syntax
# Validate all pricing files for file in pricing/*.json; do jq empty "$file" && echo "✅ $file"; done # Validate all general files for file in general/*.json; do jq empty "$file" && echo "✅ $file"; done
-
Check your pricing math — Remember: cents per token, not dollars!
-
Find the source — You'll need to provide a link to official pricing
-
Title format:
[provider] Brief description- Example:
[openai] Add GPT-5 pricing - Example:
[anthropic] Update Claude 4 cache pricing
- Example:
-
Include source link — Link to the provider's official pricing page
-
One provider per PR — Makes review easier
-
Sign the CLA — First-time contributors must sign our Contributor License Agreement
- Automated checks validate your JSON
- A maintainer reviews your PR
- Once merged, changes sync to Portkey's systems
Please read our Code of Conduct before contributing. We're committed to providing a welcoming and inclusive environment.
- 💬 Discord — Ask in #open-source
- 🐛 Issues — Report bugs or request features
- 📖 Documentation — Learn more about Portkey
Thank you for helping keep AI model pricing accurate and up-to-date! 🙏