Skip to main content
SONZAI
Api

Models

List available models for an agent

GET
/agents/{agentId}/models
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

agentId*string

Agent UUID or URL-encoded agent name

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/agents/string/models"
{
  "$schema": "/api/v1/schemas/GetAgentModelsOutputBody.json",
  "default_model": "string",
  "default_provider": "string",
  "providers": [
    {
      "default_model": "string",
      "provider": "string",
      "provider_name": "string"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

List LLM providers and model variants

GET
/models
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/models"
{
  "$schema": "/api/v1/schemas/CachedModelsPayload.json",
  "default_model": "string",
  "providers": [
    null
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}