API keys
Create a team API key
Creates a team API key with the provided name, type, and expiration.
POST
Use a credential authorized to create keys for the selected team, such as an API key management key. Set
Include every allowed model in
expires_at to a future timestamp within your organization’s limit. Omit it or pass null only when your organization allows keys without an expiration.
To create an inference key for a model, set BASETEN_API_KEY to your administrative credential. Replace <team-id> with the owning team’s ID, <model-id> with an allowed model, and <expires-at> with a permitted ISO 8601 timestamp, such as 2027-01-15T00:00:00Z. Include Z for UTC or an explicit offset. Run the following request:
model_ids. Omitting the field, setting it to null, or passing an empty list grants access to all team models. Copy the returned api_key immediately; you can’t retrieve it again.
For more information, see Key types and Key expiration.Authorizations
Body
application/json
Request to create an API key.
Expiration time in UTC. Must be in the future. Personal keys must expire within 90 days, or sooner if your organization sets a lower limit. Team and organization keys require an expiration within your organization's limit when one is set; otherwise they may omit it or use null. Organization lifetime limits do not apply to Grid keys.
Example:
"2027-01-01T00:00:00Z"