Skip to main content
POST
https://server.codeium.com
/
api
/
v1
/
GetUsageConfig
Get Usage Configuration
curl --request POST \
  --url https://server.codeium.com/api/v1/GetUsageConfig \
  --header 'Content-Type: application/json' \
  --data '
{
  "service_key": "<string>",
  "team_level": true,
  "group_id": "<string>",
  "user_email": "<string>"
}
'
{
  "add_on_credit_cap": 123
}

Overview

Retrieve the current add-on credit cap configuration for your organization. You can query configurations at the team level, for specific groups, or for individual users.

Request

service_key
string
required
Your service key with appropriate permissions

Scope Configuration (Choose One)

team_level
boolean
Set to true to retrieve the configuration at the team level
group_id
string
Retrieve the configuration for a specific group by providing the group ID
user_email
string
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 Team-Level Configuration

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 Group Configuration

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": "[email protected]"
}' \
https://server.codeium.com/api/v1/GetUsageConfig

Response

add_on_credit_cap
integer
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.

Example Response - With Cap Configured

{
  "add_on_credit_cap": 10000
}

Example Response - No Cap Configured

{}

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