{"openapi":"3.1.0","info":{"title":"HydraAI API","description":"HydraAI API [Версия 0.11.2β]: Легендарная мощь нейросетей по доступной цене. 🚀","version":"0.11.2β"},"paths":{"/v1/users/profile":{"get":{"tags":["Users"],"summary":"Получить профиль пользователя","description":"Конечная точка для получения баланса с помощью API-ключа. **Для доступа требуется авторизация.**","operationId":"get_profile_v1_users_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBalancePublic"}}}}},"security":[{"API ключ":[]}]}},"/v1/users/redeem":{"post":{"tags":["Users"],"summary":"Активировать код пополнения","description":"Активирует предоставленный код пополнения, добавляя баланс и/или бесплатные запросы к аккаунту пользователя. **Для доступа требуется авторизация.** \n    \n**Если вы попытаетесь подобрать код пополнения, ваш аккаунт будет автоматически заблокирован, и восстановить его будет невозможно. Эта система не затронет обычных пользователей.**","operationId":"redeem_refill_code_endpoint_v1_users_redeem_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBalanceRedeem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"API ключ":[]}]}},"/v1/users/refill_logs":{"get":{"tags":["Users"],"summary":"Получить историю пополнений пользователя","description":"Конечная точка для получения истории пополнений баланса с пагинацией. **Требуется авторизация.**","operationId":"get_user_refill_logs_v1_users_refill_logs_get","security":[{"API ключ":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Номер страницы для пагинации","default":1,"title":"Page"},"description":"Номер страницы для пагинации"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Количество записей на странице (максимум 100)","default":20,"title":"Page Size"},"description":"Количество записей на странице (максимум 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRefillLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/stats":{"get":{"tags":["Users"],"summary":"Получить суточную статистику пользователя","description":"Конечная точка для получения агрегированной статистики по дням за указанный период. **Требуется авторизация.**","operationId":"get_user_stats_v1_users_stats_get","security":[{"API ключ":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата начала периода в формате YYYY-MM-DD. По умолчанию — 30 дней назад.","title":"Start Date"},"description":"Дата начала периода в формате YYYY-MM-DD. По умолчанию — 30 дней назад."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Дата окончания периода в формате YYYY-MM-DD. По умолчанию — сегодня.","title":"End Date"},"description":"Дата окончания периода в формате YYYY-MM-DD. По умолчанию — сегодня."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/request_logs":{"get":{"tags":["Users"],"summary":"Получить историю запросов к нейросетям","description":"Возвращает логи запросов к нейросетям. В список попадают только те запросы, которые были обработаны и отправлены непосредственно AI-модели (успешные и неуспешные). Запросы, отклоненные из-за ошибок валидации, превышения лимитов или нехватки баланса, в этом логе не отображаются. **Требуется авторизация.**","operationId":"get_user_request_logs_v1_users_request_logs_get","security":[{"API ключ":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Номер страницы для пагинации","default":1,"title":"Page"},"description":"Номер страницы для пагинации"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedRequestLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/regenerate_api_key":{"put":{"tags":["Users"],"summary":"Сгенерировать новый API-ключ","description":"Создает новый API-ключ, который заменяет ваш текущий. Старый ключ **перестанет работать**.\n### Важная информация:\n- **Не генерируруйте ключ без необходимости.** После генерации ваш старый API-ключ будет деактивирован, и вам потребуется обновить его во всех ваших приложениях и скриптах.\n- **Возможна задержка.** Из-за особенностей кэширования, новый ключ может начать работать не мгновенно, как и деактивироваться старый, а в течение нескольких минут.","operationId":"regenerate_api_key_endpoint_v1_users_regenerate_api_key_put","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRegenerateResponse"}}}}},"security":[{"API ключ":[]}]}},"/v1/models/status":{"get":{"tags":["Model"],"summary":"Получить статус всех моделей с метриками","description":"Конечная точка для получения текущего статуса всех моделей с расчетом процента успешных запросов, среднего количества токенов в секунду (TPS) или среднего времени генерации (ART) в зависимости от типа модели.","operationId":"get_models_status_endpoint_v1_models_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/models":{"get":{"tags":["Model"],"summary":"Получить список моделей","description":"Конечная точка, которая предоставляет список моделей с соответствующей информацией о них. **Доступ к этой информации возможен без необходимости авторизации.**","operationId":"get_models_v1_models_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LLMModelType"},{"type":"null"}],"description":"Фильтр по типу модели","title":"Type"},"description":"Фильтр по типу модели"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models/{model_id}":{"get":{"tags":["Model"],"summary":"Получить информацию о модели","description":"Конечная точка, которая предоставляет информацию о конкретной модели по ее ID или альтернативному ID. **Доступ к этой информации возможен без необходимости авторизации.**","operationId":"get_model_v1_models__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions":{"post":{"tags":["Creation"],"summary":"Запрос на генерацию текста","description":"Эта конечная точка служит для создания текстового контента с помощью нейросетей. **Для доступа требуется авторизация.**","operationId":"stream_req_chat_completions_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionsForm"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionsResponse"}},"text/event-stream":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"API ключ":[]}]}},"/v1/images/generations":{"post":{"tags":["Creation"],"summary":"Запрос на генерацию изображения","description":"Эта конечная точка служит для генерации изображений с помощью нейросетей. **Для доступа требуется авторизация.**\n\n*Обратите внимание, что сгенерированные изображения передаваемые в формате `url` доступны только 24 часа по ссылке, далее они удаляются с сервера.*","operationId":"createImageGeneration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationForm"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"API ключ":[]}]}},"/v1/images/edits":{"post":{"tags":["Creation"],"summary":"Запрос на редактирование изображения","description":"Эта конечная точка служит для генерации изображений с помощью нейросетей. **Для доступа требуется авторизация.**\n\n*Обратите внимание, что сгенерированные изображения передаваемые в формате `url` доступны только 24 часа по ссылке, далее они удаляются с сервера.*","operationId":"createImageEdit","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationForm"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"API ключ":[]}]}},"/v1/embeddings":{"post":{"tags":["Creation"],"summary":"Запрос на генерацию вектора встраивания","description":"Эта конечная точка служит для создания вектора встраивания, представляющего входной текст с помощью нейросетей. **Для доступа требуется авторизация.**","operationId":"req_embeddings_v1_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbeddingsForm"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbeddingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"API ключ":[]}]}},"/v1/logs/summary":{"get":{"tags":["System"],"summary":"Статистика HydraAI API за последние 24 часа","description":"Получить агрегированную статистику HydraAI API за последние 24 часа:\n    \n- Версия API      \n- Всего токенов\n- Всего запросов\n- Процент успешных запросов","operationId":"get_system_stats_summary_endpoint_v1_logs_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/servers":{"get":{"tags":["System"],"summary":"Список доступных серверов","description":"Получить список базовых URL серверов для подключения к API","operationId":"get_servers_endpoint_v1_servers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PublicApiServerRead"},"type":"array","title":"Response Get Servers Endpoint V1 Servers Get"}}}}}}},"/v1/health":{"get":{"tags":["Health Check"],"summary":"Basic Health Check","description":"Быстрая проверка работоспособности API.\n\nВозвращает статус 200 если сервис работает.","operationId":"health_check_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/web/config":{"get":{"tags":["Web project config"],"summary":"Get Web Project Config","operationId":"get_web_project_config_v1_web_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebProjectConfig"}}}}}}},"/v1/web/auth/captcha/challenge":{"post":{"tags":["Web Auth"],"summary":"Create Click Captcha","operationId":"create_click_captcha_v1_web_auth_captcha_challenge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickCaptchaChallengeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickCaptchaChallenge"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/auth/captcha/verify":{"post":{"tags":["Web Auth"],"summary":"Verify Click Captcha","operationId":"verify_click_captcha_v1_web_auth_captcha_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickCaptchaVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClickCaptchaVerified"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/auth/request-code":{"post":{"tags":["Web Auth"],"summary":"Request Email Code","operationId":"request_email_code_v1_web_auth_request_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestEmailCode"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeRequested"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/auth/verify-code":{"post":{"tags":["Web Auth"],"summary":"Verify Email Code","operationId":"verify_email_code_v1_web_auth_verify_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailCode"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/auth/me":{"get":{"tags":["Web Auth"],"summary":"Get Me","operationId":"get_me_v1_web_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebUserPublic"}}}}}},"patch":{"tags":["Web Auth"],"summary":"Update Me","operationId":"update_me_v1_web_auth_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebUserPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/auth/refresh":{"post":{"tags":["Web Auth"],"summary":"Refresh Session","operationId":"refresh_session_v1_web_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResult"}}}}}}},"/v1/web/auth/logout":{"post":{"tags":["Web Auth"],"summary":"Logout","operationId":"logout_v1_web_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/v1/web/auth/logout-all":{"post":{"tags":["Web Auth"],"summary":"Logout All","operationId":"logout_all_v1_web_auth_logout_all_post","responses":{"204":{"description":"Successful Response"}}}},"/v1/web/auth/logout-others":{"post":{"tags":["Web Auth"],"summary":"Logout Others","operationId":"logout_others_v1_web_auth_logout_others_post","responses":{"204":{"description":"Successful Response"}}}},"/v1/web/auth/sessions":{"get":{"tags":["Web Auth"],"summary":"List Sessions","operationId":"list_sessions_v1_web_auth_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SessionPublic"},"type":"array","title":"Response List Sessions V1 Web Auth Sessions Get"}}}}}}},"/v1/web/auth/sessions/{session_id}":{"delete":{"tags":["Web Auth"],"summary":"Revoke Session","operationId":"revoke_session_v1_web_auth_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts":{"get":{"tags":["Web API Accounts"],"summary":"List Api Accounts","operationId":"list_api_accounts_v1_web_api_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiAccountPublic"},"type":"array","title":"Response List Api Accounts V1 Web Api Accounts Get"}}}}}}},"/v1/web/api-accounts/link":{"post":{"tags":["Web API Accounts"],"summary":"Link Api Account","operationId":"link_api_account_v1_web_api_accounts_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkApiAccountRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAccountPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/first":{"post":{"tags":["Web API Accounts"],"summary":"Create First Api Account","operationId":"create_first_api_account_v1_web_api_accounts_first_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFirstApiAccountRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiAccount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}":{"patch":{"tags":["Web API Accounts"],"summary":"Rename Api Account","operationId":"rename_api_account_v1_web_api_accounts__account_id__patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameApiAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAccountPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Web API Accounts"],"summary":"Unlink Api Account","operationId":"unlink_api_account_v1_web_api_accounts__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensitiveActionConfirmRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Web API Accounts"],"summary":"Get Api Account","operationId":"get_api_account_v1_web_api_accounts__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAccountPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}/unlink/request-code":{"post":{"tags":["Web API Accounts"],"summary":"Request Unlink Code","operationId":"request_unlink_code_v1_web_api_accounts__account_id__unlink_request_code_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensitiveActionCodeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeRequested"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}/reveal/request-code":{"post":{"tags":["Web API Accounts"],"summary":"Request Reveal Code","operationId":"request_reveal_code_v1_web_api_accounts__account_id__reveal_request_code_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensitiveActionCodeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeRequested"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}/reveal":{"post":{"tags":["Web API Accounts"],"summary":"Reveal Api Key","operationId":"reveal_api_key_v1_web_api_accounts__account_id__reveal_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealApiKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealedApiKey"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}/redeem":{"post":{"tags":["Web API Accounts"],"summary":"Redeem Refill Code","operationId":"redeem_refill_code_v1_web_api_accounts__account_id__redeem_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemRefillCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemedRefillCode"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}/regenerate-api-key/request-code":{"post":{"tags":["Web API Accounts"],"summary":"Request Regenerate Api Key Code","operationId":"request_regenerate_api_key_code_v1_web_api_accounts__account_id__regenerate_api_key_request_code_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensitiveActionCodeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailCodeRequested"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}/regenerate-api-key":{"put":{"tags":["Web API Accounts"],"summary":"Regenerate Api Key","operationId":"regenerate_api_key_v1_web_api_accounts__account_id__regenerate_api_key_put","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SensitiveActionConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegeneratedApiKey"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}/request-logs":{"get":{"tags":["Web API Accounts"],"summary":"Web Request Logs","operationId":"web_request_logs_v1_web_api_accounts__account_id__request_logs_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}/refill-logs":{"get":{"tags":["Web API Accounts"],"summary":"Web Refill Logs","operationId":"web_refill_logs_v1_web_api_accounts__account_id__refill_logs_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/web/api-accounts/{account_id}/stats":{"get":{"tags":["Web API Accounts"],"summary":"Web Stats","operationId":"web_stats_v1_web_api_accounts__account_id__stats_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ApiAccountPublic":{"properties":{"id":{"type":"integer","title":"Id"},"user_balance_id":{"type":"string","title":"User Balance Id"},"label":{"type":"string","title":"Label"},"is_primary":{"type":"boolean","title":"Is Primary"},"balance":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Balance"},"total_balance_added":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Balance Added"},"free_requests":{"type":"integer","title":"Free Requests"},"user_type":{"type":"string","title":"User Type"},"ban":{"type":"boolean","title":"Ban"},"key_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Key Id"},"key_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Label"},"key_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Masked"},"key_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Key Active"},"average_rpm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Rpm"},"requests_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Minute"},"total_cost_request_last_hour":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Cost Request Last Hour"}},"type":"object","required":["id","user_balance_id","label","is_primary","balance","total_balance_added","free_requests","user_type","ban"],"title":"ApiAccountPublic"},"ApiKeyRegenerateResponse":{"properties":{"new_api_key":{"type":"string","title":"New Api Key","description":"Новый сгенерированный API-ключ"}},"type":"object","required":["new_api_key"],"title":"ApiKeyRegenerateResponse","description":"Pydantic-схема для ответа при успешной регенерации API-ключа."},"AuthResult":{"properties":{"user":{"$ref":"#/components/schemas/WebUserPublic"},"csrf_token":{"type":"string","title":"Csrf Token"}},"type":"object","required":["user","csrf_token"],"title":"AuthResult"},"ChatCompletionsForm":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Messages","description":"Сообщения"},"model":{"type":"string","title":"Model","description":"Модель к которой вы хотите отправть запрос","examples":["gpt-4o-mini"]},"max_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Tokens","description":"Максимально количество токенов","default":0},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"Температура","default":0.7},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P","description":"top_p"},"top_k":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Top K","description":"top_k"},"frequency_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Frequency Penalty","description":"frequency_penalty"},"presence_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Presence Penalty","description":"presence_penalty"},"repetition_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Repetition Penalty","description":"repetition_penalty"},"min_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Min P","description":"min_p"},"top_a":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top A","description":"top_a"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"Получать ответы в Стрим формате или нет","default":false},"web_search":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["no-links","links"]},{"type":"null"}],"title":"Web Search"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"Уровень reasoning (если поддерживается моделью)"},"quality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality","description":"Качество изображения (если поддерживается моделью)"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size","description":"Размер изображения (если поддерживается моделью)"},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/Tool"},"type":"array"},{"type":"null"}],"title":"Tools","examples":[null]}},"type":"object","required":["messages","model"],"title":"ChatCompletionsForm","examples":[{"messages":[{"content":"Что такое небо?","role":"user"}],"model":"gpt-4.1-nano"}]},"ChatCompletionsResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object"},"created":{"type":"integer","title":"Created"},"model":{"type":"string","title":"Model"},"choices":{"items":{"$ref":"#/components/schemas/Choice"},"type":"array","title":"Choices"},"usage":{"$ref":"#/components/schemas/core__schemas__chat_completions__Usage"}},"type":"object","required":["id","object","created","model","choices","usage"],"title":"ChatCompletionsResponse"},"Choice":{"properties":{"message":{"$ref":"#/components/schemas/MessageResponse"},"logprobs":{"anyOf":[{},{"type":"null"}],"title":"Logprobs"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason"},"index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Index"},"function_call":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Function Call"},"native_finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Native Finish Reason"}},"type":"object","required":["message"],"title":"Choice"},"ClickCaptchaChallenge":{"properties":{"challenge_id":{"type":"string","title":"Challenge Id"},"image":{"type":"string","title":"Image"},"prompt_image":{"type":"string","title":"Prompt Image"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["challenge_id","image","prompt_image","width","height","expires_in"],"title":"ClickCaptchaChallenge"},"ClickCaptchaChallengeRequest":{"properties":{"purpose":{"type":"string","enum":["login","signup"],"title":"Purpose"}},"type":"object","required":["purpose"],"title":"ClickCaptchaChallengeRequest"},"ClickCaptchaPoint":{"properties":{"x":{"type":"number","maximum":10000.0,"minimum":0.0,"title":"X"},"y":{"type":"number","maximum":10000.0,"minimum":0.0,"title":"Y"}},"type":"object","required":["x","y"],"title":"ClickCaptchaPoint"},"ClickCaptchaVerified":{"properties":{"success":{"type":"boolean","title":"Success"},"captcha_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captcha Token"}},"type":"object","required":["success"],"title":"ClickCaptchaVerified"},"ClickCaptchaVerifyRequest":{"properties":{"challenge_id":{"type":"string","maxLength":128,"minLength":20,"title":"Challenge Id"},"points":{"items":{"$ref":"#/components/schemas/ClickCaptchaPoint"},"type":"array","maxItems":5,"minItems":2,"title":"Points"}},"type":"object","required":["challenge_id","points"],"title":"ClickCaptchaVerifyRequest"},"CompletionTokensDetails":{"properties":{"reasoning_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reasoning Tokens"},"audio_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audio Tokens"}},"type":"object","title":"CompletionTokensDetails"},"ContentItem":{"properties":{"type":{"anyOf":[{"$ref":"#/components/schemas/MessageType"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"image_url":{"anyOf":[{"$ref":"#/components/schemas/ImageUrl"},{"type":"null"}]},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"},"tool_calls":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tool Calls"}},"type":"object","title":"ContentItem"},"CreateEmbeddingsForm":{"properties":{"input":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"minLength":1,"title":"Input","description":"Входной текст для эмбеддинга, закодированный как строка или массив строк. Чтобы встроить несколько входов в один запрос, передайте массив строк. Входные данные не должны превышать максимальное количество токенов для модели (8192 токена для всех моделей эмбеддингов), не могут быть пустой строкой, и любой массив должен содержать не более 2048 элементов."},"model":{"type":"string","title":"Model","description":"ID модели для использования. Вы можете использовать API 'List models' для просмотра всех доступных моделей или обратиться к обзору моделей."},"dimensions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dimensions","description":"Количество измерений, которые должны иметь результирующие выходные эмбеддинги. Поддерживается только в моделях text-embedding-3 и более новых."},"encoding_format":{"$ref":"#/components/schemas/EmbeddingEncodingFormat","description":"Формат, в котором возвращаются эмбеддинги. Может быть 'float' или 'base64'.","default":"float"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User","description":"Уникальный идентификатор, представляющий вашего конечного пользователя, который может помочь OpenAI отслеживать и обнаруживать злоупотребления."}},"type":"object","required":["input","model"],"title":"CreateEmbeddingsForm","description":"Тело запроса для создания эмбеддингов.","examples":[{"encoding_format":"float","input":"Tекст для эмбеддинга.","model":"text-embedding-ada"},{"dimensions":256,"encoding_format":"base64","input":["Первый текст для эмбеддинга.","Второй текст для эмбеддинга."],"model":"text-embedding-3-small"}]},"CreateEmbeddingsResponse":{"properties":{"id":{"type":"string","title":"Id"},"created":{"type":"integer","title":"Created"},"object":{"type":"string","const":"list","title":"Object","description":"Тип объекта, обычно 'list' для списков результатов."},"data":{"items":{"$ref":"#/components/schemas/EmbeddingData"},"type":"array","title":"Data","description":"Список объектов эмбеддингов."},"model":{"type":"string","title":"Model","description":"Модель, которая была использована для генерации эмбеддингов."},"usage":{"$ref":"#/components/schemas/EmbeddingsUsage","description":"Информация об использовании токенов."}},"type":"object","required":["id","created","object","data","model","usage"],"title":"CreateEmbeddingsResponse","description":"Ответ от API создания эмбеддингов.","examples":[{"created":1748966991,"data":[{"embedding":[0.0023064255,-0.009327292,-0.0028842222],"index":0,"object":"embedding"}],"id":"embd-id-33d35906-6ef2-4c8e-a3fe-183f0df3a532","model":"text-embedding-ada","object":"list","usage":{"cost_request":0.002,"free_request":false,"prompt_tokens":8,"total_time":0.745,"total_tokens":8}}]},"CreateFirstApiAccountRequest":{"properties":{"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label","default":"Основной"}},"type":"object","title":"CreateFirstApiAccountRequest"},"CreatedApiAccount":{"properties":{"account":{"$ref":"#/components/schemas/ApiAccountPublic"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["account","api_key"],"title":"CreatedApiAccount"},"Datum":{"properties":{"revised_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revised Prompt"},"b64_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"B64 Json"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","title":"Datum"},"EmailCodeRequested":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["challenge_id","expires_at"],"title":"EmailCodeRequested"},"EmbeddingData":{"properties":{"object":{"type":"string","const":"embedding","title":"Object","description":"Тип объекта, всегда 'embedding'."},"embedding":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"string"}],"title":"Embedding","description":"Вектор эмбеддинга. Список чисел с плавающей точкой или строка в формате base64, если encoding_format был 'base64'. Длина вектора зависит от модели."},"index":{"type":"integer","title":"Index","description":"Индекс эмбеддинга в списке эмбеддингов."}},"type":"object","required":["object","embedding","index"],"title":"EmbeddingData","description":"Объект, представляющий вектор эмбеддинга."},"EmbeddingEncodingFormat":{"type":"string","enum":["float","base64"],"title":"EmbeddingEncodingFormat","description":"Формат, в котором возвращаются эмбеддинги."},"EmbeddingsUsage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"Количество токенов в запросе."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Общее количество токенов, обработанных в запросе."},"total_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Time"},"cost_request":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Request"},"free_request":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Free Request"}},"type":"object","required":["prompt_tokens","total_tokens","total_time","cost_request","free_request"],"title":"EmbeddingsUsage","description":"Информация об использовании токенов в запросе."},"Function":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parameters":{"anyOf":[{},{"type":"null"}],"title":"Parameters"},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict"}},"type":"object","required":["name"],"title":"Function"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageGenerationForm":{"properties":{"model":{"type":"string","title":"Model","description":"Модель к которой вы хотите отправть запрос"},"prompt":{"type":"string","minLength":3,"title":"Prompt","description":"Описание что вы хотите сгенерировать"},"negative_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Negative Prompt","description":"Описание что вы хотите сгенерировать"},"n":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"N","description":"Сколько изображений генерировать","default":1},"response_format":{"$ref":"#/components/schemas/ResponseFormat","description":"Формат выходных данных","default":"b64_json"},"size":{"type":"string","title":"Size","description":"Размер генерируемого изображения","default":"1024x1024"},"quality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality","description":"Качество генерируемого изображения"},"style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style","description":"Стиль генерируемого изображения"},"image_url":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Image Url","description":"URL-адрес или base64 входного/эталонного изображения для редактирования."}},"type":"object","required":["model","prompt"],"title":"ImageGenerationForm","examples":[{"model":"flux-schnell-uncensored","n":1,"prompt":"Фото большого и пушистого кота в высоком качестве, RAW фото","response_format":"url","size":"1024x1024"}]},"ImageGenerationResponse":{"properties":{"id":{"type":"string","title":"Id"},"created":{"type":"integer","title":"Created"},"data":{"items":{"$ref":"#/components/schemas/Datum"},"type":"array","title":"Data"},"usage":{"$ref":"#/components/schemas/core__schemas__image_generation__Usage"}},"type":"object","required":["id","created","data","usage"],"title":"ImageGenerationResponse"},"ImageUrl":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"string"}],"title":"Url"}},"type":"object","required":["url"],"title":"ImageUrl"},"LLMModelObject":{"type":"string","enum":["model","proxy"],"title":"LLMModelObject"},"LLMModelPricingType":{"type":"string","enum":["tokens","image","time","characters","request"],"title":"LLMModelPricingType"},"LLMModelType":{"type":"string","enum":["chat","vision","image","embedding"],"title":"LLMModelType"},"LinkApiAccountRequest":{"properties":{"api_key":{"type":"string","maxLength":512,"minLength":10,"title":"Api Key"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label","default":"Основной"}},"type":"object","required":["api_key"],"title":"LinkApiAccountRequest"},"Message":{"properties":{"role":{"$ref":"#/components/schemas/MessageRole","description":"Роль","examples":["user"]},"content":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/ContentItem"},"type":"array"},{"type":"null"}],"title":"Content","description":"Контент","default":"","examples":["Что такое небо?"]},"tool_calls":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"}},"type":"object","required":["role"],"title":"Message"},"MessageResponse":{"properties":{"role":{"type":"string","title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/ContentItem"},"type":"array"},{"type":"null"}],"title":"Content"},"tool_calls":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"}},"type":"object","required":["role"],"title":"MessageResponse"},"MessageRole":{"type":"string","enum":["user","assistant","system","developer","tool"],"title":"MessageRole"},"MessageType":{"type":"string","enum":["text","image_url"],"title":"MessageType"},"ModelList":{"properties":{"object":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object","default":"list"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserModel"},"type":"array"},{"type":"null"}],"title":"Data"}},"type":"object","title":"ModelList"},"NewPricing":{"properties":{"date_of_use":{"type":"string","title":"Date Of Use"},"type":{"$ref":"#/components/schemas/LLMModelPricingType","default":"tokens"},"in_cost_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"In Cost Per Million"},"out_cost_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Out Cost Per Million"},"cost_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Million"},"cost_per_image":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Image"},"cost_per_image_quality":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cost Per Image Quality"},"cost_per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Second"},"cost_per_request":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Request"},"prompt":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Prompt"},"completion":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Completion"},"input_cache_read":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Input Cache Read"},"input_cache_write":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Input Cache Write"},"overrides":{"anyOf":[{"items":{"$ref":"#/components/schemas/TokenPricingOverride"},"type":"array"},{"type":"null"}],"title":"Overrides"},"free_requests":{"type":"boolean","title":"Free Requests","default":false}},"type":"object","required":["date_of_use"],"title":"NewPricing"},"OptionSpec":{"properties":{"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"choices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Choices"}},"type":"object","title":"OptionSpec"},"PaginatedRefillLogResponse":{"properties":{"total_count":{"type":"integer","title":"Total Count","description":"Общее количество записей о пополнениях"},"total_pages":{"type":"integer","title":"Total Pages","description":"Общее количество страниц"},"page":{"type":"integer","title":"Page","description":"Текущий номер страницы"},"page_size":{"type":"integer","title":"Page Size","description":"Количество записей на странице"},"items":{"items":{"$ref":"#/components/schemas/RefillLogPublic"},"type":"array","title":"Items","description":"Список логов пополнений на текущей странице"}},"type":"object","required":["total_count","total_pages","page","page_size","items"],"title":"PaginatedRefillLogResponse","description":"Модель ответа для эндпоинта получения истории пополнений с пагинацией."},"PaginatedRequestLogResponse":{"properties":{"total_count":{"type":"integer","title":"Total Count","description":"Общее количество логов запросов"},"total_pages":{"type":"integer","title":"Total Pages","description":"Общее количество страниц"},"page":{"type":"integer","title":"Page","description":"Текущий номер страницы"},"page_size":{"type":"integer","title":"Page Size","description":"Количество записей на странице"},"items":{"items":{"$ref":"#/components/schemas/RequestLogPublic"},"type":"array","title":"Items","description":"Список логов запросов на текущей странице"}},"type":"object","required":["total_count","total_pages","page","page_size","items"],"title":"PaginatedRequestLogResponse","description":"Модель ответа для эндпоинта получения логов запросов с пагинацией."},"PromptTokensDetails":{"properties":{"cached_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cached Tokens"},"audio_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audio Tokens"},"web_search_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Web Search Tokens"}},"type":"object","title":"PromptTokensDetails"},"PublicApiServerRead":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"base_url":{"type":"string","title":"Base Url","description":"Базовый URL с /v1"},"health_url":{"type":"string","title":"Health Url","description":"URL проверка работоспособности сервера API"},"server_url":{"type":"string","title":"Server Url","description":"URL сервера без /v1"}},"type":"object","required":["name","base_url","health_url","server_url"],"title":"PublicApiServerRead"},"RedeemCodeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"RedeemCodeRequest"},"RedeemRefillCodeRequest":{"properties":{"code":{"type":"string","maxLength":256,"minLength":1,"title":"Code"}},"type":"object","required":["code"],"title":"RedeemRefillCodeRequest"},"RedeemedRefillCode":{"properties":{"balance_added":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Balance Added"},"free_requests_added":{"type":"integer","title":"Free Requests Added"},"balance":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Balance"},"total_balance_added":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Balance Added"},"free_requests":{"type":"integer","title":"Free Requests"}},"type":"object","required":["balance_added","free_requests_added","balance","total_balance_added","free_requests"],"title":"RedeemedRefillCode"},"RefillLogPublic":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Дата и время пополнения (UTC)"},"refill_code_redeemed":{"type":"string","title":"Refill Code Redeemed","description":"Активированный код пополнения"},"balance_added":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Balance Added","description":"Сумма, на которую был пополнен баланс"},"free_requests_added":{"type":"integer","title":"Free Requests Added","description":"Количество добавленных бесплатных запросов"}},"type":"object","required":["created_at","refill_code_redeemed","balance_added","free_requests_added"],"title":"RefillLogPublic","description":"Pydantic-схема для отображения одного лога пополнения.\nПоле user_api_key_used исключено из вывода."},"RegeneratedApiKey":{"properties":{"api_key":{"type":"string","title":"Api Key"},"key_masked":{"type":"string","title":"Key Masked"}},"type":"object","required":["api_key","key_masked"],"title":"RegeneratedApiKey"},"RenameApiAccountRequest":{"properties":{"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"}},"type":"object","required":["label"],"title":"RenameApiAccountRequest"},"RequestEmailCode":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"purpose":{"type":"string","enum":["login","signup"],"title":"Purpose","default":"login"},"captcha_token":{"anyOf":[{"type":"string","maxLength":128,"minLength":20},{"type":"null"}],"title":"Captcha Token"}},"type":"object","required":["email"],"title":"RequestEmailCode"},"RequestLogPublic":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Дата и время запроса (UTC)"},"success":{"type":"boolean","title":"Success","description":"Статус успешности запроса"},"response_code":{"type":"integer","title":"Response Code","description":"HTTP код ответа"},"request_id":{"type":"string","title":"Request Id","description":"Уникальный ID запроса"},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details","description":"Детали ошибки, если запрос не удался"},"user_ip":{"type":"string","title":"User Ip","description":"IP-адрес, с которого был отправлен запрос"},"model_name":{"type":"string","title":"Model Name","description":"ID использованной модели"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"Количество токенов в промпте"},"cache_read_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Read Tokens","description":"Количество токенов, прочитанных из prompt cache"},"completion_tokens":{"type":"integer","title":"Completion Tokens","description":"Количество токенов в ответе"},"total_time":{"type":"number","title":"Total Time","description":"Общее время выполнения запроса в секундах"},"cost_request":{"type":"number","title":"Cost Request","description":"Стоимость запроса в рублях"},"free_requests":{"type":"boolean","title":"Free Requests","description":"True, если запрос был бесплатным, иначе False"}},"type":"object","required":["created_at","success","response_code","request_id","user_ip","model_name","prompt_tokens","completion_tokens","total_time","cost_request","free_requests"],"title":"RequestLogPublic","description":"Pydantic-схема для отображения одного лога запроса к нейросети."},"ResponseFormat":{"type":"string","enum":["url","b64_json"],"title":"ResponseFormat"},"RevealApiKeyRequest":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"},"code":{"type":"string","maxLength":32,"minLength":1,"title":"Code"}},"type":"object","required":["challenge_id","code"],"title":"RevealApiKeyRequest"},"RevealedApiKey":{"properties":{"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["api_key"],"title":"RevealedApiKey"},"SensitiveActionCodeRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"}},"type":"object","required":["email"],"title":"SensitiveActionCodeRequest"},"SensitiveActionConfirmRequest":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"},"code":{"type":"string","maxLength":32,"minLength":1,"title":"Code"}},"type":"object","required":["challenge_id","code"],"title":"SensitiveActionConfirmRequest"},"SessionPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"current":{"type":"boolean","title":"Current","default":false},"remember_me":{"type":"boolean","title":"Remember Me"},"os_name":{"type":"string","title":"Os Name"},"browser_name":{"type":"string","title":"Browser Name"},"device_type":{"type":"string","enum":["desktop","mobile","tablet","unknown"],"title":"Device Type"},"ip_created":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Created"},"ip_last_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Last Used"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"type":"string","format":"date-time","title":"Last Used At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["id","remember_me","os_name","browser_name","device_type","ip_created","ip_last_used","created_at","last_used_at","expires_at"],"title":"SessionPublic"},"TokenPricingOverride":{"properties":{"min_prompt_tokens":{"type":"integer","exclusiveMinimum":0.0,"title":"Min Prompt Tokens"},"prompt":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Prompt"},"completion":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Completion"},"input_cache_read":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Input Cache Read"},"input_cache_write":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Input Cache Write"}},"type":"object","required":["min_prompt_tokens"],"title":"TokenPricingOverride"},"Tool":{"properties":{"type":{"$ref":"#/components/schemas/ToolTypeRole","description":"Тип","examples":["function"]},"function":{"$ref":"#/components/schemas/Function"}},"type":"object","required":["type","function"],"title":"Tool"},"ToolTypeRole":{"type":"string","enum":["function"],"title":"ToolTypeRole"},"UpdateWebProfileRequest":{"properties":{"timezone":{"type":"string","maxLength":64,"minLength":1,"title":"Timezone"}},"type":"object","required":["timezone"],"title":"UpdateWebProfileRequest"},"UserBalancePublic":{"properties":{"id":{"type":"string","title":"Id"},"user_type":{"type":"string","title":"User Type"},"last_used_at":{"type":"string","format":"date-time","title":"Last Used At"},"balance":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Balance"},"total_balance_added":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Total Balance Added"},"free_requests":{"type":"integer","title":"Free Requests"},"request_count_last_hour":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Request Count Last Hour"},"total_cost_request_last_hour":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Total Cost Request Last Hour"},"average_rpm":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Average Rpm"},"requests_per_minute":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Requests Per Minute"}},"type":"object","title":"UserBalancePublic"},"UserBalanceRedeem":{"properties":{"id":{"type":"string","title":"Id"},"user_type":{"type":"string","title":"User Type"},"last_used_at":{"type":"string","format":"date-time","title":"Last Used At"},"balance":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Balance"},"total_balance_added":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Total Balance Added"},"free_requests":{"type":"integer","title":"Free Requests"},"add_balance":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Add Balance"},"add_free_requests":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Add Free Requests"}},"type":"object","title":"UserBalanceRedeem"},"UserDailyStatPublic":{"properties":{"stat_date":{"type":"string","format":"date","title":"Stat Date","description":"Дата, за которую предоставлена статистика"},"request_count":{"type":"integer","title":"Request Count","description":"Общее количество запросов за день"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"Сумма prompt_tokens за день"},"cache_read_tokens":{"type":"integer","title":"Cache Read Tokens","description":"Сумма cache_read_tokens за день"},"completion_tokens":{"type":"integer","title":"Completion Tokens","description":"Сумма completion_tokens за день"},"cost_request":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Cost Request","description":"Общая стоимость запросов за день"},"free_requests":{"type":"integer","title":"Free Requests","description":"Количество бесплатных запросов за день"}},"type":"object","required":["stat_date","request_count","prompt_tokens","cache_read_tokens","completion_tokens","cost_request","free_requests"],"title":"UserDailyStatPublic","description":"Pydantic-схема для отображения статистики за один день."},"UserModel":{"properties":{"id":{"type":"string","title":"Id"},"object":{"$ref":"#/components/schemas/LLMModelObject"},"created":{"type":"integer","title":"Created"},"context":{"type":"integer","title":"Context"},"size":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Size"},"type":{"$ref":"#/components/schemas/LLMModelType"},"active":{"type":"boolean","title":"Active"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"img":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Img"},"owned_by":{"type":"string","title":"Owned By"},"proxy_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy To"},"reasoning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reasoning"},"reasoning_effort":{"anyOf":[{"$ref":"#/components/schemas/OptionSpec"},{"type":"null"}]},"image_quality":{"anyOf":[{"$ref":"#/components/schemas/OptionSpec"},{"type":"null"}]},"web_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Web Search"},"input_modalities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Modalities"},"output_modalities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Output Modalities"},"supported_file_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supported File Types"},"max_image_count":{"anyOf":[{"type":"integer","maximum":4.0,"minimum":1.0},{"type":"null"}],"title":"Max Image Count"},"max_file_count":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max File Count"},"architecture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Architecture"},"quantization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantization"},"endpoints":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Endpoints"},"delete_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delete At"},"pricing":{"anyOf":[{"$ref":"#/components/schemas/UserModelPricing"},{"type":"null"}]},"new_pricing":{"anyOf":[{"$ref":"#/components/schemas/NewPricing"},{"type":"null"}]},"alt_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Alt Ids"},"rpm_coefficient":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rpm Coefficient","default":1}},"type":"object","required":["id","object","created","context","type","active","owned_by"],"title":"UserModel"},"UserModelPricing":{"properties":{"type":{"$ref":"#/components/schemas/LLMModelPricingType","default":"tokens"},"in_cost_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"In Cost Per Million"},"out_cost_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Out Cost Per Million"},"cost_per_million":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Million"},"cost_per_image":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Image"},"cost_per_image_quality":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cost Per Image Quality"},"cost_per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Second"},"cost_per_request":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Request"},"prompt":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Prompt"},"completion":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Completion"},"input_cache_read":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Input Cache Read"},"input_cache_write":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Input Cache Write"},"overrides":{"anyOf":[{"items":{"$ref":"#/components/schemas/TokenPricingOverride"},"type":"array"},{"type":"null"}],"title":"Overrides"},"free_requests":{"type":"boolean","title":"Free Requests","default":false}},"type":"object","title":"UserModelPricing"},"UserStatsResponse":{"properties":{"period_start_date":{"type":"string","format":"date","title":"Period Start Date","description":"Начало периода статистики"},"period_end_date":{"type":"string","format":"date","title":"Period End Date","description":"Конец периода статистики"},"total_requests":{"type":"integer","title":"Total Requests","description":"Всего запросов за указанный период"},"total_prompt_tokens":{"type":"integer","title":"Total Prompt Tokens","description":"Всего prompt_tokens за указанный период"},"total_cache_read_tokens":{"type":"integer","title":"Total Cache Read Tokens","description":"Всего cache_read_tokens за указанный период"},"total_completion_tokens":{"type":"integer","title":"Total Completion Tokens","description":"Всего completion_tokens за указанный период"},"total_cost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Cost","description":"Общая стоимость запросов за указанный период"},"total_free_requests":{"type":"integer","title":"Total Free Requests","description":"Всего бесплатных запросов за указанный период"},"daily_stats":{"items":{"$ref":"#/components/schemas/UserDailyStatPublic"},"type":"array","title":"Daily Stats","description":"Список статистики по дням"}},"type":"object","required":["period_start_date","period_end_date","total_requests","total_prompt_tokens","total_cache_read_tokens","total_completion_tokens","total_cost","total_free_requests","daily_stats"],"title":"UserStatsResponse","description":"Модель ответа для эндпоинта получения статистики пользователя."},"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"},"VerifyEmailCode":{"properties":{"challenge_id":{"type":"string","format":"uuid","title":"Challenge Id"},"code":{"type":"string","maxLength":32,"minLength":1,"title":"Code"},"remember_me":{"type":"boolean","title":"Remember Me","default":false}},"type":"object","required":["challenge_id","code"],"title":"VerifyEmailCode"},"WebProjectConfig":{"properties":{"title_project":{"type":"string","title":"Title Project"},"csrf_cookie_name":{"type":"string","title":"Csrf Cookie Name"},"logo":{"type":"string","title":"Logo"},"favicon":{"type":"string","title":"Favicon"}},"type":"object","required":["title_project","csrf_cookie_name","logo","favicon"],"title":"WebProjectConfig"},"WebUserPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"timezone":{"type":"string","title":"Timezone"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","role","status","timezone","created_at"],"title":"WebUserPublic"},"core__schemas__chat_completions__Usage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"prompt_tokens_details":{"anyOf":[{"$ref":"#/components/schemas/PromptTokensDetails"},{"type":"null"}]},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"completion_tokens_details":{"anyOf":[{"$ref":"#/components/schemas/CompletionTokensDetails"},{"type":"null"}]},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_time":{"type":"number","title":"Total Time"},"cost_request":{"type":"number","title":"Cost Request"},"free_request":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Free Request"}},"type":"object","required":["prompt_tokens","completion_tokens","total_tokens","total_time","cost_request","free_request"],"title":"Usage"},"core__schemas__image_generation__Usage":{"properties":{"total_time":{"type":"number","title":"Total Time"},"cost_request":{"type":"number","title":"Cost Request"},"free_request":{"type":"boolean","title":"Free Request"}},"type":"object","required":["total_time","cost_request","free_request"],"title":"Usage"}},"securitySchemes":{"API ключ":{"type":"http","description":"Введите свой API ключ в поле ниже и нажмите 'Authorize'.","scheme":"bearer"}}}}