Secret Keys

Manage API authentication credentials for programmatic access to Datature Vi.

Secret keys are API credentials that authenticate your applications and scripts with Datature Vi. They enable programmatic access to your organization's resources through the Vi SDK, allowing you to automate workflows, integrate with external systems, and build custom applications.

📋

Prerequisites

Learn how to create a secret key →

🔐

Security first

Secret keys provide full access to your organization's resources. Treat them like passwords:

  • Never commit keys to version control or expose them in client-side code
  • Store keys securely in environment variables or credential managers
  • Rotate keys regularly to minimize security risks
  • Delete unused keys immediately to reduce your attack surface

What are secret keys?

Secret keys are authentication tokens that identify and authorize your application when making API requests to Datature Vi. Each key is associated with your organization and can be configured with specific access permissions.

Key features

Programmatic access

Authenticate API requests from scripts, applications, and automated workflows

Access control

Configure permissions for datasets, training, and deployment resources

Usage tracking

Monitor when keys were last used to identify inactive credentials

Multiple keys

Create separate keys for different environments and applications


When to use secret keys

Use secret keys for programmatic interactions with Datature Vi:

Use caseDescription
SDK integrationAuthenticate Vi SDK clients in Python applications
Automated workflowsSchedule data uploads, training runs, and model deployments
CI/CD pipelinesIntegrate model training and testing into continuous delivery
Data pipelinesAutomate dataset creation and annotation uploads
Custom toolsBuild internal tools and dashboards on top of Vi APIs
Batch processingProcess large volumes of images through trained models

Managing secret keys


Security best practices

Follow these guidelines to keep your API credentials secure:

Store credentials securely

Don't do this:

# Never hardcode keys in source code
client = vi.Client(
    secret_key="dtvi_MDl1MDUzOGt1Ym...",  # ⚠️ Security risk!
    organization_id="org-123"
)

Do this instead:

# Use environment variables
import os
import vi

client = vi.Client(
    secret_key=os.getenv("DATATURE_VI_SECRET_KEY"),
    organization_id=os.getenv("DATATURE_VI_ORGANIZATION_ID")
)

Separate keys by environment

Create different keys for each environment:

  • Production — Full permissions for live systems
  • Staging — Full permissions for pre-production testing
  • Development — Read-only or restricted access for local development
  • CI/CD — Minimal required permissions for automated testing

Regular key rotation

Implement a rotation schedule to minimize risk:

EnvironmentRecommended rotation
ProductionEvery 90 days
StagingEvery 180 days
DevelopmentAs needed
CI/CDEvery 90 days

Monitor key usage

Regularly audit your secret keys:

  1. Check the "Last Used" column in the Secret Keys table
  2. Identify inactive keys that haven't been used recently
  3. Delete unused keys to reduce potential security exposure
  4. Investigate unexpected usage patterns
⚠️

If a key is compromised

Take immediate action if you suspect a key has been exposed:

  1. Delete the compromised key immediately
  2. Create a new key with the same or updated permissions
  3. Update all applications that were using the old key
  4. Review recent activity to check for unauthorized access
  5. Notify your team and security contacts

Access control

Configure what resources each key can access:

Access scope

Control which resource categories the key can access:

  • Dataset Access — View, create, and modify datasets and annotations
  • Training Access — Create workflows, start runs, and download models
  • Deployment Access — Deploy models and run inference
🔧

Note: Advanced access control features may not be available for all organizations. Contact your account manager to explore granular permission settings.

Permission levels

Set the level of access the key provides:

  • Full — Complete read and write access to authorized resources
  • Read Only — View data and model information without modifications
  • Labeler Only — Create and modify annotations only
  • Restricted — Custom limited access based on organizational needs

Getting started with the Vi SDK

Once you've created a secret key, use it to authenticate with the Vi SDK.

Initialize and use the Vi SDK
import vi

# Initialize the client
client = vi.Client(
    secret_key="your-secret-key-here",
    organization_id="your-organization-id-here"
)

# Verify connection
print(f"Connected to organization: {client.organizations.id}")

# Start using the SDK
for dataset in client.datasets:
    print(f"Dataset: {dataset.name}")

Learn more about the Vi SDK →


Common operations

Quick reference for key management:

TaskDocumentation
Create a new keyCreate a secret key →
Remove a keyDelete a secret key →
Use with SDKVi SDK getting started →
Check SDK documentationVi SDK API reference →

Troubleshooting

API requests fail with authentication error

Potential causes:

  • Invalid secret key
  • Expired or deleted key
  • Key not copied correctly
  • Missing organization ID

Solutions:

  • Verify you've copied the full key without extra spaces
  • Check if the key still exists on the Secret Keys page
  • Ensure organization ID is correct
  • Create a new key if the old one was deleted
How do I find my organization ID?

Your organization ID is displayed:


Next steps


Related resources