{"openapi":"3.1.0","info":{"title":"ScaleAI","version":"0.1.0"},"paths":{"/api/account/register":{"post":{"summary":"Register","operationId":"register_api_account_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registration"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/login":{"post":{"summary":"Login","operationId":"login_api_account_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/logout":{"post":{"summary":"Logout","operationId":"logout_api_account_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/api/account":{"get":{"summary":"Current Account","operationId":"current_account_api_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/account/email":{"put":{"summary":"Change Email","operationId":"change_email_api_account_email_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailChange"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/password":{"put":{"summary":"Change Password","operationId":"change_password_api_account_password_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/preview":{"post":{"summary":"Preview Target","operationId":"preview_target_api_account_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/profile":{"put":{"summary":"Save Profile","operationId":"save_profile_api_account_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/device-key":{"post":{"summary":"Issue Device Key","operationId":"issue_device_key_api_account_device_key_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"summary":"Revoke Device Key","operationId":"revoke_device_key_api_account_device_key_delete","responses":{"204":{"description":"Successful Response"}}}},"/api/status":{"get":{"summary":"Status","operationId":"status_api_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/examples":{"get":{"summary":"Examples","operationId":"examples_api_examples_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/benchmark":{"get":{"summary":"Benchmark","operationId":"benchmark_api_benchmark_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analyze":{"post":{"summary":"Analyze","operationId":"analyze_api_analyze_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_api_analyze_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/history":{"get":{"summary":"History","operationId":"history_api_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":40,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/nutrients":{"get":{"summary":"Nutrient Catalog","operationId":"nutrient_catalog_api_nutrients_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/history/{measurement_id}":{"delete":{"summary":"Delete Measurement","operationId":"delete_measurement_api_history__measurement_id__delete","parameters":[{"name":"measurement_id","in":"path","required":true,"schema":{"type":"string","title":"Measurement Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/diary":{"get":{"summary":"Diary","operationId":"diary_api_diary_get","parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/weigh-steps":{"post":{"summary":"Weigh Steps","operationId":"weigh_steps_api_weigh_steps_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Correction"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/history/{measurement_id}/ingredients":{"put":{"summary":"Correct","operationId":"correct_api_history__measurement_id__ingredients_put","parameters":[{"name":"measurement_id","in":"path","required":true,"schema":{"type":"string","title":"Measurement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Correction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/foods":{"get":{"summary":"Search Foods","operationId":"search_foods_api_foods_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Название продукта на русском или английском","title":"Q"},"description":"Название продукта на русском или английском"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_analyze_api_analyze_post":{"properties":{"photo":{"type":"string","contentMediaType":"application/octet-stream","title":"Photo","description":"Снимок блюда, JPEG, PNG или WebP"},"weight_g":{"type":"number","maximum":10000.0,"minimum":0.1,"title":"Weight G","description":"Общий вес еды без тарелки в граммах"},"example_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Example Id"},"mixed":{"type":"boolean","title":"Mixed","description":"Расширенное распознавание продуктов на фото","default":false},"mixed_version":{"type":"string","enum":["v1","v2","v3","v4","v5"],"title":"Mixed Version","description":"Версия экспериментальной модели","default":"v1"}},"type":"object","required":["photo","weight_g"],"title":"Body_analyze_api_analyze_post"},"Correction":{"properties":{"ingredients":{"items":{"$ref":"#/components/schemas/Portion"},"type":"array","maxItems":30,"minItems":1,"title":"Ingredients"}},"type":"object","required":["ingredients"],"title":"Correction"},"Credentials":{"properties":{"email":{"type":"string","maxLength":254,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password","writeOnly":true}},"type":"object","required":["email","password"],"title":"Credentials"},"EmailChange":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":1,"title":"Current Password","writeOnly":true},"email":{"type":"string","maxLength":254,"minLength":3,"title":"Email"}},"type":"object","required":["current_password","email"],"title":"EmailChange"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PasswordChange":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":1,"title":"Current Password","writeOnly":true},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password","writeOnly":true}},"type":"object","required":["current_password","new_password"],"title":"PasswordChange"},"Portion":{"properties":{"fdc_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Fdc Id"},"grams":{"type":"number","maximum":10000.0,"minimum":0.1,"title":"Grams"},"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"}},"type":"object","required":["fdc_id","grams"],"title":"Portion"},"Profile":{"properties":{"height_cm":{"type":"number","maximum":250.0,"minimum":100.0,"title":"Height Cm"},"weight_kg":{"type":"number","maximum":400.0,"minimum":30.0,"title":"Weight Kg"},"age":{"type":"integer","maximum":100.0,"minimum":18.0,"title":"Age"},"sex":{"type":"string","enum":["female","male"],"title":"Sex"},"activity":{"type":"string","enum":["low","light","moderate","high"],"title":"Activity"},"goal":{"type":"string","enum":["maintain","lose","gain"],"title":"Goal"},"timezone":{"type":"string","maxLength":64,"minLength":1,"title":"Timezone"}},"type":"object","required":["height_cm","weight_kg","age","sex","activity","goal","timezone"],"title":"Profile"},"Registration":{"properties":{"email":{"type":"string","maxLength":254,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password","writeOnly":true},"name":{"type":"string","maxLength":60,"minLength":1,"title":"Name"}},"type":"object","required":["email","password","name"],"title":"Registration"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}