Skip to main content

Documentation Index

Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

The aiintegrations client methods are currently in ALPHA. The API may change without notice. A one-time warning is emitted on first use.
An AI integration is a configured connection to an external LLM provider (OpenAI, Anthropic, AWS Bedrock, Vertex AI, etc.). The Get, Update, and Delete methods accept either an integration name or an ID — when a name is passed, the parent Space (name or ID) is also required so the SDK can resolve the name to a unique ID. When Provider is AIIntegrationProviderAWSBedrock or AIIntegrationProviderVertexAI, ProviderMetadata must also be set; the server returns *arize.UnprocessableEntityError (HTTP 422) on mismatch.

List AI Integrations

List returns a paginated list of AI integrations. Defaults to a page size of 50. Space, when non-empty, filters by space (substring match on space name, or exact match if a base64 resource ID is passed). Signature:
func (c *Client) List(ctx context.Context, req ListRequest) (*AIIntegrationList, error)
Usage Example:
package main

import (
    "context"
    "errors"
    "fmt"
    "log"

    "github.com/Arize-ai/client-go-v2/arize"
    "github.com/Arize-ai/client-go-v2/arize/aiintegrations"
)

func main() {
    client, err := arize.NewClient(arize.Config{APIKey: "your-api-key"})
    if err != nil {
        log.Fatal(err)
    }

    resp, err := client.AIIntegrations.List(context.Background(), aiintegrations.ListRequest{
        Space: "your-space-name-or-id",
        Limit: 25,
    })
    if err != nil {
        var unauthorized *arize.UnauthorizedError
        if errors.As(err, &unauthorized) {
            log.Fatalf("unauthorized: %v", unauthorized)
        }
        log.Fatal(err)
    }

    for _, integration := range resp.AiIntegrations {
        fmt.Printf("%s: %s (provider=%s)\n", integration.Id, integration.Name, integration.Provider)
    }
}

Get an AI Integration

Get returns a single AI integration, resolving by name or ID. Signature:
func (c *Client) Get(ctx context.Context, req GetRequest) (*AIIntegration, error)
Usage Example:
package main

import (
    "context"
    "errors"
    "fmt"
    "log"

    "github.com/Arize-ai/client-go-v2/arize"
    "github.com/Arize-ai/client-go-v2/arize/aiintegrations"
)

func main() {
    client, err := arize.NewClient(arize.Config{APIKey: "your-api-key"})
    if err != nil {
        log.Fatal(err)
    }

    integration, err := client.AIIntegrations.Get(
        context.Background(),
        aiintegrations.GetRequest{
            Integration: "your-integration-name-or-id",
            Space:       "your-space-name-or-id",
        },
    )
    if err != nil {
        var notFound *arize.NotFoundError
        if errors.As(err, &notFound) {
            log.Fatalf("integration not found: %v", notFound)
        }
        log.Fatal(err)
    }

    fmt.Printf("integration %s: %s (provider=%s)\n", integration.Id, integration.Name, integration.Provider)
}

Create an AI Integration

Create issues a POST to create a new AI integration and returns it. Integration names must be unique within the account. APIKey is write-only — never returned by the server. Signature:
func (c *Client) Create(ctx context.Context, req CreateRequest) (*AIIntegration, error)
Usage Example:
package main

import (
    "context"
    "errors"
    "fmt"
    "log"

    "github.com/Arize-ai/client-go-v2/arize"
    "github.com/Arize-ai/client-go-v2/arize/aiintegrations"
)

func main() {
    client, err := arize.NewClient(arize.Config{APIKey: "your-api-key"})
    if err != nil {
        log.Fatal(err)
    }

    integration, err := client.AIIntegrations.Create(
        context.Background(),
        aiintegrations.CreateRequest{
            Name:     "my-openai",
            Provider: aiintegrations.AIIntegrationProviderOpenAI,
            APIKey:   "sk-...",
        },
    )
    if err != nil {
        var unprocessable *arize.UnprocessableEntityError
        if errors.As(err, &unprocessable) {
            log.Fatalf("invalid integration config: %v", unprocessable)
        }
        log.Fatal(err)
    }

    fmt.Printf("created integration %s\n", integration.Id)
}

Update an AI Integration

Update patches an existing AI integration, resolving the target by name or ID, and returns the updated integration. Only non-nil patch fields are sent on the wire; omitted fields are left unchanged. For nullable fields (APIKey, BaseURL, Headers, ProviderMetadata), pass a non-nil pointer to the zero value to clear the field on the server. Returns aiintegrations.ErrNoUpdateFields without contacting the server when no patch fields are set. Signature:
func (c *Client) Update(ctx context.Context, req UpdateRequest) (*AIIntegration, error)
Usage Example:
package main

import (
    "context"
    "errors"
    "fmt"
    "log"

    "github.com/Arize-ai/client-go-v2/arize"
    "github.com/Arize-ai/client-go-v2/arize/aiintegrations"
)

func main() {
    client, err := arize.NewClient(arize.Config{APIKey: "your-api-key"})
    if err != nil {
        log.Fatal(err)
    }

    newName := "renamed-openai"
    integration, err := client.AIIntegrations.Update(
        context.Background(),
        aiintegrations.UpdateRequest{
            Integration: "your-integration-name-or-id",
            Space:       "your-space-name-or-id",
            Name:        &newName,
        },
    )
    if err != nil {
        if errors.Is(err, aiintegrations.ErrNoUpdateFields) {
            log.Fatal("no fields to update")
        }
        var notFound *arize.NotFoundError
        if errors.As(err, &notFound) {
            log.Fatalf("integration not found: %v", notFound)
        }
        log.Fatal(err)
    }

    fmt.Printf("updated integration %s: %s\n", integration.Id, integration.Name)
}

Delete an AI Integration

Delete removes an AI integration, resolving by name or ID. It returns only an error. Signature:
func (c *Client) Delete(ctx context.Context, req DeleteRequest) error
Usage Example:
package main

import (
    "context"
    "errors"
    "log"

    "github.com/Arize-ai/client-go-v2/arize"
    "github.com/Arize-ai/client-go-v2/arize/aiintegrations"
)

func main() {
    client, err := arize.NewClient(arize.Config{APIKey: "your-api-key"})
    if err != nil {
        log.Fatal(err)
    }

    err = client.AIIntegrations.Delete(
        context.Background(),
        aiintegrations.DeleteRequest{
            Integration: "your-integration-name-or-id",
            Space:       "your-space-name-or-id",
        },
    )
    if err != nil {
        var notFound *arize.NotFoundError
        if errors.As(err, &notFound) {
            log.Printf("no integration to remove: %v", notFound)
            return
        }
        log.Fatal(err)
    }
}