Skip to content

storage create

Creates a new Remote Storage Provider Connection.

flexai storage create <storage_provider_connection_name>
[( --provider --access-key-id --endpoint --secret-access-key-name )]
[( --provider gcs --service-account-file-name )]
[( --provider s3 --region <region> )]
[( --provider huggingface --hf-token-name <hf_token_name> )]

The name that will be used to identify the Storage Provider Connection while performing operations on it.

Examples
  • s3-prod_conn
  • hf-source-conn
  • gcs-storage-dev
Optional
UUID

S3-compatible storage Access Key ID.

Examples
  • --access-key-id AKIAIOSFODNN7AAF89GU
--endpoint
<string>
Optional
URL

S3-compatible storage endpoint.

Only required when using the s3 provider.

Examples
  • --endpoint s3.us-east-2.amazonaws.com
  • --endpoint https://s3.us-west-004.backblazeb2.com
-h , --help
<boolean>
Optional
Flag

Displays this help page.

Optional

Name of the FlexAI Secret containing the Hugging Face Access token.

How to create a Hugging Face token

To create a Hugging Face Access Token, follow these steps:

  1. Go to your Hugging Face account settings. Confirm your identity if requested by entering your credentials.
  2. Select the "+ Create new token" button.
  3. Set the "Token type" to Read.
  4. Enter a name for your token in the "Token name" field.
  5. Select the "Create token" button.
  6. A "Save your Access Token" prompt will appear. Copy the generated token.

We recommend you keep the "Save your Access Token" prompt open until you've securely stored your token as a FlexAI Secret, as you won't be able to view it again.

Create a FlexAI Secret for your Hugging Face Access Token

To securely store your Hugging Face Access Token, you need to create a FlexAI Secret. Follow the instructions below based on your preferred method:

  1. Create a Secret by using the flexai secret create command, which will receive the name of the secret as its only argument. In this case we will use hf_token to store a Hugging Face Access Token.

    Terminal window
    flexai secret create hf_token
  2. You will be prompted to enter the value for the secret. You can either type in the value directly or paste it. In any case, the value will not be displayed in the terminal.

    Terminal window
    flexai secret create hf_token
    Secret Value: █
-p , --provider
<option_list>
Optional
Option list

Storage provider to use for this connection. One of:

  • s3 (Amazon S3 and compatible services)
  • gcs (Google Cloud Storage)
  • huggingface (Hugging Face Hub)
  • minio (MinIO)
  • r2 (Cloudflare R2)
Examples
  • --provider s3
  • --provider gcs
  • --provider huggingface
--region
<string>
Optional
String

S3-compatible storage Region where the target Storage Bucket is located.

Only required when using the s3 provider.

Optional

Name of the FlexAI Secret (See flexai secret list) containing the S3-compatible storage Secret Access Key.

Examples
  • --secret-access-key-name aws-secret-access-key-eu
  • --secret-access-key-name SAK_AWS_2
Optional
Flag

Creates a new Remote Storage Provider Connection.