@@ -183,7 +183,7 @@ agent = Agent(model)
183
183
### DeepSeek
184
184
185
185
To use the [ DeepSeek] ( https://deepseek.com ) provider, first create an API key by following the [ Quick Start guide] ( https://api-docs.deepseek.com/ ) .
186
- Once you have the API key, you can use it with the ` DeepSeekProvider ` :
186
+ Once you have the API key, you can use it with the [ ` DeepSeekProvider ` ] [ pydantic_ai.providers.deepseek.DeepSeekProvider ] :
187
187
188
188
``` python
189
189
from pydantic_ai import Agent
@@ -295,7 +295,8 @@ print(result.usage())
295
295
296
296
### Azure AI Foundry
297
297
298
- If you want to use [ Azure AI Foundry] ( https://ai.azure.com/ ) as your provider, you can do so by using the ` AzureProvider ` class.
298
+ If you want to use [ Azure AI Foundry] ( https://ai.azure.com/ ) as your provider, you can do so by using the
299
+ [ ` AzureProvider ` ] [ pydantic_ai.providers.azure.AzureProvider ] class.
299
300
300
301
``` python
301
302
from pydantic_ai import Agent
@@ -318,7 +319,7 @@ agent = Agent(model)
318
319
319
320
To use [ OpenRouter] ( https://openrouter.ai ) , first create an API key at [ openrouter.ai/keys] ( https://openrouter.ai/keys ) .
320
321
321
- Once you have the API key, you can use it with the ` OpenRouterProvider ` :
322
+ Once you have the API key, you can use it with the [ ` OpenRouterProvider ` ] [ pydantic_ai.providers.openrouter.OpenRouterProvider ] :
322
323
323
324
``` python
324
325
from pydantic_ai import Agent
@@ -336,7 +337,7 @@ agent = Agent(model)
336
337
### Grok (xAI)
337
338
338
339
Go to [ xAI API Console] ( https://console.x.ai/ ) and create an API key.
339
- Once you have the API key, you can use it with the ` GrokProvider ` :
340
+ Once you have the API key, you can use it with the [ ` GrokProvider ` ] [ pydantic_ai.providers.grok.GrokProvider ] :
340
341
341
342
``` python
342
343
from pydantic_ai import Agent
@@ -375,7 +376,7 @@ agent = Agent(model)
375
376
### Fireworks AI
376
377
377
378
Go to [ Fireworks.AI] ( https://fireworks.ai/ ) and create an API key in your account settings.
378
- Once you have the API key, you can use it with the ` FireworksProvider ` :
379
+ Once you have the API key, you can use it with the [ ` FireworksProvider ` ] [ pydantic_ai.providers.fireworks.FireworksProvider ] :
379
380
380
381
``` python
381
382
from pydantic_ai import Agent
@@ -393,7 +394,7 @@ agent = Agent(model)
393
394
### Together AI
394
395
395
396
Go to [ Together.ai] ( https://www.together.ai/ ) and create an API key in your account settings.
396
- Once you have the API key, you can use it with the ` TogetherProvider ` :
397
+ Once you have the API key, you can use it with the [ ` TogetherProvider ` ] [ pydantic_ai.providers.together.TogetherProvider ] :
397
398
398
399
``` python
399
400
from pydantic_ai import Agent
@@ -407,3 +408,27 @@ model = OpenAIModel(
407
408
agent = Agent(model)
408
409
...
409
410
```
411
+
412
+ ### Heroku AI
413
+
414
+ To use [ Heroku AI] ( https://www.heroku.com/ai ) , you can use the [ ` HerokuProvider ` ] [ pydantic_ai.providers.heroku.HerokuProvider ] :
415
+
416
+ ``` python
417
+ from pydantic_ai import Agent
418
+ from pydantic_ai.models.openai import OpenAIModel
419
+ from pydantic_ai.providers.heroku import HerokuProvider
420
+
421
+ model = OpenAIModel(
422
+ ' claude-3-7-sonnet' ,
423
+ provider = HerokuProvider(api_key = ' your-heroku-inference-key' ),
424
+ )
425
+ agent = Agent(model)
426
+ ...
427
+ ```
428
+
429
+ You can set the ` HEROKU_INFERENCE_KEY ` and ` HEROKU_INFERENCE_URL ` environment variables to set the API key and base URL, respectively:
430
+
431
+ ``` bash
432
+ export HEROKU_INFERENCE_KEY=' your-heroku-inference-key'
433
+ export HEROKU_INFERENCE_URL=' https://us.inference.heroku.com'
434
+ ```
0 commit comments