ZvenoAI
API Reference

Create Image Generation

POST
/v1/images

Синхронно генерирует изображения. stream=true отдаёт SSE image_generation.* events на том же route.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:8080/v1/images" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "prompt": "string",    "property1": null,    "property2": null  }'
{
  "created": 0,
  "data": [
    {
      "b64_json": "string",
      "media_type": "string"
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "total_tokens": 0,
    "cost": 0.1
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": 0,
    "message": "string",
    "metadata": {
      "property1": null,
      "property2": null
    }
  }
}

Chat Completions POST

Создает chat completion запрос к LLM-модели. Совместим с OpenAI Chat Completions API — можно использовать любой OpenAI SDK, указав `base_url: "https://api.zveno.ai/v1"`. Поддерживает: - Обычный и streaming (`stream: true`) режимы - Function calling / tool use - Vision (изображения в сообщениях) - Structured output (JSON schema, grammar) - Reasoning (extended thinking) - Мульти-модельный fallback (`models: [...]`) - Настройки выбора провайдера (`provider`) Модель указывается в формате `vendor/model` (например, `openai/gpt-4o`, `anthropic/claude-sonnet-4-20250514`). Аутентификация: `Authorization: Bearer <api-key>`.

Responses POST

Создает response запрос к LLM-модели через OpenAI Responses API. Совместим с OpenAI Responses API — можно использовать любой OpenAI SDK, указав `base_url: "https://api.zveno.ai/v1"`. Поддерживает: - Текстовый, массивный и multi-turn input - Обычный и streaming (`stream: true`) режимы - Function calling / tool use - Structured output (JSON schema) - Reasoning (extended thinking) - Multi-turn conversations (`previous_response_id`) - Мульти-модельный fallback (`models: [...]`) - Настройки выбора провайдера (`provider`) Модель указывается в формате `vendor/model` (например, `openai/gpt-4o`, `anthropic/claude-sonnet-4-20250514`). Аутентификация: `Authorization: Bearer <api-key>`.