arize-ai-provider-integration

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Arize AI Integration Skill

Arize AI集成Skill

Concepts

概念

  • AI Integration = stored LLM provider credentials registered in Arize; used by evaluators to call a judge model and by other Arize features that need to invoke an LLM on your behalf
  • Provider = the LLM service backing the integration (e.g.,
    openAI
    ,
    anthropic
    ,
    awsBedrock
    )
  • Integration ID = a base64-encoded global identifier for an integration (e.g.,
    TGxtSW50ZWdyYXRpb246MTI6YUJjRA==
    ); required for evaluator creation and other downstream operations
  • Scoping = visibility rules controlling which spaces or users can use an integration
  • Auth type = how Arize authenticates with the provider:
    default
    (provider API key),
    proxy_with_headers
    (proxy via custom headers), or
    bearer_token
    (bearer token auth)
  • AI集成 = 在Arize中注册的存储LLM提供商凭据;供评估器调用裁判模型,以及其他需要代表你调用LLM的Arize功能使用
  • 提供商 = 为集成提供支持的LLM服务(例如:
    openAI
    anthropic
    awsBedrock
  • 集成ID = 集成的base64编码全局标识符(例如:
    TGxtSW50ZWdyYXRpb246MTI6YUJjRA==
    );创建评估器和其他下游操作时必需
  • 范围设置 = 控制哪些空间或用户可以使用集成的可见性规则
  • 认证类型 = Arize与提供商的认证方式:
    default
    (提供商API密钥)、
    proxy_with_headers
    (通过自定义头代理)或
    bearer_token
    (Bearer令牌认证)

Prerequisites

前提条件

Three things are needed:
ax
CLI, an API key (env var or profile), and a space ID.
需要准备三样东西:
ax
CLI、API密钥(环境变量或配置文件)、空间ID。

Install ax

安装ax

If
ax
is not installed, not on PATH, or below version
0.8.0
, see ax-setup.md.
如果未安装
ax
ax
不在PATH中或版本低于
0.8.0
,请查看ax-setup.md。

Verify environment

验证环境

Run a quick check for credentials:
macOS/Linux (bash):
bash
ax --version && echo "--- env ---" && if [ -n "$ARIZE_API_KEY" ]; then echo "ARIZE_API_KEY: (set)"; else echo "ARIZE_API_KEY: (not set)"; fi && echo "ARIZE_SPACE_ID: ${ARIZE_SPACE_ID:-(not set)}" && echo "--- profiles ---" && ax profiles show 2>&1
Windows (PowerShell):
powershell
ax --version; Write-Host "--- env ---"; Write-Host "ARIZE_API_KEY: $(if ($env:ARIZE_API_KEY) { '(set)' } else { '(not set)' })"; Write-Host "ARIZE_SPACE_ID: $env:ARIZE_SPACE_ID"; Write-Host "--- profiles ---"; ax profiles show 2>&1
Read the output and proceed immediately if either the env var or the profile has an API key. Only ask the user if both are missing. Resolve failures:
  • No API key in env and no profile → AskQuestion: "Arize API key (https://app.arize.com/admin > API Keys)"
  • Space ID unknown → run
    ax spaces list -o json
    to list all accessible spaces and pick the right one, or AskQuestion if the user prefers to provide it directly

运行快速检查以确认凭据情况:
macOS/Linux (bash):
bash
ax --version && echo "--- env ---" && if [ -n "$ARIZE_API_KEY" ]; then echo "ARIZE_API_KEY: (set)"; else echo "ARIZE_API_KEY: (not set)"; fi && echo "ARIZE_SPACE_ID: ${ARIZE_SPACE_ID:-(not set)}" && echo "--- profiles ---" && ax profiles show 2>&1
Windows (PowerShell):
powershell
ax --version; Write-Host "--- env ---"; Write-Host "ARIZE_API_KEY: $(if ($env:ARIZE_API_KEY) { '(set)' } else { '(not set)' })"; Write-Host "ARIZE_SPACE_ID: $env:ARIZE_SPACE_ID"; Write-Host "--- profiles ---"; ax profiles show 2>&1
立即读取输出并继续,如果环境变量或配置文件中存在API密钥即可。仅当两者都缺失时才询问用户。解决失败情况:
  • 环境变量中无API密钥且无配置文件 → 提问:"请提供Arize API密钥(获取地址:https://app.arize.com/admin > API Keys)"
  • 未知空间ID → 运行
    ax spaces list -o json
    列出所有可访问的空间并选择正确的,或者如果用户希望直接提供则发起提问

List AI Integrations

列出AI集成

List all integrations accessible in a space:
bash
ax ai-integrations list --space-id SPACE_ID
Filter by name (case-insensitive substring match):
bash
ax ai-integrations list --space-id SPACE_ID --name "openai"
Paginate large result sets:
bash
undefined
列出某个空间中所有可访问的集成:
bash
ax ai-integrations list --space-id SPACE_ID
按名称过滤(不区分大小写的子字符串匹配):
bash
ax ai-integrations list --space-id SPACE_ID --name "openai"
对大型结果集进行分页:
bash
undefined

Get first page

获取第一页

ax ai-integrations list --space-id SPACE_ID --limit 20 -o json
ax ai-integrations list --space-id SPACE_ID --limit 20 -o json

Get next page using cursor from previous response

使用上一次响应中的游标获取下一页

ax ai-integrations list --space-id SPACE_ID --limit 20 --cursor CURSOR_TOKEN -o json

**Key flags:**

| Flag | Description |
|------|-------------|
| `--space-id` | Space to list integrations in |
| `--name` | Case-insensitive substring filter on integration name |
| `--limit` | Max results (1–100, default 50) |
| `--cursor` | Pagination token from a previous response |
| `-o, --output` | Output format: `table` (default) or `json` |

**Response fields:**

| Field | Description |
|-------|-------------|
| `id` | Base64 integration ID — copy this for downstream commands |
| `name` | Human-readable name |
| `provider` | LLM provider enum (see Supported Providers below) |
| `has_api_key` | `true` if credentials are stored |
| `model_names` | Allowed model list, or `null` if all models are enabled |
| `enable_default_models` | Whether default models for this provider are allowed |
| `function_calling_enabled` | Whether tool/function calling is enabled |
| `auth_type` | Authentication method: `default`, `proxy_with_headers`, or `bearer_token` |

---
ax ai-integrations list --space-id SPACE_ID --limit 20 --cursor CURSOR_TOKEN -o json

**关键参数:**

| 参数 | 描述 |
|------|-------------|
| `--space-id` | 要列出集成的空间ID |
| `--name` | 集成名称的不区分大小写子字符串过滤条件 |
| `--limit` | 最大结果数(1–100,默认50) |
| `--cursor` | 上一次响应返回的分页令牌 |
| `-o, --output` | 输出格式:`table`(默认)或`json` |

**响应字段:**

| 字段 | 描述 |
|-------|-------------|
| `id` | Base64编码的集成ID — 复制此ID用于后续命令 |
| `name` | 人类可读的名称 |
| `provider` | LLM提供商枚举值(见下方支持的提供商) |
| `has_api_key` | `true`表示已存储凭据 |
| `model_names` | 允许使用的模型列表,若为`null`则允许所有模型 |
| `enable_default_models` | 是否允许使用该提供商的默认模型列表 |
| `function_calling_enabled` | 是否启用工具/函数调用 |
| `auth_type` | 认证方式:`default`、`proxy_with_headers`或`bearer_token` |

---

Get a Specific Integration

获取特定集成

bash
ax ai-integrations get INT_ID
ax ai-integrations get INT_ID -o json
Use this to inspect an integration's full configuration or to confirm its ID after creation.

bash
ax ai-integrations get INT_ID
ax ai-integrations get INT_ID -o json
使用此命令查看集成的完整配置,或在创建后确认其ID。

Create an AI Integration

创建AI集成

Before creating, always list integrations first — the user may already have a suitable one:
bash
ax ai-integrations list --space-id SPACE_ID
If no suitable integration exists, create one. The required flags depend on the provider.
创建前,请先列出集成 — 用户可能已有合适的集成:
bash
ax ai-integrations list --space-id SPACE_ID
如果没有合适的集成,则创建一个。所需参数因提供商而异。

OpenAI

OpenAI

bash
ax ai-integrations create \
  --name "My OpenAI Integration" \
  --provider openAI \
  --api-key "sk-..."
bash
ax ai-integrations create \
  --name "My OpenAI Integration" \
  --provider openAI \
  --api-key "sk-..."

Anthropic

Anthropic

bash
ax ai-integrations create \
  --name "My Anthropic Integration" \
  --provider anthropic \
  --api-key "sk-ant-..."
bash
ax ai-integrations create \
  --name "My Anthropic Integration" \
  --provider anthropic \
  --api-key "sk-ant-..."

Azure OpenAI

Azure OpenAI

bash
ax ai-integrations create \
  --name "My Azure OpenAI Integration" \
  --provider azureOpenAI \
  --api-key "AZURE_API_KEY" \
  --base-url "https://my-resource.openai.azure.com/"
bash
ax ai-integrations create \
  --name "My Azure OpenAI Integration" \
  --provider azureOpenAI \
  --api-key "AZURE_API_KEY" \
  --base-url "https://my-resource.openai.azure.com/"

AWS Bedrock

AWS Bedrock

AWS Bedrock uses IAM role-based auth instead of an API key. Provide the ARN of the role Arize should assume:
bash
ax ai-integrations create \
  --name "My Bedrock Integration" \
  --provider awsBedrock \
  --role-arn "arn:aws:iam::123456789012:role/ArizeBedrockRole"
AWS Bedrock使用基于IAM角色的认证而非API密钥。提供Arize需要扮演的角色ARN:
bash
ax ai-integrations create \
  --name "My Bedrock Integration" \
  --provider awsBedrock \
  --role-arn "arn:aws:iam::123456789012:role/ArizeBedrockRole"

Vertex AI

Vertex AI

Vertex AI uses GCP service account credentials. Provide the GCP project and region:
bash
ax ai-integrations create \
  --name "My Vertex AI Integration" \
  --provider vertexAI \
  --project-id "my-gcp-project" \
  --location "us-central1"
Vertex AI使用GCP服务账号凭据。提供GCP项目和区域:
bash
ax ai-integrations create \
  --name "My Vertex AI Integration" \
  --provider vertexAI \
  --project-id "my-gcp-project" \
  --location "us-central1"

Gemini

Gemini

bash
ax ai-integrations create \
  --name "My Gemini Integration" \
  --provider gemini \
  --api-key "AIza..."
bash
ax ai-integrations create \
  --name "My Gemini Integration" \
  --provider gemini \
  --api-key "AIza..."

NVIDIA NIM

NVIDIA NIM

bash
ax ai-integrations create \
  --name "My NVIDIA NIM Integration" \
  --provider nvidiaNim \
  --api-key "nvapi-..." \
  --base-url "https://integrate.api.nvidia.com/v1"
bash
ax ai-integrations create \
  --name "My NVIDIA NIM Integration" \
  --provider nvidiaNim \
  --api-key "nvapi-..." \
  --base-url "https://integrate.api.nvidia.com/v1"

Custom (OpenAI-compatible endpoint)

自定义(兼容OpenAI的端点)

bash
ax ai-integrations create \
  --name "My Custom Integration" \
  --provider custom \
  --base-url "https://my-llm-proxy.example.com/v1" \
  --api-key "optional-key-if-needed"
bash
ax ai-integrations create \
  --name "My Custom Integration" \
  --provider custom \
  --base-url "https://my-llm-proxy.example.com/v1" \
  --api-key "optional-key-if-needed"

Supported Providers

支持的提供商

ProviderRequired extra flags
openAI
--api-key <key>
anthropic
--api-key <key>
azureOpenAI
--api-key <key>
,
--base-url <azure-endpoint>
awsBedrock
--role-arn <arn>
vertexAI
--project-id <gcp-project>
,
--location <region>
gemini
--api-key <key>
nvidiaNim
--api-key <key>
,
--base-url <nim-endpoint>
custom
--base-url <endpoint>
提供商必需的额外参数
openAI
--api-key <key>
anthropic
--api-key <key>
azureOpenAI
--api-key <key>
,
--base-url <azure-endpoint>
awsBedrock
--role-arn <arn>
vertexAI
--project-id <gcp-project>
,
--location <region>
gemini
--api-key <key>
nvidiaNim
--api-key <key>
,
--base-url <nim-endpoint>
custom
--base-url <endpoint>

Optional flags for any provider

所有提供商通用的可选参数

FlagDescription
--model-names
Comma-separated list of allowed model names; omit to allow all models
--enable-default-models
/
--no-default-models
Enable or disable the provider's default model list
--function-calling
/
--no-function-calling
Enable or disable tool/function calling support
参数描述
--model-names
逗号分隔的允许使用的模型名称列表;省略则允许所有模型
--enable-default-models
/
--no-default-models
启用或禁用提供商的默认模型列表
--function-calling
/
--no-function-calling
启用或禁用工具/函数调用支持

After creation

创建完成后

Capture the returned integration ID (e.g.,
TGxtSW50ZWdyYXRpb246MTI6YUJjRA==
) — it is needed for evaluator creation and other downstream commands. If you missed it, retrieve it:
bash
ax ai-integrations list --space-id SPACE_ID -o json
记录返回的集成ID(例如:
TGxtSW50ZWdyYXRpb246MTI6YUJjRA==
) — 该ID用于创建评估器和其他下游命令。如果遗漏了ID,可以通过以下方式获取:
bash
ax ai-integrations list --space-id SPACE_ID -o json

or, if you know the ID:

或者,如果你知道名称:

ax ai-integrations get INT_ID

---
ax ai-integrations get INT_ID

---

Update an AI Integration

更新AI集成

update
is a partial update — only the flags you provide are changed. Omitted fields stay as-is.
bash
undefined
update
是部分更新 — 仅修改你指定的参数。未指定的字段保持不变。
bash
undefined

Rename

重命名

ax ai-integrations update INT_ID --name "New Name"
ax ai-integrations update INT_ID --name "New Name"

Rotate the API key

轮换API密钥

ax ai-integrations update INT_ID --api-key "sk-new-key..."
ax ai-integrations update INT_ID --api-key "sk-new-key..."

Change the model list

修改模型列表

ax ai-integrations update INT_ID --model-names "gpt-4o,gpt-4o-mini"
ax ai-integrations update INT_ID --model-names "gpt-4o,gpt-4o-mini"

Update base URL (for Azure, custom, or NIM)

更新基础URL(适用于Azure、自定义或NIM)

ax ai-integrations update INT_ID --base-url "https://new-endpoint.example.com/v1"

Any flag accepted by `create` can be passed to `update`.

---
ax ai-integrations update INT_ID --base-url "https://new-endpoint.example.com/v1"

`create`命令接受的所有参数都可以传递给`update`。

---

Delete an AI Integration

删除AI集成

Warning: Deletion is permanent. Evaluators that reference this integration will no longer be able to run.
bash
ax ai-integrations delete INT_ID --force
Omit
--force
to get a confirmation prompt instead of deleting immediately.

警告: 删除操作不可恢复。引用此集成的评估器将无法再运行。
bash
ax ai-integrations delete INT_ID --force
省略
--force
将弹出确认提示,而非直接删除。

Troubleshooting

故障排除

ProblemSolution
ax: command not found
See ax-setup.md
401 Unauthorized
API key may not have access to this space. Verify key and space ID at https://app.arize.com/admin > API Keys
No profile found
Run
ax profiles show --expand
; set
ARIZE_API_KEY
env var or write
~/.arize/config.toml
Integration not found
Verify with
ax ai-integrations list --space-id SPACE_ID
has_api_key: false
after create
Credentials were not saved — re-run
update
with the correct
--api-key
or
--role-arn
Evaluator runs fail with LLM errorsCheck integration credentials with
ax ai-integrations get INT_ID
; rotate the API key if needed
provider
mismatch
Cannot change provider after creation — delete and recreate with the correct provider

问题解决方案
ax: command not found
查看ax-setup.md
401 Unauthorized
API密钥可能无权访问此空间。在https://app.arize.com/admin > API Keys验证密钥和空间ID
No profile found
运行
ax profiles show --expand
;设置
ARIZE_API_KEY
环境变量或编写
~/.arize/config.toml
Integration not found
使用
ax ai-integrations list --space-id SPACE_ID
验证
创建后
has_api_key: false
未保存凭据 — 重新运行
update
并传入正确的
--api-key
--role-arn
评估器运行时出现LLM错误使用
ax ai-integrations get INT_ID
检查集成凭据;必要时轮换API密钥
provider
不匹配
创建后无法修改提供商 — 删除并重新创建正确提供商的集成

Related Skills

相关Skill

  • arize-evaluator: Create LLM-as-judge evaluators that use an AI integration → use
    arize-evaluator
  • arize-experiment: Run experiments that use evaluators backed by an AI integration → use
    arize-experiment

  • arize-evaluator:创建使用AI集成的LLM裁判评估器 → 使用
    arize-evaluator
  • arize-experiment:运行由AI集成支持的评估器实验 → 使用
    arize-experiment

Save Credentials for Future Use

保存凭据供后续使用

At the end of the session, if the user manually provided any credentials during this conversation and those values were NOT already loaded from a saved profile or environment variable, offer to save them.
Skip this entirely if:
  • The API key was already loaded from an existing profile or
    ARIZE_API_KEY
    env var
  • The space ID was already set via
    ARIZE_SPACE_ID
    env var
How to offer: Use AskQuestion: "Would you like to save your Arize credentials so you don't have to enter them next time?" with options
"Yes, save them"
/
"No thanks"
.
If the user says yes:
  1. API key — See ax-profiles.md. Run
    ax profiles show
    to check the current state, then use
    ax profiles create
    or
    ax profiles update
    with the appropriate flags to save the key (and region if relevant).
  2. Space ID — See ax-profiles.md (Space ID section) to persist it as an environment variable.
在会话结束时,如果用户手动提供了任何凭据,且这些值从已保存的配置文件或环境变量中加载,则提供保存选项。
完全跳过此步骤的情况:
  • API密钥已从现有配置文件或
    ARIZE_API_KEY
    环境变量加载
  • 空间ID已通过
    ARIZE_SPACE_ID
    环境变量设置
如何询问: 使用提问"是否要保存你的Arize凭据,以便下次无需再次输入?" 选项为
"是,保存"
/
"不用了,谢谢"
如果用户选择是:
  1. API密钥 — 查看ax-profiles.md。运行
    ax profiles show
    检查当前状态,然后使用
    ax profiles create
    ax profiles update
    传入合适的参数保存密钥(以及相关的区域)。
  2. 空间ID — 查看ax-profiles.md(空间ID部分)将其持久化为环境变量。