Launch Week 3: Five days of launches

Export Destinations

Overview

The Confident AI SDK exposes every Export Destination method on the platform. This page documents how to call these methods in all supported languages. See the introduction to install the SDK and set your API key.

Methods

List Export Destinations

Lists the export destinations in your Confident AI project one page at a time, newest first. Each destination is returned without its credentials; retrieve one by id to see them in masked form.

from confident_ai import ConfidentAI

client = ConfidentAI()

result = client.export_destinations.list(page=1, page_size=25)

For async mode, call a_list and await it as shown below:

result = await client.export_destinations.a_list(...)

Parameters

ParameterTypeDescription
pageOptional[int]The page to return. Defaults to 1.
page_sizeOptional[int]The number of results per page, at most 100. Defaults to 25.

Returns

This method returns an object of type ExportDestinationList.

Create Export Destination

Creates an export destination in your Confident AI project and returns its id. Credentials must be sent in full — a masked value copied from a read is rejected, since storing the mask would leave a destination that can never authenticate. A project holds at most three destinations.

from confident_ai import ConfidentAI
from confident_ai.export_destinations import ExportDestinationType
from confident_ai.export_destinations import SnowflakeExportDestinationConfig

client = ConfidentAI()

result = client.export_destinations.create(
    name="Nightly S3 exports",
    type=ExportDestinationType.S3,
    bucket="acme-llm-exports",
    region="us-east-1",
    access_key_id="AKIAIOSFODNN7EXAMPLE",
    secret_access_key="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    path_prefix="confident-ai/",
    snowflake_config=SnowflakeExportDestinationConfig(
        account="myorg-myaccount",
        username="CONFIDENT_EXPORTER",
        role="CONFIDENT_EXPORT_ROLE",
        warehouse="CONFIDENT_WH",
        database="ANALYTICS",
        schema="CONFIDENT",
        private_key="-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASC...\n-----END PRIVATE KEY-----",
        private_key_passphrase="correct-horse-battery-staple"
    ),
    enabled=True,
)

For async mode, call a_create and await it as shown below:

result = await client.export_destinations.a_create(...)

Parameters

ParameterTypeDescription
namestrRequired. The name of the destination, as it appears in your project.
typeOptional[ExportDestinationType]See ExportDestinationType.
bucketOptional[str]The name of the bucket exports are uploaded to. Required for S3 destinations and rejected for SNOWFLAKE.
regionOptional[str]The region the bucket lives in. Required for S3 destinations and rejected for SNOWFLAKE.
access_key_idOptional[str]Required for S3 destinations. The access key id Confident AI uploads with. Reads return this masked, as fifteen asterisks followed by its last six characters, so a masked value is rejected here — send the real key id.
secret_access_keyOptional[str]Required for S3 destinations. The secret access key paired with accessKeyId. Confident AI never returns it in full, so a masked value is rejected here — send the real secret.
path_prefixOptional[str]A folder inside the bucket to write exports under. A leading slash is stripped and a trailing one added, so /confident-ai is stored as confident-ai/. Omit it, or send null or an empty string, to write to the root of the bucket.
snowflake_configOptional[SnowflakeExportDestinationConfig]See SnowflakeExportDestinationConfig.
enabledOptional[bool]Whether export schedules may upload to this destination. Defaults to true.

Returns

This method returns an object of type ExportDestinationRef.

Get Export Destination

Retrieves an export destination by id. Its credentials come back masked — fifteen asterisks followed by the last six characters of the stored value — so you can tell which key is in use without the key itself being returned.

from confident_ai import ConfidentAI

client = ConfidentAI()

result = client.export_destinations.get(
    export_destination_id="<EXPORT-DESTINATION-ID>",
)

For async mode, call a_get and await it as shown below:

result = await client.export_destinations.a_get(...)

Parameters

ParameterTypeDescription
export_destination_idstrRequired. The id of the export destination.

Returns

This method returns an object of type ExportDestination.

Update Export Destination

Updates an export destination and returns it with its credentials masked. Omit a credential to leave the stored one alone; resending the masked value a read returned does the same, so a destination you read and send straight back keeps working.

from confident_ai import ConfidentAI
from confident_ai.export_destinations import ExportDestinationType
from confident_ai.export_destinations import UpdateSnowflakeExportDestinationConfig

client = ConfidentAI()

result = client.export_destinations.update(
    export_destination_id="<EXPORT-DESTINATION-ID>",
    name="Nightly S3 exports",
    type=ExportDestinationType.S3,
    bucket="acme-llm-exports",
    region="us-east-1",
    access_key_id="AKIAIOSFODNN7EXAMPLE",
    secret_access_key="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    path_prefix="confident-ai/",
    snowflake_config=UpdateSnowflakeExportDestinationConfig(
        account="myorg-myaccount",
        username="CONFIDENT_EXPORTER",
        role="CONFIDENT_EXPORT_ROLE",
        warehouse="CONFIDENT_WH",
        database="ANALYTICS",
        schema="CONFIDENT",
        private_key="-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASC...\n-----END PRIVATE KEY-----",
        private_key_passphrase="correct-horse-battery-staple"
    ),
    enabled=True,
)

For async mode, call a_update and await it as shown below:

result = await client.export_destinations.a_update(...)

Parameters

ParameterTypeDescription
export_destination_idstrRequired. The id of the export destination.
nameOptional[str]The name of the destination, as it appears in your project.
typeOptional[ExportDestinationType]See ExportDestinationType.
bucketOptional[str]The name of the bucket exports are uploaded to.
regionOptional[str]The region the bucket lives in.
access_key_idOptional[str]A new access key id for the bucket. Omit it to leave the stored key id untouched. Sending back the masked value a read returned leaves it untouched too, so a destination you read and send straight back keeps working.
secret_access_keyOptional[str]A new secret access key for the bucket. Omit it to leave the stored secret untouched. Sending back the masked value a read returned leaves it untouched too; the mask is never written into storage.
path_prefixOptional[str]A folder inside the bucket to write exports under. A leading slash is stripped and a trailing one added, so /confident-ai is stored as confident-ai/. Send null to clear it and write to the root of the bucket; an empty string is ignored.
snowflake_configOptional[UpdateSnowflakeExportDestinationConfig]See UpdateSnowflakeExportDestinationConfig.
enabledOptional[bool]Whether export schedules may upload to this destination. Set it to false to stop uploads without deleting the destination.

Returns

This method returns an object of type ExportDestination.

Delete Export Destination

Permanently deletes an export destination. Every export schedule pointing at it is disabled first, so no schedule is left silently falling back to another delivery mode.

from confident_ai import ConfidentAI

client = ConfidentAI()

result = client.export_destinations.delete(
    export_destination_id="<EXPORT-DESTINATION-ID>",
)

For async mode, call a_delete and await it as shown below:

result = await client.export_destinations.a_delete(...)

Parameters

ParameterTypeDescription
export_destination_idstrRequired. The id of the export destination.

Returns

This method returns an object of type ExportDestinationRef.

Types

ExportDestination

A destination export schedules send exports to, with its credentials masked. Confident AI returns the last six characters of each credential so you can tell which one is stored, never the credential itself.

class ExportDestination:
    id: str
    name: str
    type: ExportDestinationType
    bucket: Optional[str]
    region: Optional[str]
    access_key_id: Optional[str] = Field(alias="accessKeyId")
    secret_access_key: Optional[str] = Field(alias="secretAccessKey")
    path_prefix: Optional[str] = Field(alias="pathPrefix")
    snowflake_config: Optional[SnowflakeExportDestinationMaskedConfig] = Field(alias="snowflakeConfig")
    enabled: bool
    created_at: str = Field(alias="createdAt")
    updated_at: str = Field(alias="updatedAt")

idstrRequired

The id of the destination, generated by Confident AI.

Example: "<EXPORT-DESTINATION-ID>"

namestrRequired

The name of the destination.

Example: "Nightly S3 exports"

typeExportDestinationTypeRequired

bucketOptional[str]Required

The name of the bucket exports are uploaded to, or null for a SNOWFLAKE destination.

Example: "acme-llm-exports"

regionOptional[str]Required

The region the bucket lives in, or null for a SNOWFLAKE destination.

Example: "us-east-1"

access_key_idOptional[str]Required

Null for a SNOWFLAKE destination. Otherwise the stored access key id, masked: fifteen asterisks followed by its last six characters. The real key id is never returned. Send this value back on an update to leave the stored key id alone, or omit the field entirely.

Example: "***************XAMPLE"

secret_access_keyOptional[str]Required

Null for a SNOWFLAKE destination. Otherwise the stored secret access key, masked: fifteen asterisks followed by its last six characters. The real secret is never returned. Send this value back on an update to leave the stored secret alone, or omit the field entirely.

Example: "***************PLEKEY"

path_prefixOptional[str]Required

The folder inside the bucket exports are written under, always ending in a slash, or null when they are written to the root of the bucket or the destination is SNOWFLAKE.

Example: "confident-ai/"

snowflake_configOptional[SnowflakeExportDestinationMaskedConfig]Required

The Snowflake settings with secrets masked, or null for an S3 destination.

See SnowflakeExportDestinationMaskedConfig.

enabledboolRequired

Whether export schedules may upload to this destination.

Example: true

created_atstrRequired

The timestamp when the destination was created.

Example: "2025-01-15T10:30:00+00:00"

updated_atstrRequired

The timestamp when the destination was last updated.

Example: "2025-01-20T08:15:00+00:00"

ExportDestinationList

One page of destinations, with the total across all pages.

class ExportDestinationList:
    export_destinations: List[ExportDestinationSummary] = Field(alias="exportDestinations")
    total_export_destinations: int = Field(alias="totalExportDestinations")
    page: int
    page_size: int = Field(alias="pageSize")

export_destinationsList[ExportDestinationSummary]Required

The destinations for the current page, newest first.

See ExportDestinationSummary.

total_export_destinationsintRequired

The total number of destinations in this project.

Example: 2

pageintRequired

The page this response covers.

Example: 1

page_sizeintRequired

The number of destinations per page.

Example: 25

ExportDestinationRef

A reference to an export destination by its id.

class ExportDestinationRef:
    id: str

idstrRequired

The id of the destination, generated by Confident AI.

Example: "<EXPORT-DESTINATION-ID>"

ExportDestinationSummary

A destination as it appears in a list: enough to pick one, without its credentials. Retrieve it by id for the full record.

class ExportDestinationSummary:
    id: str
    name: str
    type: ExportDestinationType
    bucket: Optional[str]
    enabled: bool

idstrRequired

The id of the destination, generated by Confident AI.

Example: "<EXPORT-DESTINATION-ID>"

namestrRequired

The name of the destination.

Example: "Nightly S3 exports"

typeExportDestinationTypeRequired

bucketOptional[str]Required

The name of the bucket exports are uploaded to, or null for a SNOWFLAKE destination.

Example: "acme-llm-exports"

enabledboolRequired

Whether export schedules may upload to this destination.

Example: true

ExportDestinationType

Where exports go. S3 uploads files to a bucket and SNOWFLAKE loads rows into tables; any other member is rejected on create. A destination's type can't be changed after it is created.

class ExportDestinationType(Enum):
    S3 = "S3"
    GCS = "GCS"
    AZURE_BLOB = "AZURE_BLOB"
    SNOWFLAKE = "SNOWFLAKE"

S3 · GCS · AZURE_BLOB · SNOWFLAKE

SnowflakeExportDestinationConfig

How Confident AI signs in to Snowflake with key-pair authentication, and where it creates the export tables.

class SnowflakeExportDestinationConfig:
    account: str
    username: str
    role: str
    warehouse: str
    database: str
    schema: str
    private_key: str = Field(alias="privateKey")
    private_key_passphrase: Optional[str] = Field(default=None, alias="privateKeyPassphrase")

accountstrRequired

The Snowflake account identifier, as <organization>-<account>. A full https://<account>.snowflakecomputing.com URL is accepted and trimmed to the identifier.

Example: "myorg-myaccount"

usernamestrRequired

The Snowflake user Confident AI signs in as, ideally a TYPE = SERVICE user whose RSA_PUBLIC_KEY matches privateKey.

Example: "CONFIDENT_EXPORTER"

rolestrRequired

The role loads run as. It needs USAGE on the warehouse, database and schema, and CREATE TABLE on the schema.

Example: "CONFIDENT_EXPORT_ROLE"

warehousestrRequired

The warehouse that runs each load.

Example: "CONFIDENT_WH"

databasestrRequired

The database the export tables live in.

Example: "ANALYTICS"

schemastrRequired

The schema Confident AI creates CONFIDENT_TRACES and CONFIDENT_ANNOTATIONS in.

Example: "CONFIDENT"

private_keystrRequired

The PEM private key paired with the user's RSA_PUBLIC_KEY. Reads return it masked, so a masked value is rejected here — send the real key.

Example: "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASC...\n-----END PRIVATE KEY-----"

private_key_passphraseOptional[str]

The passphrase of an encrypted private key. Omit it, or send null, for an unencrypted key.

Example: "correct-horse-battery-staple"

SnowflakeExportDestinationMaskedConfig

A Snowflake destination's settings with the private key and passphrase masked.

class SnowflakeExportDestinationMaskedConfig:
    account: str
    username: str
    role: str
    warehouse: str
    database: str
    schema: str
    private_key: str = Field(alias="privateKey")
    private_key_passphrase: Optional[str] = Field(alias="privateKeyPassphrase")

accountstrRequired

The Snowflake account identifier, as <organization>-<account>. A full https://<account>.snowflakecomputing.com URL is accepted and trimmed to the identifier.

Example: "myorg-myaccount"

usernamestrRequired

The Snowflake user Confident AI signs in as, ideally a TYPE = SERVICE user whose RSA_PUBLIC_KEY matches privateKey.

Example: "CONFIDENT_EXPORTER"

rolestrRequired

The role loads run as. It needs USAGE on the warehouse, database and schema, and CREATE TABLE on the schema.

Example: "CONFIDENT_EXPORT_ROLE"

warehousestrRequired

The warehouse that runs each load.

Example: "CONFIDENT_WH"

databasestrRequired

The database the export tables live in.

Example: "ANALYTICS"

schemastrRequired

The schema Confident AI creates CONFIDENT_TRACES and CONFIDENT_ANNOTATIONS in.

Example: "CONFIDENT"

private_keystrRequired

The stored private key, masked: fifteen asterisks followed by its last six characters. Send this value back on an update to keep the stored key.

Example: "***************Y-----"

private_key_passphraseOptional[str]Required

The stored passphrase, fully masked as fifteen asterisks, or null when the key is unencrypted. Send it back on an update to keep the stored passphrase.

Example: "***************"

UpdateSnowflakeExportDestinationConfig

The Snowflake settings to change. Omitted fields keep their stored values.

class UpdateSnowflakeExportDestinationConfig:
    account: Optional[str] = None
    username: Optional[str] = None
    role: Optional[str] = None
    warehouse: Optional[str] = None
    database: Optional[str] = None
    schema: Optional[str] = None
    private_key: Optional[str] = Field(default=None, alias="privateKey")
    private_key_passphrase: Optional[str] = Field(default=None, alias="privateKeyPassphrase")

accountOptional[str]

The Snowflake account identifier, as <organization>-<account>. A full https://<account>.snowflakecomputing.com URL is accepted and trimmed to the identifier.

Example: "myorg-myaccount"

usernameOptional[str]

The Snowflake user Confident AI signs in as, ideally a TYPE = SERVICE user whose RSA_PUBLIC_KEY matches privateKey.

Example: "CONFIDENT_EXPORTER"

roleOptional[str]

The role loads run as. It needs USAGE on the warehouse, database and schema, and CREATE TABLE on the schema.

Example: "CONFIDENT_EXPORT_ROLE"

warehouseOptional[str]

The warehouse that runs each load.

Example: "CONFIDENT_WH"

databaseOptional[str]

The database the export tables live in.

Example: "ANALYTICS"

schemaOptional[str]

The schema Confident AI creates CONFIDENT_TRACES and CONFIDENT_ANNOTATIONS in.

Example: "CONFIDENT"

private_keyOptional[str]

A new PEM private key. Omit it, or send back the masked value a read returned, to keep the stored key.

Example: "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASC...\n-----END PRIVATE KEY-----"

private_key_passphraseOptional[str]

A new passphrase for an encrypted private key. Omit it, or send back the masked value, to keep the stored one; send null to clear it.

Example: "correct-horse-battery-staple"

Building a production pipeline?Design a scalable API workflow for evals, datasets, traces, and promptsTalk to an engineer

Last updated on

Built byConfident AI