Query model levels and new models, and manage their visibility in the organization by group.
The model catalog is maintained by Qoder. Use Model APIs to query the levels and new models in each scenario, set their visibility in your organization by group, and set the default visibility of models released in the future.
Complete Get API Key and review OpenAPI Conventions before calling these endpoints.
Every level and new model has a
A user matches the list if they belong to any group in it.
Entries do not include
When
The server validates the entire batch first. If any entry fails, it returns
If the organization has never set this value,
Returns
Changing this value does not retroactively affect targets that have already been released, and does not overwrite existing policies. After switching from
Errors use the standard response shape described in OpenAPI Conventions, except for the
For rate limiting (
Applicable plans: Enterprise.
Requirements
- Send
Authorization: Bearer <api_key>. Only Organization API Keys are supported; personal credentials and service account credentials are not. - Send
Content-Type: application/jsonfor requests with a JSON body. - Use the organization bound to the API key as
organization_id. - Use group IDs in
groupIds. Both manually managed groups and SCIM groups are supported.
Key behavior
- Models are organized by scenario (
scenarioType):general(general coding),experts(Experts), andqoderwork(QoderWork). Each scenario contains two kinds of targets whose visibility can be set independently: levels (level, for exampleautoorultimate) and new models (modelKey). - The levels and new models you can manage are those returned by List models. They vary by region and change as the model catalog is released. Do not hard-code
levelormodelKeyvalues. - Targets your organization has never configured are treated as
all. The exception is targets first released after new-model default visibility was turned off; see Update new model default visibility. - Deleting a group removes it from every list but does not change
scope. Once a list becomes empty, agrouptarget is hidden from the entire organization. Queries then return the originalscopewith emptygroupIds. - These APIs return the policies configured for your organization, not the models a specific user can ultimately see.
Visibility
Every level and new model has a scope. When a user requests the model list, the server evaluates visibility based on the user's groups:
scope | groupIds | Members of listed groups | Other members (including those in no group) |
|---|---|---|---|
all | Must be empty | Visible | Visible |
group | At least 1 entry | Visible | Hidden |
none | Must be empty | Hidden | Hidden |
Data models
Scenario
| Field | Type | Description |
|---|---|---|
scenarioType | string | Scenario type |
levels | array of ModelPolicy | Levels in catalog order; [] when there are none |
newModels | array of ModelPolicy | New models; [] when there are none |
ModelPolicy
| Field | Type | Description |
|---|---|---|
level | string | Level identifier; present only in levels entries |
modelKey | string | New model identifier; present only in newModels entries |
displayName | string | Display name, for display only; may differ from the name shown in the client model list |
scope | string | Current visibility: all, group, or none |
groupIds | array of strings | IDs of listed groups, in no guaranteed order; [] for all and none |
scenarioType; the scenario is determined by the enclosing Scenario.
API reference
List models
GET /v1/organizations/{organization_id}/official-models
| Query parameter | Type | Required | Description |
|---|---|---|---|
scenarioType | string | No | Return only the specified scenario: general, experts, or qoderwork; omit to return all scenarios |
Success response (200 OK)
scenarioType is omitted, scenarios always contains three entries in the order general, experts, qoderwork.
An invalid scenarioType returns 400, but the response body is {"error": "invalid scenarioType: must be one of general/experts/qoderwork"} and contains neither requestId nor code. Detect this error by its HTTP status code.
Batch update model policies
PUT /v1/organizations/{organization_id}/official-models/policy
Updates the visibility of the levels or new models listed in the request; targets not listed remain unchanged. For each listed target, its scope and list are replaced entirely by the request content.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
policies | array of objects | Yes | 1–100 entries |
policies[].scenarioType | string | Yes | general, experts, or qoderwork |
policies[].level | string | Conditional | Level identifier; provide exactly one of level and modelKey |
policies[].modelKey | string | Conditional | New model identifier; provide exactly one of level and modelKey |
policies[].scope | string | Yes | all, group, or none |
policies[].groupIds | array of strings | Conditional | At least 1 entry for group; omit or pass [] for all and none |
levelormodelKeymust exist in the corresponding scenario returned by List models.- The same target must not appear more than once in a request.
- String fields are trimmed of leading and trailing whitespace. Empty strings in
groupIdsare dropped and duplicates are removed before validation. Every group must belong to the current organization. - Each entry accepts only the 5 fields above. When copying entries from the list response, remove
displayNameand addscenarioType.
200 OK on success. The policies in the response follow the request order. Each entry contains scenarioType, level or modelKey, scope, and the deduplicated groupIds, without displayName.
400 BadRequest and writes nothing. Writes after validation are not a single transaction: if the request returns 5xx or times out, some targets may already have taken effect. Because each target is replaced entirely, resubmitting the same request produces the same result. Before retrying, call List models to check the current state.
Get new model default visibility
GET /v1/organizations/{organization_id}/official-models/new-model-default
Success response (200 OK)
defaultVisible is true.
Update new model default visibility
PUT /v1/organizations/{organization_id}/official-models/new-model-default
Sets whether levels and new models released in the future are visible to your organization by default.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
defaultVisible | boolean | Yes | Whether newly released targets are visible by default |
200 OK with the updated value on success, using the same structure as Get new model default visibility.
The platform reads this value each time it releases the model catalog, and applies it only to levels and new models that appear for the first time in that release:
defaultVisible | Handling of newly released targets |
|---|---|
true | No policy is written; the target is visible to the entire organization as all |
false | scope: "none" is written for your organization; the target is hidden from the entire organization |
false back to true, targets previously written as none remain hidden; change them explicitly with Batch update model policies.
Errors
Errors use the standard response shape described in OpenAPI Conventions, except for the scenarioType parameter error described in List models.
| HTTP status | Error code | Typical cause |
|---|---|---|
| 400 | BadRequest | Malformed request body; scenario, level, or new model does not exist; scope and groupIds do not match; group does not belong to the current organization; duplicate target |
| 401 | Unauthorized | API key is missing, invalid, expired, or revoked |
| 403 | Forbidden | API key does not belong to the target organization, or is not an Organization API Key |
| 403 | OrganizationPlanCapabilityForbidden | The organization does not have the Model Policy capability |
| 404 | NotFound | Request path does not exist |
429) and server errors (5xx), retry with backoff as described in OpenAPI Conventions.
