---
title: "Create an AI provider"
method: POST
path: "/api/v2/ai/providers"
tags: ["AI Providers"]
---

# Create an AI provider

`POST /api/v2/ai/providers`

## Request body

- CodersdkCreateAIProviderRequest
  - `api_keys` string[]
  - `base_url` string
  - `display_name` string
  - `enabled` boolean
  - `icon` string
  - `name` string
  - `settings` CodersdkAIProviderSettings
  - `type` 'openai' | 'anthropic' | 'azure' | 'google' | 'openai-compat' | 'openrouter' | 'vercel' | 'bedrock' | 'copilot'

## Response `201`

Created

- CodersdkAIProvider
  - `api_keys` CodersdkAIProviderKey[]
    - `created_at` string, date-time
    - `id` string, uuid
    - `masked` string
  - `base_url` string
  - `created_at` string, date-time
  - `display_name` string
  - `enabled` boolean
  - `icon` string
  - `id` string, uuid
  - `name` string
  - `settings` CodersdkAIProviderSettings
  - `type` 'openai' | 'anthropic' | 'azure' | 'google' | 'openai-compat' | 'openrouter' | 'vercel' | 'bedrock' | 'copilot'
  - `updated_at` string, date-time

---

[API](https://skmtc.net/coder/apis/coder-api.md) · [All operations](https://skmtc.net/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coder/coder-api/revisions/50a77af44008/schema)
