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
- An active Datature Vi organization
- Admin or appropriate permissions to create secret keys
- Understanding of API authentication concepts
- A secure location to store credentials (environment variables, secrets manager)
Security firstSecret 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
Authenticate API requests from scripts, applications, and automated workflows
Configure permissions for datasets, training, and deployment resources
Monitor when keys were last used to identify inactive credentials
Create separate keys for different environments and applications
When to use secret keys
Use secret keys for programmatic interactions with Datature Vi:
| Use case | Description |
|---|---|
| SDK integration | Authenticate Vi SDK clients in Python applications |
| Automated workflows | Schedule data uploads, training runs, and model deployments |
| CI/CD pipelines | Integrate model training and testing into continuous delivery |
| Data pipelines | Automate dataset creation and annotation uploads |
| Custom tools | Build internal tools and dashboards on top of Vi APIs |
| Batch processing | Process large volumes of images through trained models |
Managing secret keys
Generate new API keys with configurable access and permissions
Revoke and remove unused or compromised 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:
| Environment | Recommended rotation |
|---|---|
| Production | Every 90 days |
| Staging | Every 180 days |
| Development | As needed |
| CI/CD | Every 90 days |
Monitor key usage
Regularly audit your secret keys:
- Check the "Last Used" column in the Secret Keys table
- Identify inactive keys that haven't been used recently
- Delete unused keys to reduce potential security exposure
- Investigate unexpected usage patterns
If a key is compromisedTake immediate action if you suspect a key has been exposed:
- Delete the compromised key immediately
- Create a new key with the same or updated permissions
- Update all applications that were using the old key
- Review recent activity to check for unauthorized access
- 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}")Common operations
Quick reference for key management:
| Task | Documentation |
|---|---|
| Create a new key | Create a secret key → |
| Remove a key | Delete a secret key → |
| Use with SDK | Vi SDK getting started → |
| Check SDK documentation | Vi 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:
- On the Secret Keys page when creating keys
- In the Vi SDK client initialization examples
- On the Resource Usage page
- In your organization settings
Next steps
Generate an API key to start using the Vi SDK
Learn how to automate workflows with Python
Browse SDK documentation and API resources
Set up the Vi SDK in your environment
Manage organization members and permissions
Monitor API usage and quotas
Related resources
- Create a secret key — Generate new API keys for authentication
- Delete a secret key — Revoke unused keys to maintain security
- Vi SDK getting started — Start using the Vi SDK with your keys
- Vi SDK installation — Install and configure the SDK
- API resources — Complete SDK reference documentation
- Team settings — Manage organization access and members
- Resource usage — Monitor quotas and API consumption
- Rename organization — Update organization settings
- Run inference — Use your keys for model inference
Need help?
We're here to support your VLMOps journey. Reach out through any of these channels:
Updated about 1 month ago
