---
title: "Create an AI integration"
method: POST
path: "/v2/ai-integrations"
tags: ["AI Integrations"]
---

# Create an AI integration

`POST /v2/ai-integrations`

Create a new AI integration for an external LLM provider.

**Payload Requirements**
- `name` and `provider` are required.
- The integration name must be unique within the account.
- `provider` must be one of: `OPEN_AI`, `AZURE_OPEN_AI`, `AWS_BEDROCK`, `VERTEX_AI`, `ANTHROPIC`, `NVIDIA_NIM`, `GEMINI`, `CUSTOM`.
- If `scopings` is omitted, the integration defaults to account-wide visibility.
- `enable_default_models` defaults to `false` if not provided.
- `function_calling_enabled` defaults to `true` if not provided.
- `auth_type` defaults to `DEFAULT` if not provided.
- For `AWS_BEDROCK` provider, `provider_metadata` must include `role_arn`.
- For `VERTEX_AI` provider, `provider_metadata` must include `project_id`, `location`, and `project_access_label`.

**Valid example**
```json
{
  "name": "Production OpenAI",
  "provider": "OPEN_AI",
  "api_key": "sk-abc123...",
  "model_names": ["gpt-4", "gpt-4o"],
  "enable_default_models": true
}
```

**Invalid example** (missing required `provider`)
```json
{
  "name": "My Integration"
}
```

<Warning>This endpoint is in alpha, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Warning>

## Request body

- CreateAiIntegrationRequest
  - `name` string, required — Integration name
  - `provider` 'OPEN_AI' | 'AZURE_OPEN_AI' | 'AWS_BEDROCK' | 'VERTEX_AI' | 'ANTHROPIC' | 'CUSTOM' | 'NVIDIA_NIM' | 'GEMINI', required — The AI provider for this integration
  - `api_key` string — API key for the provider (write-only, never returned)
  - `base_url` string — Custom base URL for the provider
  - `model_names` string[] — Supported model names
  - `headers` object — Custom headers to include in requests. The serialized header map must not exceed 8,175 bytes.
  - `enable_default_models` boolean — Enable provider's default model list (default false)
  - `function_calling_enabled` boolean — Enable function/tool calling (default true)
  - `auth_type` 'DEFAULT' | 'PROXY_WITH_HEADERS' | 'BEARER_TOKEN' — The authentication method for this integration
  - `provider_metadata` union — Strict request form of ProviderMetadata. For AWS_BEDROCK, must include role_arn. For VERTEX_AI, must include project_id, location, and project_access_label.
    - object — AWS Bedrock provider metadata in a write request (strict form of AwsProviderMetadata).
      - `kind` 'AWS', required — Discriminator value identifying AWS Bedrock provider metadata.
      - `role_arn` string, required — AWS IAM role ARN for cross-account access
      - `external_id` string, nullable — External ID for the assume-role policy
    - object — Vertex AI (GCP) provider metadata in a write request (strict form of GcpProviderMetadata).
      - `kind` 'GCP', required — Discriminator value identifying Vertex AI (GCP) provider metadata.
      - `project_id` string, required — GCP project ID
      - `location` string, required — GCP region (e.g. us-central1)
      - `project_access_label` string, required — Display label for the project
  - `scopings` AiIntegrationScopingRequest[] — Visibility scoping rules. Defaults to account-wide.
    - `organization_id` string, nullable — Organization identifier (base64). Null means account-wide.
    - `space_id` string, nullable — Space identifier (base64). Null means organization-wide (or account-wide if organization_id is also null).

## Response `201`

An AI integration object

- AiIntegration — An AI integration configures access to an external LLM provider (e.g. OpenAI, Azure OpenAI, AWS Bedrock, Vertex AI). Integrations can be scoped to the entire account, a specific organization, or a specific space.
  - `id` string, required — The integration ID
  - `name` string, required — The integration name
  - `provider` 'OPEN_AI' | 'AZURE_OPEN_AI' | 'AWS_BEDROCK' | 'VERTEX_AI' | 'ANTHROPIC' | 'CUSTOM' | 'NVIDIA_NIM' | 'GEMINI', required — The AI provider for this integration
  - `has_api_key` boolean, required — Whether an API key is configured (the key itself is never returned)
  - `base_url` string, nullable — Custom base URL for the provider
  - `model_names` string[], nullable — Supported model names
  - `headers` object, nullable — Custom headers included in requests
  - `enable_default_models` boolean, required — Whether the provider's default model list is enabled
  - `function_calling_enabled` boolean, required — Whether function/tool calling is enabled
  - `auth_type` 'DEFAULT' | 'PROXY_WITH_HEADERS' | 'BEARER_TOKEN', required — The authentication method for this integration
  - `provider_metadata` union — Provider-specific configuration. For AWS_BEDROCK, must include role_arn. For VERTEX_AI, must include project_id, location, and project_access_label.
    - object — AWS Bedrock provider metadata
      - `kind` 'AWS', required — Discriminator value identifying AWS Bedrock provider metadata.
      - `role_arn` string, required — AWS IAM role ARN for cross-account access
      - `external_id` string, nullable — External ID for the assume-role policy
    - object — Vertex AI (GCP) provider metadata
      - `kind` 'GCP', required — Discriminator value identifying Vertex AI (GCP) provider metadata.
      - `project_id` string, required — GCP project ID
      - `location` string, required — GCP region (e.g. us-central1)
      - `project_access_label` string, required — Display label for the project
  - `scopings` AiIntegrationScoping[], required — Visibility scoping rules
    - `organization_id` string, nullable — Organization identifier (base64). Null means account-wide.
    - `space_id` string, nullable — Space identifier (base64). Null means organization-wide (or account-wide if organization_id is also null).
  - `created_at` string, date-time, required — When the integration was created
  - `updated_at` string, date-time, required — When the integration was last updated
  - `created_by_user_id` string, required — The user ID of the user who created the integration

## Other responses

- `400` — Invalid request
- `401` — Authentication is required
- `403` — Insufficient permissions to access this resource
- `404` — Not found
- `409` — Resource conflict
- `422` — Unprocessable entity
- `429` — Rate limit exceeded

---

[API](https://skmtc.net/arize-ai/apis/arize-rest-api.md) · [All operations](https://skmtc.net/arize-ai/apis/arize-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arize-ai/arize-rest-api/versions/2ce448f1de13/schema)
