Skip to content

Commit 0e45d0d

Browse files
authored
docs: Fix Gateway doc ToC (#3415)
1 parent a00a04a commit 0e45d0d

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

docs/gateway.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,34 +41,35 @@ print(result.output)
4141
The first known use of "hello, world" was in a 1974 textbook about the C programming language.
4242
"""
4343
```
44-
# Quick Start
44+
45+
## Quick Start
4546

4647
This section contains instructions on how to set up your account and run your app with Pydantic AI Gateway credentials.
4748

48-
## Create an account
49+
### Create an account
4950

5051
Using your GitHub or Google account, sign in at [gateway.pydantic.dev](https://gateway.pydantic.dev).
5152
Choose a name for your organization (or accept the default). You will automatically be assigned the Admin role.
5253

5354
A default project will be created for you. You can choose to use it, or create a new one on the [Projects](https://gateway.pydantic.dev/admin/projects) page.
5455

55-
## Add **Providers**
56+
### Add **Providers**
5657
There are two ways to use Providers in the Pydantic AI Gateway: you can bring your own key (BYOK) or buy inference through the platform.
5758

58-
### Bringing your own API key (BYOK)
59+
#### Bringing your own API key (BYOK)
5960

6061
On the [Providers](https://gateway.pydantic.dev/admin/providers) page, fill in the form to add a provider. Paste your API key into the form under Credentials, and make sure to **select the Project that will be associated to this provider**. It is possible to add multiple keys from the same provider.
6162

62-
### Use Built-in Providers
63+
#### Use Built-in Providers
6364
Go to the Billing page, add a payment method, and purchase $15 in credits to activate built-in providers. This gives you single-key access to all available models from OpenAI, Anthropic, Google Vertex, AWS Bedrock, and Groq.
6465

65-
## Grant access to your team
66+
### Grant access to your team
6667
On the [Users](https://gateway.pydantic.dev/admin/users) page, create an invitation and share the URL with your team to allow them to access the project.
6768

68-
## Create Gateway project keys
69+
### Create Gateway project keys
6970
On the Keys page, Admins can create project keys which are not affected by spending limits. Users can only create personal keys, that will inherit spending caps from both User and Project levels, whichever is more restrictive.
7071

71-
# Usage
72+
## Usage
7273
After setting up your account with the instructions above, you will be able to make an AI model request with the Pydantic AI Gateway.
7374
The code snippets below show how you can use PAIG with different frameworks and SDKs.
7475
You can add `gateway/` as prefix on every known provider that
@@ -85,7 +86,7 @@ Examples of providers and models that can be used are:
8586
| Groq | `groq` | `gateway/groq:openai/gpt-oss-120b` |
8687
| AWS Bedrock | `bedrock` | `gateway/bedrock:amazon.nova-micro-v1:0` |
8788

88-
## Pydantic AI
89+
### Pydantic AI
8990
Before you start, make sure you are on version 1.16 or later of `pydantic-ai`. To update to the latest version run:
9091

9192
=== "uv"
@@ -121,7 +122,7 @@ The first known use of "hello, world" was in a 1974 textbook about the C program
121122
```
122123

123124

124-
## Claude Code
125+
### Claude Code
125126
Before you start, log out of Claude Code using `/logout`.
126127

127128
Set your gateway credentials as environment variables:
@@ -135,9 +136,9 @@ Replace `YOUR_PAIG_TOKEN` with the API key from the Keys page.
135136

136137
Launch Claude Code by typing `claude`. All requests will now route through the Pydantic AI Gateway.
137138

138-
## SDKs
139+
### SDKs
139140

140-
### OpenAI SDK
141+
#### OpenAI SDK
141142

142143
```python {title="openai_sdk.py" test="skip"}
143144
import openai
@@ -155,7 +156,7 @@ print(response.choices[0].message.content)
155156
#> Hello user
156157
```
157158

158-
### Anthropic SDK
159+
#### Anthropic SDK
159160

160161
```python {title="anthropic_sdk.py" test="skip"}
161162
import anthropic

0 commit comments

Comments
 (0)