Files
ai-service-front/openapi/openapi.json
2026-02-08 22:49:37 +03:00

2234 lines
78 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Assets API",
"version": "0.1.0"
},
"paths": {
"/api/auth/me": {
"get": {
"tags": [
"auth"
],
"summary": "Read Users Me",
"operationId": "read_users_me_api_auth_me_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/api__endpoints__auth__UserResponse"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/auth/register": {
"post": {
"tags": [
"auth"
],
"summary": "Register",
"operationId": "register_api_auth_register_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserRegister"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/auth/token": {
"post": {
"tags": [
"auth"
],
"summary": "Login For Access Token",
"operationId": "login_for_access_token_api_auth_token_post",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/Body_login_for_access_token_api_auth_token_post"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Token"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/admin/approvals": {
"get": {
"tags": [
"admin"
],
"summary": "List Pending Users",
"operationId": "list_pending_users_api_admin_approvals_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/UserResponse"
},
"type": "array",
"title": "Response List Pending Users Api Admin Approvals Get"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/admin/approve/{username}": {
"post": {
"tags": [
"admin"
],
"summary": "Approve User",
"operationId": "approve_user_api_admin_approve__username__post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Username"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/admin/deny/{username}": {
"post": {
"tags": [
"admin"
],
"summary": "Deny User",
"operationId": "deny_user_api_admin_deny__username__post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Username"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/assets/{asset_id}": {
"get": {
"tags": [
"Assets"
],
"summary": "Get Asset",
"operationId": "get_asset_api_assets__asset_id__get",
"parameters": [
{
"name": "asset_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Asset Id"
}
},
{
"name": "thumbnail",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": false,
"title": "Thumbnail"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"Assets"
],
"summary": "Delete Asset",
"operationId": "delete_asset_api_assets__asset_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "asset_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Asset Id"
}
}
],
"responses": {
"204": {
"description": "Successful Response"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/assets": {
"get": {
"tags": [
"Assets"
],
"summary": "Get Assets",
"operationId": "get_assets_api_assets_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Type"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 10,
"title": "Limit"
}
},
{
"name": "offset",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 0,
"title": "Offset"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssetsResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/assets/upload": {
"post": {
"tags": [
"Assets"
],
"summary": "Upload Asset",
"operationId": "upload_asset_api_assets_upload_post",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_upload_asset_api_assets_upload_post"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssetResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/assets/regenerate_thumbnails": {
"post": {
"tags": [
"Assets"
],
"summary": "Regenerate Thumbnails",
"description": "Regenerates thumbnails for all existing image assets that don't have one.",
"operationId": "regenerate_thumbnails_api_assets_regenerate_thumbnails_post",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/assets/migrate_to_minio": {
"post": {
"tags": [
"Assets"
],
"summary": "Migrate To Minio",
"description": "Migrates assets from MongoDB to MinIO.",
"operationId": "migrate_to_minio_api_assets_migrate_to_minio_post",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/characters/": {
"get": {
"tags": [
"Characters"
],
"summary": "Get Characters",
"operationId": "get_characters_api_characters__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/Character"
},
"type": "array",
"title": "Response Get Characters Api Characters Get"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/characters/{character_id}/assets": {
"get": {
"tags": [
"Characters"
],
"summary": "Get Character Assets",
"operationId": "get_character_assets_api_characters__character_id__assets_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "character_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Character Id"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 10,
"title": "Limit"
}
},
{
"name": "offset",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 0,
"title": "Offset"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssetsResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/characters/{character_id}": {
"get": {
"tags": [
"Characters"
],
"summary": "Get Character By Id",
"operationId": "get_character_by_id_api_characters__character_id__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "character_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Character Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Character"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/characters/{character_id}/_run": {
"post": {
"tags": [
"Characters"
],
"summary": "Post Character Generation",
"operationId": "post_character_generation_api_characters__character_id___run_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "character_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Character Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerationRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerationResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/generations/prompt-assistant": {
"post": {
"tags": [
"Generation"
],
"summary": "Ask Prompt Assistant",
"operationId": "ask_prompt_assistant_api_generations_prompt_assistant_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PromptRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PromptResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/generations/prompt-from-image": {
"post": {
"tags": [
"Generation"
],
"summary": "Prompt From Image",
"operationId": "prompt_from_image_api_generations_prompt_from_image_post",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_prompt_from_image_api_generations_prompt_from_image_post"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PromptResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/generations": {
"get": {
"tags": [
"Generation"
],
"summary": "Get Generations",
"operationId": "get_generations_api_generations_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "character_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Character Id"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 10,
"title": "Limit"
}
},
{
"name": "offset",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 0,
"title": "Offset"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerationsResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/generations/_run": {
"post": {
"tags": [
"Generation"
],
"summary": "Post Generation",
"operationId": "post_generation_api_generations__run_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerationResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/generations/{generation_id}": {
"get": {
"tags": [
"Generation"
],
"summary": "Get Generation",
"operationId": "get_generation_api_generations__generation_id__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "generation_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Generation Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerationResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"Generation"
],
"summary": "Delete Generation",
"operationId": "delete_generation_api_generations__generation_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "generation_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Generation Id"
}
}
],
"responses": {
"204": {
"description": "Successful Response"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/generations/running": {
"get": {
"tags": [
"Generation"
],
"summary": "Get Running Generations",
"operationId": "get_running_generations_api_generations_running_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/albums/": {
"post": {
"tags": [
"Albums"
],
"summary": "Create Album",
"operationId": "create_album_albums__post",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AlbumCreateRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AlbumResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"get": {
"tags": [
"Albums"
],
"summary": "Get Albums",
"operationId": "get_albums_albums__get",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 10,
"title": "Limit"
}
},
{
"name": "offset",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 0,
"title": "Offset"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AlbumResponse"
},
"title": "Response Get Albums Albums Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/albums/{album_id}": {
"get": {
"tags": [
"Albums"
],
"summary": "Get Album",
"operationId": "get_album_albums__album_id__get",
"parameters": [
{
"name": "album_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Album Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AlbumResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"put": {
"tags": [
"Albums"
],
"summary": "Update Album",
"operationId": "update_album_albums__album_id__put",
"parameters": [
{
"name": "album_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Album Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AlbumUpdateRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AlbumResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"Albums"
],
"summary": "Delete Album",
"operationId": "delete_album_albums__album_id__delete",
"parameters": [
{
"name": "album_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Album Id"
}
}
],
"responses": {
"204": {
"description": "Successful Response"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/albums/{album_id}/generations/{generation_id}": {
"post": {
"tags": [
"Albums"
],
"summary": "Add Generation To Album",
"operationId": "add_generation_to_album_albums__album_id__generations__generation_id__post",
"parameters": [
{
"name": "album_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Album Id"
}
},
{
"name": "generation_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Generation Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"Albums"
],
"summary": "Remove Generation From Album",
"operationId": "remove_generation_from_album_albums__album_id__generations__generation_id__delete",
"parameters": [
{
"name": "album_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Album Id"
}
},
{
"name": "generation_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Generation Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/albums/{album_id}/generations": {
"get": {
"tags": [
"Albums"
],
"summary": "Get Album Generations",
"operationId": "get_album_generations_albums__album_id__generations_get",
"parameters": [
{
"name": "album_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Album Id"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 10,
"title": "Limit"
}
},
{
"name": "offset",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 0,
"title": "Offset"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GenerationResponse"
},
"title": "Response Get Album Generations Albums Album Id Generations Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"AlbumCreateRequest": {
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
}
},
"type": "object",
"required": [
"name"
],
"title": "AlbumCreateRequest"
},
"AlbumResponse": {
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"generation_ids": {
"items": {
"type": "string"
},
"type": "array",
"title": "Generation Ids",
"default": []
}
},
"type": "object",
"required": [
"id",
"name"
],
"title": "AlbumResponse"
},
"AlbumUpdateRequest": {
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
}
},
"type": "object",
"title": "AlbumUpdateRequest"
},
"AspectRatios": {
"type": "string",
"enum": [
"NINESIXTEEN",
"SIXTEENNINE",
"THREEFOUR",
"FOURTHREE"
],
"title": "AspectRatios"
},
"AssetResponse": {
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"name": {
"type": "string",
"title": "Name"
},
"type": {
"type": "string",
"title": "Type"
},
"content_type": {
"type": "string",
"title": "Content Type"
},
"linked_char_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Linked Char Id"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Url"
}
},
"type": "object",
"required": [
"id",
"name",
"type",
"content_type",
"created_at"
],
"title": "AssetResponse"
},
"AssetsResponse": {
"properties": {
"assets": {
"items": {
"$ref": "#/components/schemas/AssetResponse"
},
"type": "array",
"title": "Assets"
},
"total_count": {
"type": "integer",
"title": "Total Count"
}
},
"type": "object",
"required": [
"assets",
"total_count"
],
"title": "AssetsResponse"
},
"Body_login_for_access_token_api_auth_token_post": {
"properties": {
"grant_type": {
"anyOf": [
{
"type": "string",
"pattern": "^password$"
},
{
"type": "null"
}
],
"title": "Grant Type"
},
"username": {
"type": "string",
"title": "Username"
},
"password": {
"type": "string",
"format": "password",
"title": "Password"
},
"scope": {
"type": "string",
"title": "Scope",
"default": ""
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Client Id"
},
"client_secret": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"format": "password",
"title": "Client Secret"
}
},
"type": "object",
"required": [
"username",
"password"
],
"title": "Body_login_for_access_token_api_auth_token_post"
},
"Body_prompt_from_image_api_generations_prompt_from_image_post": {
"properties": {
"prompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Prompt"
},
"images": {
"items": {
"type": "string",
"format": "binary"
},
"type": "array",
"title": "Images"
}
},
"type": "object",
"required": [
"images"
],
"title": "Body_prompt_from_image_api_generations_prompt_from_image_post"
},
"Body_upload_asset_api_assets_upload_post": {
"properties": {
"file": {
"type": "string",
"format": "binary",
"title": "File"
},
"linked_char_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Linked Char Id"
}
},
"type": "object",
"required": [
"file"
],
"title": "Body_upload_asset_api_assets_upload_post"
},
"Character": {
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
},
"name": {
"type": "string",
"title": "Name"
},
"avatar_image": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Avatar Image"
},
"character_image_data": {
"anyOf": [
{
"type": "string",
"format": "binary"
},
{
"type": "null"
}
],
"title": "Character Image Data"
},
"character_image_doc_tg_id": {
"type": "string",
"title": "Character Image Doc Tg Id"
},
"character_image_tg_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Character Image Tg Id"
},
"character_bio": {
"type": "string",
"title": "Character Bio"
}
},
"type": "object",
"required": [
"id",
"name",
"character_image_doc_tg_id",
"character_image_tg_id",
"character_bio"
],
"title": "Character"
},
"GenerationRequest": {
"properties": {
"linked_character_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Linked Character Id"
},
"aspect_ratio": {
"$ref": "#/components/schemas/AspectRatios",
"default": "NINESIXTEEN"
},
"quality": {
"$ref": "#/components/schemas/Quality",
"default": "ONEK"
},
"prompt": {
"type": "string",
"title": "Prompt"
},
"telegram_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Telegram Id"
},
"use_profile_image": {
"type": "boolean",
"title": "Use Profile Image",
"default": true
},
"assets_list": {
"items": {
"type": "string"
},
"type": "array",
"title": "Assets List"
}
},
"type": "object",
"required": [
"prompt",
"assets_list"
],
"title": "GenerationRequest"
},
"GenerationResponse": {
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"status": {
"$ref": "#/components/schemas/GenerationStatus"
},
"failed_reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Failed Reason"
},
"linked_character_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Linked Character Id"
},
"aspect_ratio": {
"$ref": "#/components/schemas/AspectRatios"
},
"quality": {
"$ref": "#/components/schemas/Quality"
},
"prompt": {
"type": "string",
"title": "Prompt"
},
"tech_prompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Tech Prompt"
},
"assets_list": {
"items": {
"type": "string"
},
"type": "array",
"title": "Assets List"
},
"result_list": {
"items": {
"type": "string"
},
"type": "array",
"title": "Result List",
"default": []
},
"result": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Result"
},
"execution_time_seconds": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Execution Time Seconds"
},
"api_execution_time_seconds": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Api Execution Time Seconds"
},
"token_usage": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Token Usage"
},
"input_token_usage": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Input Token Usage"
},
"output_token_usage": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Output Token Usage"
},
"progress": {
"type": "integer",
"title": "Progress",
"default": 0
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At",
"default": "2026-02-08T17:27:29.368203Z"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At",
"default": "2026-02-08T17:27:29.368207Z"
}
},
"type": "object",
"required": [
"id",
"status",
"aspect_ratio",
"quality",
"prompt",
"assets_list"
],
"title": "GenerationResponse"
},
"GenerationStatus": {
"type": "string",
"enum": [
"running",
"done",
"failed"
],
"title": "GenerationStatus"
},
"GenerationsResponse": {
"properties": {
"generations": {
"items": {
"$ref": "#/components/schemas/GenerationResponse"
},
"type": "array",
"title": "Generations"
},
"total_count": {
"type": "integer",
"title": "Total Count"
}
},
"type": "object",
"required": [
"generations",
"total_count"
],
"title": "GenerationsResponse"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"PromptRequest": {
"properties": {
"prompt": {
"type": "string",
"title": "Prompt"
},
"linked_assets": {
"items": {
"type": "string"
},
"type": "array",
"title": "Linked Assets",
"default": []
}
},
"type": "object",
"required": [
"prompt"
],
"title": "PromptRequest"
},
"PromptResponse": {
"properties": {
"prompt": {
"type": "string",
"title": "Prompt"
}
},
"type": "object",
"required": [
"prompt"
],
"title": "PromptResponse"
},
"Quality": {
"type": "string",
"enum": [
"ONEK",
"TWOK",
"FOURK"
],
"title": "Quality"
},
"Token": {
"properties": {
"access_token": {
"type": "string",
"title": "Access Token"
},
"token_type": {
"type": "string",
"title": "Token Type"
}
},
"type": "object",
"required": [
"access_token",
"token_type"
],
"title": "Token"
},
"UserRegister": {
"properties": {
"username": {
"type": "string",
"title": "Username"
},
"password": {
"type": "string",
"title": "Password"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Full Name"
}
},
"type": "object",
"required": [
"username",
"password"
],
"title": "UserRegister"
},
"UserResponse": {
"properties": {
"username": {
"type": "string",
"title": "Username"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Full Name"
},
"status": {
"type": "string",
"title": "Status"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Created At"
},
"is_admin": {
"type": "boolean",
"title": "Is Admin"
}
},
"type": "object",
"required": [
"username",
"status",
"is_admin"
],
"title": "UserResponse"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"api__endpoints__auth__UserResponse": {
"properties": {
"username": {
"type": "string",
"title": "Username"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Full Name"
},
"status": {
"type": "string",
"title": "Status"
},
"is_admin": {
"type": "boolean",
"title": "Is Admin",
"default": false
}
},
"type": "object",
"required": [
"username",
"status"
],
"title": "UserResponse"
}
},
"securitySchemes": {
"OAuth2PasswordBearer": {
"type": "oauth2",
"flows": {
"password": {
"scopes": {},
"tokenUrl": "/api/auth/token"
}
}
}
}
}
}