Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Create an external storage configuration

POST/organization/external_storage

Register one customer-managed external storage configuration.

Body ParametersJSONExpand Collapse
project_id: string
provider: Aws { bucket, role_arn, type } or Azure { account_name, container, resource_group, 3 more } or Gcp { bucket, type, workload_identity_pool_id, 2 more } or Oci { bucket, region, tenancy_ocid, type }
One of the following:
Aws object { bucket, role_arn, type }
bucket: string
role_arn: string
type: "aws"
Azure object { account_name, container, resource_group, 3 more }
account_name: string
container: string
resource_group: string
subscription_id: string
tenant_id: string
type: "azure"
Gcp object { bucket, type, workload_identity_pool_id, 2 more }
bucket: string
type: "gcp"
workload_identity_pool_id: string
workload_identity_project_number: string
workload_identity_provider_id: string
Oci object { bucket, region, tenancy_ocid, type }
bucket: string
region: string
tenancy_ocid: string
type: "oci"
ReturnsExpand Collapse
ExternalStorageConfiguration object { id, created_at, geography, 4 more }
id: string
created_at: number
formatunixtime
geography: string
object: "organization.external_storage"
project_id: string
provider: AwsExternalStorageProvider { account_id, bucket, external_id, 3 more } or AzureExternalStorageProvider { account_name, container, region, 4 more } or GcpExternalStorageProvider { audience, bucket, region, 4 more } or Oci { bucket, region, tenancy_ocid, type }
One of the following:
AwsExternalStorageProvider object { account_id, bucket, external_id, 3 more }
account_id: string
bucket: string
external_id: string
region: string
role_arn: string
type: "aws"
AzureExternalStorageProvider object { account_name, container, region, 4 more }
account_name: string
container: string
region: string
resource_group: string
subscription_id: string
tenant_id: string
type: "azure"
GcpExternalStorageProvider object { audience, bucket, region, 4 more }
audience: string
bucket: string
region: string
type: "gcp"
workload_identity_pool_id: string
workload_identity_project_number: string
workload_identity_provider_id: string
Oci object { bucket, region, tenancy_ocid, type }
bucket: string
region: string
tenancy_ocid: string
type: "oci"
status: "pending" or "validated" or "unhealthy"
One of the following:
"pending"
"validated"
"unhealthy"

Create an external storage configuration

curl -X POST https://api.openai.com/v1/organization/external_storage \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_abc123",
    "provider": {
      "type": "aws",
      "bucket": "customer-logs",
      "role_arn": "arn:aws:iam::123456789012:role/OpenAIExternalStorageRole"
    }
  }'
{
  "object": "organization.external_storage",
  "id": "extstorage_abc123",
  "project_id": "proj_abc123",
  "provider": {
    "type": "aws",
    "account_id": "123456789012",
    "region": "us-east-1",
    "bucket": "customer-logs",
    "role_arn": "arn:aws:iam::123456789012:role/OpenAIExternalStorageRole",
    "external_id": "proj_abc123"
  },
  "geography": "US",
  "status": "pending",
  "created_at": 1711471533
}

Create an external storage configuration

curl -X POST https://api.openai.com/v1/organization/external_storage \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_azure123",
    "provider": {
      "type": "azure",
      "tenant_id": "11111111-1111-1111-1111-111111111111",
      "subscription_id": "22222222-2222-2222-2222-222222222222",
      "resource_group": "customer-rg",
      "account_name": "customerstorage",
      "container": "openai-data"
    }
  }'
{
  "object": "organization.external_storage",
  "id": "extstorage_azure123",
  "project_id": "proj_azure123",
  "provider": {
    "type": "azure",
    "tenant_id": "11111111-1111-1111-1111-111111111111",
    "subscription_id": "22222222-2222-2222-2222-222222222222",
    "resource_group": "customer-rg",
    "account_name": "customerstorage",
    "container": "openai-data",
    "region": "eastus"
  },
  "geography": "US",
  "status": "pending",
  "created_at": 1711471533
}

Create an external storage configuration

curl -X POST https://api.openai.com/v1/organization/external_storage \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_gcp123",
    "provider": {
      "type": "gcp",
      "bucket": "customer-gcp-retention",
      "workload_identity_project_number": "123456789012",
      "workload_identity_pool_id": "customer-pool",
      "workload_identity_provider_id": "customer-provider"
    }
  }'
{
  "object": "organization.external_storage",
  "id": "extstorage_gcp123",
  "project_id": "proj_gcp123",
  "provider": {
    "type": "gcp",
    "bucket": "customer-gcp-retention",
    "workload_identity_project_number": "123456789012",
    "workload_identity_pool_id": "customer-pool",
    "workload_identity_provider_id": "customer-provider",
    "region": "us-central1",
    "audience": "proj_gcp123"
  },
  "geography": "US",
  "status": "pending",
  "created_at": 1711471400
}
Returns Examples
{
  "id": "id",
  "created_at": 0,
  "geography": "geography",
  "object": "organization.external_storage",
  "project_id": "project_id",
  "provider": {
    "account_id": "account_id",
    "bucket": "bucket",
    "external_id": "external_id",
    "region": "region",
    "role_arn": "role_arn",
    "type": "aws"
  },
  "status": "pending"
}