Models
Returns the list of models available to the current credential.
- Manual API key: returns models from the key's bound group
- OAuth token +
?groups=all: returns an aggregated list across all authorized groups
Endpoint
http
GET https://api.sakrylle.com/v1/modelsHeaders
| Name | Required | Description |
|---|---|---|
Authorization | Yes | Bearer sk-xxxxxxxxxxxxxxxx or Bearer sk_oauth_xxxxxxxxxxxxxxxx |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groups | string | No | Set to all to return an aggregated model list across all authorized groups; only effective for OAuth tokens |
Standard response fields
| Field | Type | Description |
|---|---|---|
object | string | Always list |
data | array | Model array |
data[].id | string | Model ID used in requests |
data[].object | string | Always model |
data[].type | string | Always model |
data[].display_name | string | Display label; usually the model name |
data[].owned_by | string | Platform identifier such as openai, anthropic, or google |
data[].created | integer | Placeholder timestamp |
data[].created_at | string | Placeholder RFC3339 timestamp |
data[].allow_image_generation | boolean | Returned only for OpenAI-platform groups; indicates whether image-generation-related capability is allowed for that group |
Response example
json
{
"object": "list",
"data": [
{
"id": "gpt-5.6-sol",
"object": "model",
"type": "model",
"display_name": "gpt-5.6-sol",
"owned_by": "openai",
"created": 1704067200,
"created_at": "2024-01-01T00:00:00Z",
"allow_image_generation": true
},
{
"id": "codex-auto-review",
"object": "model",
"type": "model",
"display_name": "codex-auto-review",
"owned_by": "openai",
"created": 1704067200,
"created_at": "2024-01-01T00:00:00Z",
"allow_image_generation": true
}
]
}OAuth models
With GET /v1/models?groups=all, data[].id becomes a numeric group-prefixed routing ID:
text
<group_id>:<model>Example:
json
{
"object": "list",
"data": [
{
"id": "3:gpt-5.6-sol",
"object": "model",
"type": "model",
"display_name": "gpt-5.6-sol",
"owned_by": "openai",
"created": 1704067200,
"created_at": "2024-01-01T00:00:00Z",
"allow_image_generation": true,
"group": {
"id": 3,
"name": "GPT-Pro",
"rate_multiplier": 0.5
}
}
]
}Extra fields
| Field | Type | Description |
|---|---|---|
data[].id | string | <group_id>:<model>; can be sent back directly as the next request's model |
data[].group | object | Owning group metadata |
data[].group.id | integer | Numeric group ID |
data[].group.name | string | Group name |
data[].group.rate_multiplier | number | Group multiplier |
data[].allow_image_generation | boolean | Returned only for OpenAI-platform groups |
TIP
If you are calling across multiple groups with a single OAuth token:
- Call
/v1/models?groups=all - Reuse the returned
data[].idverbatim
Do not invent string aliases for the group prefix.
Notes
- Manual API keys ignore
?groups=all allow_image_generationis a capability hint, not a guarantee that image models exist; the actualdata[].idlist is the source of truthcreated/created_atare compatibility fields and do not represent real model release dates
Errors
401 authentication_error— authentication failed
Code samples
bash
curl https://api.sakrylle.com/v1/models \
-H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx"python
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxxxxxxxxxxxx",
base_url="https://api.sakrylle.com/v1",
)
models = client.models.list()
for m in models.data:
print(m.id, m.owned_by)javascript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk-xxxxxxxxxxxxxxxx",
baseURL: "https://api.sakrylle.com/v1",
});
const models = await client.models.list();
for (const m of models.data) {
console.log(m.id, m.owned_by);
}go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET",
"https://api.sakrylle.com/v1/models", nil)
req.Header.Set("Authorization", "Bearer sk-xxxxxxxxxxxxxxxx")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
}rust
use reqwest::Client;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = Client::new();
let resp: serde_json::Value = client
.get("https://api.sakrylle.com/v1/models")
.bearer_auth("sk-xxxxxxxxxxxxxxxx")
.send()
.await?
.json()
.await?;
println!("{resp:#}");
Ok(())
}java
import java.net.URI;
import java.net.http.*;
public class Models {
public static void main(String[] args) throws Exception {
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.sakrylle.com/v1/models"))
.header("Authorization", "Bearer sk-xxxxxxxxxxxxxxxx")
.GET()
.build();
HttpResponse<String> resp = HttpClient.newHttpClient()
.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(resp.body());
}
}csharp
using System.Net.Http.Headers;
var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "sk-xxxxxxxxxxxxxxxx");
var resp = await http.GetAsync("https://api.sakrylle.com/v1/models");
Console.WriteLine(await resp.Content.ReadAsStringAsync());