What are API Keys?
API keys are project-scoped credentials that authenticate requests to Daft Cloud inference endpoints and track usage.What API Keys Do
- Authenticate requests to Daft Cloud model inference endpoints
- Track usage and costs per key
- Enable access control with separate keys for different applications
Creating an API Key
- Navigate to API Keys in your project sidebar
- Click Create API key
- Enter a descriptive name (e.g.,
development,production-app) - Click Create
- Copy the key immediately - it will only be shown once
Key Format
API keys follow this format:sk-... (the full key is only shown once upon creation).
After creation, you’ll only see a hint like sk-...Ac4A for identification. API keys are not stored and cannot be retrieved—if you lose your key, you’ll need to create a new one.
Managing Keys
- Default key: Set one key as default for the project
- Multiple keys: Create separate keys for different applications or environments
- Revocation: Delete keys that are no longer needed
Example Usage
Use your API key to access Daft Cloud models from your local machine:Usage Tracking
All inference calls made with your API key are tracked:- Token usage (input/output)
- Request counts
- Associated costs
Security Best Practices
- Never commit API keys to version control
- Use environment variables to store keys in your applications
- Rotate keys periodically for security
- Use separate keys for development and production
- Delete unused keys promptly