AI Integrations#
- class AiIntegrationsClient(*, sdk_config: SDKConfiguration, generated_client: ApiClient)[source]#
Bases:
objectClient for managing Arize AI integrations.
This class is primarily intended for internal use within the SDK. Users are highly encouraged to access resource-specific functionality via
arize.ArizeClient.The AI integrations client is a thin wrapper around the generated REST API client, using the shared generated API client owned by
arize.config.SDKConfiguration.AI integrations configure access to external LLM providers (OpenAI, Azure OpenAI, AWS Bedrock, Vertex AI, Anthropic, and others) for use within the Arize platform.
- Parameters:
sdk_config (SDKConfiguration) – Resolved SDK configuration.
generated_client (ApiClient) – Shared generated API client instance.
- list(*, name: str | None = None, space: str | None = None, limit: int = 100, cursor: str | None = None) AiIntegrationListResponse[source]#
List AI integrations the user has access to.
This endpoint supports cursor-based pagination. When provided,
spacefilters results to a particular space.- Parameters:
name (str | None) – Optional case-insensitive substring filter on the integration name.
space (str | None) – Optional space filter. If the value is a base64-encoded resource ID it is treated as a space ID; otherwise it is used as a case-insensitive substring filter on the space name.
limit (int) – Maximum number of integrations to return. The server may enforce an upper bound (max 100).
cursor (str | None) – Opaque pagination cursor from a previous response.
- Returns:
A paginated AI integrations list response from the Arize REST API.
- Raises:
ApiException – If the API request fails.
- Return type:
AiIntegrationListResponse
- get(*, integration: str, space: str | None = None) AiIntegration[source]#
Get an AI integration by name or ID.
- Parameters:
- Returns:
The AI integration object.
- Raises:
ApiException – If the API request fails (for example, integration not found).
- Return type:
- create(*, name: str, provider: AiIntegrationProvider, api_key: str | None = None, base_url: str | None = None, model_names: builtins.list[str] | None = None, headers: dict[str, str] | None = None, enable_default_models: bool | None = None, function_calling_enabled: bool | None = None, auth_type: AiIntegrationAuthType | None = None, provider_metadata: AwsProviderMetadata | GcpProviderMetadata | None = None, scopings: builtins.list[AiIntegrationScoping] | None = None) AiIntegration[source]#
Create a new AI integration.
Integration names must be unique within the account.
For
awsBedrockprovider,provider_metadatamust includerole_arn. ForvertexAIprovider,provider_metadatamust includeproject_id,location, andproject_access_label.- Parameters:
name (str) – Integration name (must be unique within the account).
provider (AiIntegrationProvider) – LLM provider (e.g.
openAI,azureOpenAI,awsBedrock,vertexAI,anthropic,custom).api_key (str | None) – API key for the provider (write-only, never returned).
base_url (str | None) – Custom base URL for the provider.
model_names (builtins.list[str] | None) – Supported model names.
headers (dict[str, str] | None) – Custom headers to include in requests.
enable_default_models (bool | None) – Enable the provider’s default model list. Defaults to
Falseif not provided.function_calling_enabled (bool | None) – Enable function/tool calling. Defaults to
Trueif not provided.auth_type (AiIntegrationAuthType | None) – Authentication type. Defaults to
defaultif not provided.provider_metadata (AwsProviderMetadata | GcpProviderMetadata | None) – Typed provider metadata (
AwsProviderMetadataorGcpProviderMetadata), including the requiredkinddiscriminator.scopings (builtins.list[AiIntegrationScoping] | None) – Visibility scoping rules. Defaults to account-wide if omitted.
- Returns:
The created AI integration object.
- Raises:
ApiException – If the API request fails.
- Return type:
- update(*, integration: str, space: str | None = None, name: str | None = _UNSET, provider: AiIntegrationProvider | None = _UNSET, api_key: str | None = _UNSET, base_url: str | None = _UNSET, model_names: builtins.list[str] | None = _UNSET, headers: dict[str, str] | None = _UNSET, enable_default_models: bool | None = _UNSET, function_calling_enabled: bool | None = _UNSET, auth_type: AiIntegrationAuthType | None = _UNSET, provider_metadata: AwsProviderMetadata | GcpProviderMetadata | None = _UNSET, scopings: builtins.list[AiIntegrationScoping] | None = _UNSET) AiIntegration[source]#
Update an AI integration by name or ID.
Only the fields you pass are sent to the server. Omitted fields are left unchanged. To explicitly clear a nullable field (e.g.
api_key), passNone.- Parameters:
integration (str) – Integration name or ID to update.
space (str | None) – Optional space name or ID used to disambiguate when resolving by name.
name (str | None) – Updated integration name.
provider (AiIntegrationProvider | None) – Updated LLM provider.
api_key (str | None) – New API key. Pass
Noneto clear the existing key.base_url (str | None) – Updated custom base URL. Pass
Noneto clear.model_names (builtins.list[str] | None) – Updated model names (replaces all existing).
headers (dict[str, str] | None) – Updated custom headers. Pass
Noneto clear.enable_default_models (bool | None) – Updated default models flag.
function_calling_enabled (bool | None) – Updated function calling flag.
auth_type (AiIntegrationAuthType | None) – Updated authentication type.
provider_metadata (AwsProviderMetadata | GcpProviderMetadata | None) – Updated typed provider metadata (
AwsProviderMetadataorGcpProviderMetadata). PassNoneto clear.scopings (builtins.list[AiIntegrationScoping] | None) – Updated visibility scoping rules (replaces all existing).
- Returns:
The updated AI integration object.
- Raises:
ApiException – If the API request fails (for example, integration not found or insufficient permissions).
- Return type:
Response Types#
- class AiIntegration(*, id: Annotated[str, Strict(strict=True)], name: Annotated[str, Strict(strict=True)], provider: AiIntegrationProvider, has_api_key: Annotated[bool, Strict(strict=True)], base_url: Annotated[str, Strict(strict=True)] | None = None, model_names: List[Annotated[str, Strict(strict=True)]] | None = None, headers: Dict[str, Annotated[str, Strict(strict=True)]] | None = None, enable_default_models: Annotated[bool, Strict(strict=True)], function_calling_enabled: Annotated[bool, Strict(strict=True)], auth_type: AiIntegrationAuthType, provider_metadata: AiIntegrationProviderMetadata | None = None, scopings: List[AiIntegrationScoping], created_at: datetime, updated_at: datetime, created_by_user_id: Annotated[str, Strict(strict=True)])[source]#
Bases:
BaseModelAn 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.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
provider (AiIntegrationProvider)
model_names (List[Annotated[str, Strict(strict=True)]] | None)
headers (Dict[str, Annotated[str, Strict(strict=True)]] | None)
enable_default_models (Annotated[bool, Strict(strict=True)])
function_calling_enabled (Annotated[bool, Strict(strict=True)])
auth_type (AiIntegrationAuthType)
provider_metadata (AiIntegrationProviderMetadata | None)
scopings (List[AiIntegrationScoping])
created_at (datetime)
updated_at (datetime)
- id: StrictStr#
- name: StrictStr#
- provider: AiIntegrationProvider#
- has_api_key: StrictBool#
- enable_default_models: StrictBool#
- function_calling_enabled: StrictBool#
- auth_type: AiIntegrationAuthType#
- scopings: List[AiIntegrationScoping]#
- created_at: datetime#
- updated_at: datetime#
- created_by_user_id: StrictStr#
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod from_json(json_str: str) Self | None[source]#
Create an instance of AiIntegration from a JSON string
- to_dict() Dict[str, Any][source]#
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- class AiIntegrationAuthType(value, names=_not_given, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
-
The authentication method for this integration
- DEFAULT = 'default'#
- PROXY_WITH_HEADERS = 'proxy_with_headers'#
- BEARER_TOKEN = 'bearer_token'#
- class AiIntegrationProvider(value, names=_not_given, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
-
The AI provider for this integration
- OPENAI = 'openAI'#
- AZUREOPENAI = 'azureOpenAI'#
- AWSBEDROCK = 'awsBedrock'#
- VERTEXAI = 'vertexAI'#
- ANTHROPIC = 'anthropic'#
- CUSTOM = 'custom'#
- NVIDIANIM = 'nvidiaNim'#
- GEMINI = 'gemini'#
- class AiIntegrationScoping(*, organization_id: Annotated[str, Strict(strict=True)] | None = None, space_id: Annotated[str, Strict(strict=True)] | None = None)[source]#
Bases:
BaseModelVisibility scoping for the integration
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod from_json(json_str: str) Self | None[source]#
Create an instance of AiIntegrationScoping from a JSON string
- to_dict() Dict[str, Any][source]#
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.