AI Integrations#

class AiIntegrationsClient(*, sdk_config: SDKConfiguration, generated_client: ApiClient)[source]#

Bases: object

Client 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) AiIntegrationsList200Response[source]#

List AI integrations the user has access to.

This endpoint supports cursor-based pagination. When provided, space filters 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:

AiIntegrationsList200Response

get(*, integration: str, space: str | None = None) AiIntegration[source]#

Get an AI integration by name or ID.

Parameters:
  • integration (str) – Integration name or ID to retrieve.

  • space (str | None) – Optional space name or ID used to disambiguate when resolving by name.

Returns:

The AI integration object.

Raises:

ApiException – If the API request fails (for example, integration not found).

Return type:

AiIntegration

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 awsBedrock provider, provider_metadata must include role_arn. For vertexAI provider, provider_metadata must include project_id, location, and project_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 False if not provided.

  • function_calling_enabled (bool | None) – Enable function/tool calling. Defaults to True if not provided.

  • auth_type (AiIntegrationAuthType | None) – Authentication type. Defaults to default if not provided.

  • provider_metadata (AwsProviderMetadata | GcpProviderMetadata | None) – Typed provider metadata (AwsProviderMetadata or GcpProviderMetadata), including the required kind discriminator.

  • 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:

AiIntegration

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), pass None.

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 None to clear the existing key.

  • base_url (str | None) – Updated custom base URL. Pass None to clear.

  • model_names (builtins.list[str] | None) – Updated model names (replaces all existing).

  • headers (dict[str, str] | None) – Updated custom headers. Pass None to 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 (AwsProviderMetadata or GcpProviderMetadata). Pass None to 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:

AiIntegration

delete(*, integration: str, space: str | None = None) None[source]#

Delete an AI integration by name or ID.

This operation is irreversible.

Parameters:
  • integration (str) – Integration name or ID to delete.

  • space (str | None) – Optional space name or ID used to disambiguate when resolving by name.

Raises:

ApiException – If the API request fails (for example, integration not found or insufficient permissions).

Return type:

None

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: BaseModel

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.

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:
id: StrictStr#
name: StrictStr#
provider: AiIntegrationProvider#
has_api_key: StrictBool#
base_url: StrictStr | None#
model_names: List[StrictStr] | None#
headers: Dict[str, StrictStr] | None#
enable_default_models: StrictBool#
function_calling_enabled: StrictBool#
auth_type: AiIntegrationAuthType#
provider_metadata: AiIntegrationProviderMetadata | None#
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].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AiIntegration from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

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.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AiIntegration from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

class AiIntegrationAuthType(value, names=_not_given, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

The authentication method for this integration

DEFAULT = 'default'#
PROXY_WITH_HEADERS = 'proxy_with_headers'#
BEARER_TOKEN = 'bearer_token'#
classmethod from_json(json_str: str) Self[source]#

Create an instance of AiIntegrationAuthType from a JSON string

Parameters:

json_str (str)

Return type:

Self

class AiIntegrationProvider(value, names=_not_given, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: str, Enum

The AI provider for this integration

OPENAI = 'openAI'#
AZUREOPENAI = 'azureOpenAI'#
AWSBEDROCK = 'awsBedrock'#
VERTEXAI = 'vertexAI'#
ANTHROPIC = 'anthropic'#
CUSTOM = 'custom'#
NVIDIANIM = 'nvidiaNim'#
GEMINI = 'gemini'#
classmethod from_json(json_str: str) Self[source]#

Create an instance of AiIntegrationProvider from a JSON string

Parameters:

json_str (str)

Return type:

Self

class AiIntegrationScoping(*, organization_id: Annotated[str, Strict(strict=True)] | None = None, space_id: Annotated[str, Strict(strict=True)] | None = None)[source]#

Bases: BaseModel

Visibility 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:
organization_id: StrictStr | None#
space_id: StrictStr | None#
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].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AiIntegrationScoping from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

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.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AiIntegrationScoping from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

class AiIntegrationsList200Response(*, ai_integrations: List[AiIntegration], pagination: PaginationMetadata)[source]#

Bases: BaseModel

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:
ai_integrations: List[AiIntegration]#
pagination: PaginationMetadata#
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].

to_str() str[source]#

Returns the string representation of the model using alias

Return type:

str

to_json() str[source]#

Returns the JSON representation of the model using alias

Return type:

str

classmethod from_json(json_str: str) Self | None[source]#

Create an instance of AiIntegrationsList200Response from a JSON string

Parameters:

json_str (str)

Return type:

Self | None

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.

Return type:

Dict[str, Any]

classmethod from_dict(obj: Dict[str, Any] | None) Self | None[source]#

Create an instance of AiIntegrationsList200Response from a dict

Parameters:

obj (Dict[str, Any] | None)

Return type:

Self | None

to_df(by_alias: bool = False, exclude_none: str | bool = True, json_normalize: bool = False, convert_dtypes: bool = True, expand_field: str = 'additional_properties', expand_prefix: str = '') pd.DataFrame#

Convert a list of objects to a pandas.DataFrame.

Behavior:
  • If an item is a Pydantic v2 model, use .model_dump(by_alias=…).

  • If an item is a mapping (dict-like), use it as-is.

  • Otherwise, raise a ValueError (unsupported row type).

Parameters:
  • self (object) – The object instance containing the field to convert.

  • by_alias (bool) – Use field aliases when dumping Pydantic models.

  • exclude_none (str | bool) – Control None/NaN column dropping. - False: keep Nones as-is - “all”: drop columns where all values are None/NaN - “any”: drop columns where any value is None/NaN - True: alias for “all”

  • json_normalize (bool) – If True, flatten nested dicts via pandas.json_normalize.

  • convert_dtypes (bool) – If True, call DataFrame.convert_dtypes() at the end.

  • expand_field (str) – If set, look for this field in each row and expand its keys into top-level columns.

  • expand_prefix (str) – If set, prefix expanded column names with this string.

Returns:

The converted DataFrame.

Return type:

pandas.DataFrame