Introducing Confident Monitor

Create Export Destination

(v2)

POST

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.

POST/v2/export-destinations
curl -X POST "https://api.confident-ai.com/v2/export-destinations" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Nightly S3 exports",
  "type": "S3",
  "bucket": "acme-llm-exports",
  "region": "us-east-1",
  "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
  "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "pathPrefix": "confident-ai/",
  "snowflakeConfig": {
    "account": "myorg-myaccount",
    "username": "CONFIDENT_EXPORTER",
    "role": "CONFIDENT_EXPORT_ROLE",
    "warehouse": "CONFIDENT_WH",
    "database": "ANALYTICS",
    "schema": "CONFIDENT",
    "privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASC...\n-----END PRIVATE KEY-----",
    "privateKeyPassphrase": "correct-horse-battery-staple"
  },
  "enabled": true
}'
200
{
  "success": true,
  "data": {
    "id": "<EXPORT-DESTINATION-ID>"
  },
  "link": "https://app.confident-ai.com/project/<PROJECT-ID>/project-settings/exports",
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Request body

  • namestringRequired

    The name of the destination, as it appears in your project.

  • typeenum

    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.

    Show 4 enum valuesHide 4 enum values
    • S3
    • GCS
    • AZURE_BLOB
    • SNOWFLAKE
  • bucketstring

    The name of the bucket exports are uploaded to. Required for S3 destinations and rejected for SNOWFLAKE.

  • regionstring

    The region the bucket lives in. Required for S3 destinations and rejected for SNOWFLAKE.

  • accessKeyIdstring

    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.

  • secretAccessKeystring

    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.

  • pathPrefixstring | null

    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.

  • snowflakeConfigobject

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

    Show 8 propertiesHide 8 properties
    • accountstringRequired

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

    • usernamestringRequired

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

    • rolestringRequired

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

    • warehousestringRequired

      The warehouse that runs each load.

    • databasestringRequired

      The database the export tables live in.

    • schemastringRequired

      The schema Confident AI creates CONFIDENT_TRACES and CONFIDENT_ANNOTATIONS in.

    • privateKeystringRequired

      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.

    • privateKeyPassphrasestring | null

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

  • enabledboolean

    Whether export schedules may upload to this destination. Defaults to true.

Response

Create Export Destination succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A reference to an export destination by its id.

    Show 1 propertyHide 1 property
    • idstring

      The id of the destination, generated by Confident AI.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI