cimeika-api / openapi.yaml
Ihorog's picture
Update openapi.yaml
d8602ad verified
openapi: 3.1.0
info:
title: Cimeika API
version: "2.1.0"
description: >
Cimeika — це багатоперсональний AI-додаток з координацією через центральну персону CI.
Ви можете взаємодіяти з CI, ПоДія, Настрій, Маля та іншими персонами.
servers:
- url: https://ihorog-cimeika-api.hf.space
paths:
/:
get:
summary: Головна сторінка
responses:
'200':
description: Загальна інформація про систему
content:
application/json:
schema:
$ref: '#/components/schemas/SystemStatus'
/health:
get:
summary: Перевірка стану системи
responses:
'200':
description: Поточний стан API та інтеграцій
content:
application/json:
schema:
$ref: '#/components/schemas/HealthCheck'
/api/personas:
get:
summary: Отримати всі AI-персони
responses:
'200':
description: Перелік доступних персон
content:
application/json:
schema:
$ref: '#/components/schemas/PersonasList'
/api/chat:
post:
summary: Надіслати повідомлення до AI-персони
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [message]
properties:
message:
type: string
example: "Привіт"
persona:
type: string
example: "ci"
responses:
'200':
description: Відповідь від AI
content:
application/json:
schema:
$ref: '#/components/schemas/ChatResponse'
/api/transform:
post:
summary: Змінити активну персону
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
persona:
type: string
example: "podiya"
context:
type: string
example: "планування події"
responses:
'200':
description: Результат трансформації
content:
application/json:
schema:
$ref: '#/components/schemas/TransformResponse'
/api/metrics:
get:
summary: Метрики системи
responses:
'200':
description: Детальна статистика
content:
application/json:
schema:
$ref: '#/components/schemas/SystemMetrics'
components:
schemas:
SystemStatus:
type: object
properties:
name: { type: string }
description: { type: string }
status: { type: string }
version: { type: string }
uptime: { type: string }
interactions: { type: integer }
active_persona: { type: string }
session_id: { type: string }
timestamp: { type: string, format: date-time }
HealthCheck:
type: object
properties:
status: { type: string }
version: { type: string }
uptime: { type: string }
error_count: { type: integer }
error_rate: { type: string }
avg_response_time: { type: string }
current_persona: { type: string }
system_health:
type: object
properties:
database: { type: string }
redis: { type: string }
openai_api: { type: string }
PersonasList:
type: object
properties:
current_persona: { type: string }
total_personas: { type: integer }
operational_count: { type: integer }
personas:
type: object
additionalProperties:
type: object
properties:
name: { type: string }
role: { type: string }
status: { type: string }
capabilities:
type: array
items: { type: string }
integrations:
type: array
items: { type: string }
priority: { type: string }
interaction_count: { type: integer }
last_interaction: { type: string, nullable: true }
ChatResponse:
type: object
properties:
status: { type: string }
response: { type: string }
active_persona: { type: string }
persona_name: { type: string }
persona_status: { type: string }
interaction_id: { type: integer }
session_id: { type: string }
timestamp: { type: string, format: date-time }
TransformResponse:
type: object
properties:
status: { type: string }
transformation: { type: string }
previous_persona: { type: string }
active_persona: { type: string }
timestamp: { type: string, format: date-time }
SystemMetrics:
type: object
properties:
performance:
type: object
properties:
total_interactions: { type: integer }
error_count: { type: integer }
error_rate: { type: string }
avg_response_time: { type: string }
uptime: { type: string }
persona_usage:
type: object
additionalProperties:
type: integer
current_persona: { type: string }
transformation_count: { type: integer }
session_id: { type: string }
timestamp: { type: string, format: date-time }