Skip to main content
SONZAI
Api

Custom L L M

Get custom LLM config for a project

GET
/projects/{projectId}/custom-llm
AuthorizationBearer <token>

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

In: header

Path Parameters

projectId*string

Project UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/custom-llm"
{
  "$schema": "/api/v1/schemas/CustomLLMConfigResponse.json",
  "api_key_prefix": "string",
  "configured": true,
  "display_name": "string",
  "endpoint": "string",
  "is_active": true,
  "model": "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"
}

Delete custom LLM config

DELETE
/projects/{projectId}/custom-llm
AuthorizationBearer <token>

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

In: header

Path Parameters

projectId*string

Project UUID

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/projects/string/custom-llm"
Empty
{
  "$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"
}

Set custom LLM config for a project

PUT
/projects/{projectId}/custom-llm
AuthorizationBearer <token>

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

In: header

Path Parameters

projectId*string

Project UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PUT "https://loading/api/v1/projects/string/custom-llm" \  -H "Content-Type: application/json" \  -d '{    "api_key": "string",    "endpoint": "string"  }'
{
  "$schema": "/api/v1/schemas/CustomLLMConfigResponse.json",
  "api_key_prefix": "string",
  "configured": true,
  "display_name": "string",
  "endpoint": "string",
  "is_active": true,
  "model": "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"
}