Overview
Lists the Anthropic-compatible models available to the project associated with the API key.
API details
Constraints
- You must have an API key. For more information, see Manage AI API keys.
Request path
GET https://ai-api-g.oceanbase.com/api/anthropic/v1/models
Request header
Name |
Required |
Example value |
Description |
|---|---|---|---|
| x-api-key | Yes | YOUR_API_KEY | Authentication information |
| anthropic-version | No | 2023-06-01 | Anthropic API version |
| Content-Type | No | application/json | Request body format |
Request parameters
Path
None
Query
None
Body
None
Response
Response parameters
Name |
Type |
Description |
|---|---|---|
| data | array[object] | Models available to the project associated with the API key. |
| first_id | string or null | The id of the first item in the data array. This parameter is null if the list is empty. |
| has_more | boolean | Indicates whether there are more results. |
| last_id | string or null | The id of the last item in the data array. This parameter is null if the list is empty. |
data
Each model object contains the following fields:
Name |
Type |
Description |
|---|---|---|
| type | string | Object type. The value is always model. |
| id | string | Unique identifier of the model. |
| display_name | string | Display name of the model. |
| created_at | string | Time when the model was created. |
Request example
curl -sS "https://ai-api-g.oceanbase.com/api/anthropic/v1/models" \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01"
Response example
Response with models
{
"data": [
{
"type": "model",
"id": "claude-sonnet-4-6",
"display_name": "Claude Sonnet 4.6",
"created_at": "2025-07-01T00:00:00Z"
}
],
"first_id": "claude-sonnet-4-6",
"has_more": false,
"last_id": "claude-sonnet-4-6"
}
Empty list response
{
"data": [],
"first_id": null,
"has_more": false,
"last_id": null
}
