---
title: "Create an AI provider"
method: POST
path: "/v1/projects/{project_id}/ai-providers"
tags: ["AI Providers"]
---

# Create an AI provider

`POST /v1/projects/{project_id}/ai-providers`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/projects/{project_id}/ai-providers`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Creates a new LLM provider configuration.

A `bedrock` or `vertex` record must carry a credential of its own — a
linked `secret_id`, or an `apiKey` in `config`. Without one the provider
SDK signs with the server's own credentials (the AWS default credential
chain, Google Application Default Credentials), which is refused with
`400 VALIDATION_FAILED` unless the deployment allows it.

## Request body

- object
  - `name` string, required: Provider configuration name
  - `provider` 'openai' | 'anthropic' | 'google' | 'xai' | 'groq' | 'ollama' | 'azure' | 'bedrock' | 'vertex' | 'gateway' | 'custom' | 'naturali', required: LLM provider
  - `default_model` string, required: Default model to use
  - `secret_id` string: Secret ID containing API credentials. Required for `bedrock` and `vertex` unless `config.apiKey` carries one.
  - `base_url` string: Custom base URL for the provider
  - `config` object: Additional provider-specific configuration

## Response `201`

AI provider created successfully

- object
  - `id` string
  - `name` string
  - `provider` string
  - `default_model` string
  - `project_id` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Bad request (invalid provider or missing fields)
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal server error

---

[API](https://skmtc.dev/naturali/apis/naturali-ai-api.md) · [All operations](https://skmtc.dev/naturali/apis/naturali-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/naturali/apis/naturali-ai-api/revisions/e4905b78f422?raw)
