Together AI uses API keys to authenticate requests. Keys are scoped to projects, meaning a key only has access to the resources within its project.Documentation Index
Fetch the complete documentation index at: https://docs.together.ai/llms.txt
Use this file to discover all available pages before exploring further.
Multi-project key scoping is in early access. Not all resources and APIs fully support project-scoped keys yet. See Early access limitations for details.
Create an API key
Create independent API keys for separate use cases, systems, or workloads. For example, one for production, one for development, one for CI/CD, and one for inference.Open API key settings
Go to the project’s API keys settings.
Create the key
Click Create API Key, give it a name and an optional expiration date, then click Create.
Best practices
- Name your keys descriptively (for example,
prod-inference,ci-pipeline,dev-local) so you can identify and rotate them easily. - Set expiration dates for keys used in temporary or testing contexts. To set the expiration date, click the three-dot menu next to the key and select Set expiration.
- Rotate keys regularly and revoke any that are no longer in use.
- Never commit keys to source control. Use environment variables or a secrets manager.
Authenticate a request
Include your API key in theAuthorization header of every API request:
Project key scoping
API keys are scoped to projects:- A key created in project A can only access resources in project A.
- Keys persist even if the collaborator who created them is removed from the project.
- Both project admins and member-role collaborators can create and revoke keys.
Project key scoping is in early access. Not all resources and APIs fully support this feature yet. Keys created before multi-project support was enabled are scoped to your organization’s default project.
Playground
The Together AI playground recognizes all API keys associated with your account. When you use the playground, it shows available models across all your keys and projects.Cost analytics and usage
Use API key IDs to segment usage and cost by key and workload. Theapi_key_id field is supported for inference and code interpreter requests, so you can track which keys are driving spend in your project’s cost analytics.
Limitations
No per-key usage limits: You can’t cap spend or rate-limit individual API keys. Usage limits apply at the organization level.Legacy API keys
Your organization may have a legacy API key scoped to its default project. Only the organization owner can access and manage it, in organization settings under Manage Account. Legacy keys are deprecated, and you should avoid using them in production. These keys can’t be scoped to a specific project or workload, and can’t be revoked (only regenerated if compromised). Use project-scoped API keys instead.Related resources
Projects
Understand how API keys are scoped to projects.
Roles and permissions
See who can create and manage API keys.