Overview
Retrieve the current per-user add-on credit cap configuration for your organization. Caps are always per-user. When you query by team or group scope, the response returns the per-user cap that has been applied to users within that team or group.
Request
Your service key with “Billing Read” permissions
Scope Configuration (Choose One)
Set to true to retrieve the per-user cap applied to all users on the team
Retrieve the per-user cap applied to all users in a specific group by providing the group ID
Retrieve the configuration for a specific user by providing their email address
You must provide one of team_level, group_id, or user_email to define the scope.
Example Request - Get Per-User Cap for All Users on Team
curl -X POST --header "Content-Type: application/json" \
--data '{
"service_key": "your_service_key_here",
"team_level": true
}' \
https://server.codeium.com/api/v1/GetUsageConfig
Example Request - Get Per-User Cap for All Users in a Group
curl -X POST --header "Content-Type: application/json" \
--data '{
"service_key": "your_service_key_here",
"group_id": "engineering_team"
}' \
https://server.codeium.com/api/v1/GetUsageConfig
Example Request - Get User Configuration
curl -X POST --header "Content-Type: application/json" \
--data '{
"service_key": "your_service_key_here",
"user_email": "user@example.com"
}' \
https://server.codeium.com/api/v1/GetUsageConfig
Response
The configured add-on credit cap value. If this field is not present in the response, there is no cap configured at the requested scope level.
{
"add_on_credit_cap": 10000
}
Error Responses
Common error scenarios:
- Invalid service key or insufficient permissions
- Multiple scope parameters provided
- No scope parameter provided
- Invalid group ID or user email
- Rate limit exceeded