---
title: "Create Gateway Provider"
method: POST
path: "/v1/gateway/providers/"
tags: ["Gateway"]
---

# Create Gateway Provider

`POST /v1/gateway/providers/`

## Request

- Base URL: `https://logfire-api.pydantic.dev/api`
- URL: `https://logfire-api.pydantic.dev/api/v1/gateway/providers/`
- Auth: OAuth 2
  - Authorization code: `api/oauth/authorize`
  - Token URL: `/api/oauth/token` scopes: `organization:write_gateway`
- TypeScript: <https://skmtc.dev/pydantic/apis/pydantic-logfire-api/docs/v1/gateway/providers/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a supported organization-owned Gateway provider.

## Request body

- GatewayProviderCreate
  - `slug` string, required
  - `provider` union, required
    - FixedApiKeyProvider
      - `vendor` 'openai' | 'anthropic' | 'doubleword' | 'google-gla' | 'groq' | 'huggingface' | 'mistral', required
      - `config` FixedApiKeyProviderConfig, required
        - `credentials` ApiKeyCredentials, required
          - `type` 'api-key', required
          - `value` string, password, required
    - BedrockProvider
      - `vendor` 'bedrock', required
      - `config` BedrockProviderConfig, required
        - `api` 'runtime' | 'mantle', required
        - `region` string, required
        - `credentials` ApiKeyCredentials, required
          - `type` 'api-key', required
          - `value` string, password, required
    - AzureProvider
      - `vendor` 'azure', required
      - `config` AzureProviderConfig, required
        - `endpoint` string, required
        - `credentials` AzureApiKeyCredentials, required
          - `type` 'api-key', required
          - `value` string, password, required
    - GoogleVertexProvider
      - `vendor` 'google-vertex', required
      - `config` GoogleVertexProviderConfig, required
        - `endpoint` string, required
        - `credentials` GoogleServiceAccountJsonCredentials, required
          - `type` 'service-account-json', required
          - `value` string, password, required
  - `pricing` GatewayProviderPricingInput
    - `required` boolean, required

## Response `201`

Successful Response

- GatewayProviderRead
  - `id` string, uuid, required
  - `slug` string, required
  - `provider` union, required
    - FixedApiKeyProviderRead
      - `vendor` 'openai' | 'anthropic' | 'doubleword' | 'google-gla' | 'groq' | 'huggingface' | 'mistral', required
    - BedrockProviderRead
      - `vendor` 'bedrock', required
      - `config` BedrockProviderReadConfig, required
        - `api` 'runtime' | 'mantle', required
        - `region` string, required
    - AzureProviderRead
      - `vendor` 'azure', required
      - `config` AzureProviderReadConfig, required
        - `endpoint` string, required
    - GoogleVertexProviderRead
      - `vendor` 'google-vertex', required
      - `config` GoogleVertexProviderReadConfig, required
        - `endpoint` string, required
  - `pricing` GatewayProviderPricingOutput, required
    - `required` boolean, required
  - `created_at` string, date-time, required

## Other responses

- `403`: The organization plan does not include Gateway provider management, or the organization has reached its BYOK Provider Limit
- `409`: A provider with the same slug already exists
- `422`: The request is not valid, or the endpoint is not allowed for this organization
- `429`: Rate limit exceeded
- `503`: Provider stored, but Gateway did not confirm the refresh

---

[API](https://skmtc.dev/pydantic/apis/pydantic-logfire-api.md) - [All operations](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/revisions/7996e45256f4?raw)
