{"openapi":"3.1.0","info":{"title":"Avaturn developer API","description":"What can you do using API?\n\n- Integrate Avaturn skipping Avaturn's sign in page thus enabling you to use your own authentication method for the\n  users.\n- Fine tune the user flow of Avaturn to match your app. E.g. have a button inside your app that opens specific\n  avatar.\n- Upload selfies directly instead of having people to scan using Avaturn UI.\n\n## Getting started\n\nTo get access to Avaturn API first you need to create a project at [developer portal](https://developer.avaturn.me) and\ngenerate an API authentication token.\n\nAvaturn API is only available in a paid package and is not available on free plan. You can upgrade your plan\nat [developer portal](https://developer.avaturn.me).\n\n## Overview\n\nAPI is built around following concepts:\n\n- **Project**: Entity having unique domain and access token assigned to it. Usually `<your-app-name>.avaturn.dev`.\n  You can create project in [developer portal](https://developer.avaturn.me).\n- **User**: Anonymous user that can be created with API, assigned to (owned by) **Project**, developers can access\n  only to users owned by their project.\n- **Avatar**:  3D model that can be exported. Created and customized by **User** during **Session**\n- **Session**:  Entity representing single **User interaction** with avaturn UI resulting an export.\n\nWhen you need to allow user to perform actions with their avatar in avaturn UI you need to create new session, send\nresulting session url to your front-end and open it in webview.\n\n## Basic flow\n\n1. Create a user in Avaturn with [**POST** /users/new](operations/create_user_api_v1_users_new_post) and save its\n   id. This is anonymous user, we don't need any real user details.\n2. Now you can create a session for that user with\n   [**POST** /sessions/new](operations/new_session_api_v1_sessions_new_post)\n3. Send this url to your frontend and open it in webview. If you are building a web app, please pass the link\n   to `.init()` of [SDK](https://docs.avaturn.me/docs/integration/sdk/introduction/)\n\n## Working with individual avatars\n\nUser avatars can be listed, edited and deleted individually.\n\n* To list all avatars of specified user use\n  [**GET** /users/{user-id}/avatars](operations/list_user_avatars_api_v1_users__user_id__avatars_get)\n* To drop user into editor page for specified avatar directly use\n  [**POST** /sessions/new](operations/new_session_api_v1_sessions_new_post) with `edit_existing` session type.\n* To delete specified avatar of specified user use\n  [**DELETE** /users/{user-id}/avatars/{avatar-id}](operations/delete_user_api_v1_users__user_id__delete)\n\n## Important Notes\n\n- You should store correspondence of avaturn `user_id` to your users if you want to allow user to reuse their previous\n  artifacts.\n- You can create new `user_id` one every time in case you need user to always start from scratch.\n- Sessions are short-lived. It is required to create a new session for every new usage.\n\n## Export\n\nThere are two types of avatar export available:\n\n- `dataURL` - base64 encoded data, generated on the client side, ideal if you want to use the avatar on the frontend\n  instantly and don't need to upload it anywhere\n- `httpURL` - permanent http link, useful if you need the avatar on the backend.\n\nYou can choose one at [developer portal](https://developer.avaturn.me)\n","version":"v1"},"servers":[{"url":"https://api.avaturn.me/"}],"paths":{"/api/v1/users/new":{"post":{"summary":"Create User","description":"Creates new avaturn user. Users are anonymous, no personal user data is needed.\n\nUsers are required to keep avatars private between your users within your app.\nWe highly recommend you to create separate avaturn user for each user in your app.\n\nYou should store correspondence between your users and avaturn users by storing IDs.","operationId":"create_user_api_v1_users_new_post","responses":{"200":{"description":"User created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewUserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/{user_id}":{"delete":{"summary":"Delete User","description":"Deletes user and all it's data, including uploaded photos, avatars, cached exports etc.","operationId":"delete_user_api_v1_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$","title":"User Id"}}],"responses":{"200":{"description":"User deleted","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sessions/new":{"post":{"summary":"New Session","description":"Creates a new session (link for new user interaction with Avaturn UI) and returns it's url and id.\n\nThere are 3 types of session:\n\n* `create_or_edit_existing`: starts with avatar dashboard if user has any avatars\n  or with avatar creation flow if user has no avatars;\n* `create`: starts with avatar creation flow regardless avatar existence;\n* `edit_existing`: starts with editor for avatar with provided id.\n\nSend resulting url to your frontend and open it in webview or iframe.\nUse `session_id` to distinguish webhook events between multiple sessions.\n\n**NOTE**: The resulting session url itself is considered implementation detail,\nand its structure is not guaranteed to be backward-compatible.","operationId":"new_session_api_v1_sessions_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSessionRequest"},"examples":{"Create or edit existing":{"value":{"user_id":"your-user-id","config":{"type":"create_or_edit_existing"}}},"Create new avatar with avaturn creation UI":{"value":{"user_id":"your-user-id","config":{"type":"create"}}},"Edit existing avatar":{"value":{"user_id":"your-user-id","config":{"type":"edit_existing","avatar_id":"<put-avatar-id>"}}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/{user_id}/avatars":{"get":{"summary":"List User Avatars","description":"List user avatars.\n\nBy default, only completely and successfully processed avatars returned.\nIf you need to return all user avatars, set `include_not_ready=true`","operationId":"list_user_avatars_api_v1_users__user_id__avatars_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$","description":"User ID","title":"User Id"},"description":"User ID"},{"name":"include_not_ready","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Not Ready"}}],"responses":{"200":{"description":"List of avatars owned by this user","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvatarListItem"},"title":"Response List User Avatars Api V1 Users  User Id  Avatars Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/avatars/new":{"post":{"summary":"New Avatar","description":"Create new avatar for given user from images.\n\nThis endpoint creates a provisional avatar for the specified user.\nIt responds with an `avatar_id` and `upload_url`. To complete the creation,\n[upload the images](https://docs.avaturn.me/docs/integration/api/create-avatar-with-api/#2-send-a-request-to-the-upload-url-with-images-and-metadata-from-your-frontend-or-backend)\nusing the multipart/form-data request to `upload_url`\nand [wait for processing to complete](https://docs.avaturn.me/docs/integration/api/create-avatar-with-api/#3-receive-a-webhook-when-processing-is-done-or-wait-for-completion-in-the-editor).\n\nSee [detailed guide](https://docs.avaturn.me/docs/integration/api/create-avatar-with-api/) for more information.","operationId":"new_avatar_api_v1_avatars_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewAvatarRequest"}}},"required":true},"responses":{"200":{"description":"Provisional avatar is created. Photo upload awaited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewAvatarResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/avatars/{id}/customization":{"get":{"summary":"Get Customization","description":"Get current avatar customization.\n\nCustomization is the combination of applied assets\n(clothes, hairstyles, accessories etc),\nas well as the body type and other parameters (age, eyes color, skin tone correction and bones scale).\n\n**NOTE**: Behavior of this endpoint for avatars created by direct photo upload and\nnot yet opened via browser UNDEFINED and can be changed in the future.\nSet customization via corresponding endpoint to get predictable behaviour.","operationId":"get_customization_api_v1_avatars__id__customization_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalAvatarCustomization-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Set Customization","description":"Set avatar customization.\n\nCustomization is the combination of applied assets (clothes, hairstyles, accessories etc), as well as the body type and other parameters.You can set not more than one assets in each category.","operationId":"set_customization_api_v1_avatars__id__customization_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalAvatarCustomization-Input"}}}},"responses":{"202":{"description":"Avatar configuration updated","content":{"application/json":{"schema":{}}}},"410":{"description":"Asset(s) 01a03358-a6a2-72cf-a03a-e684aaa6f0ef, 01a03358-a6a3-7ecd-bc8d-d964b28e80d5 not found in project","content":{"application/json":{"example":{"error_code":"assets_not_in_project","detail":"Asset(s) 01a03358-a6a2-72cf-a03a-e684aaa6f0ef, 01a03358-a6a3-7ecd-bc8d-d964b28e80d5 not found in project","assets_id":["01a03358-a6a2-72cf-a03a-e684aaa6f0ef","01a03358-a6a3-7ecd-bc8d-d964b28e80d5"]},"schema":{"$ref":"#/components/schemas/web_avatar__developer_api__api__avatars__AssetNotInProjectError__Model"}}}},"409":{"description":"Asset 01a03358-a6a4-74c9-98da-f91c3e3f9b9d added to wrong placement - clothing","content":{"application/json":{"example":{"error_code":"asset_placement_error","detail":"Asset 01a03358-a6a4-74c9-98da-f91c3e3f9b9d added to wrong placement - clothing","asset_id":"01a03358-a6a4-74c9-98da-f91c3e3f9b9d","placement":"clothing"},"schema":{"$ref":"#/components/schemas/web_avatar__developer_api__api__avatars__AssetPlacementError__Model"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}/avatars/{avatar_id}":{"delete":{"summary":"Delete User Avatar","description":"Delete avatar owned by user. Deletes all corresponding data, including cached export models.","operationId":"delete_user_avatar_api_v1_users__user_id__avatars__avatar_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$","title":"User Id"}},{"name":"avatar_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Avatar Id"}}],"responses":{"200":{"description":"Avatar deleted","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/renders/new":{"post":{"summary":"Render User Avatar Async","description":"Renders a scene with specified avatar.\n\nBy default, use scene `common/preview`. Other available scenes can be found\nin [render docs](https://docs.avaturn.me/docs/integration/api/renders/#available-scenes).\nContact avaturn support for detailed instructions how to provide your own scenes.\n\nThe endpoint works the following way:\n\n1. You send a request to the `/renders/new` endpoint\n2. The endpoint creates a rendering task and responds with its id.\n3. After rendering is completed, avaturn sends a `render.ready` webhook,\n   which contains a task ID and a link to the rendering result.\n\n<!--\nIf the `wait=true` query parameter is present, the response will contain\n`status='ready'` and the `render_url` will provide a link to the result.\nNote that a hard timeout (60 seconds) is applied.\nWe recommend using this feature for convenience only. If you need robustness, switch to webhooks.\n-->\n\n**NOTE**: Behavior of this endpoint for avatars created by direct photo upload and\nnot yet opened via browser UNDEFINED and can be changed in the future.\nSet customization via corresponding endpoint to get predictable behaviour.","operationId":"create_render","security":[{"HTTPBearer":[]}],"parameters":[{"name":"avatar_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"ID of avatar to render","title":"Avatar Id"},"description":"ID of avatar to render"},{"name":"scene","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_/]+$","title":"Scene"}},{"name":"format","in":"query","required":false,"schema":{"enum":["jpg","png","webp"],"type":"string","description":"Output image format. Use png or webp for transparency support. Default jpg.","default":"jpg","title":"Format"},"description":"Output image format. Use png or webp for transparency support. Default jpg."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/exports/new":{"post":{"summary":"Create Export","description":"Exports a specified avatar.\n\nThe endpoint works the following way:\n\n1) You send a request to the /exports/new endpoint.\n    * If this version of avatar wasn't exported yet, the response will contain\n      `status='pending'` and the export task will be created. The `url` will be `null`.\n    * If it was successfully exported previously, the response will contain\n      `status='ready'` and `url` will contain a link to the result. The URL is **temporary** and can only be\n      used to download model to your servers. Don't store it to the database.\n      <!--\n          * If the `wait=true` query parameter is present, the response will contain\n            `status='ready'` and the `url` will provide a link to the result.\n            Note that a hard timeout (60 seconds) is applied.\n            We recommend using this feature for convenience only. If you need robustness, switch to webhooks.\n      -->\n2) If the task was created on step 1, on its completion avaturn will send an `export.ready` webhook,\n   which will contain a **temporary** link to the export result.\n\n**NOTE**: Behavior of this endpoint for avatars created by direct photo upload and\nnot yet opened via browser UNDEFINED and can be changed in the future.\nSet customization via corresponding endpoint to get predictable behaviour.","operationId":"create_export","security":[{"HTTPBearer":[]}],"parameters":[{"name":"avatar_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"ID of avatar to export","title":"Avatar Id"},"description":"ID of avatar to export"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewExportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"webhooks":{"render.ready":{"post":{"tags":["Webhooks"],"summary":"","description":"Triggered after rendering completes successfully or with failure.\n\n### id\n\nID will be the same as in `/renders/new` response.\n\n### render_url\n* If `status='ready'` -- `render_url` contains url of the image.\n    Url is **temporary** and should be used only to download image to your servers as soon as webhook received.\n* If `status='failed'` -- `render_url` will be null.","operationId":"render.ready","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderReadyWebhook"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"avatar.ready":{"post":{"tags":["Webhooks"],"summary":"","description":"Triggered after avatar created with [/avatars/new](#/operations/new_avatar_api_v1_avatars_new_post)\nsuccessfully completes it's processing.\n\nSee [detailed guide](https://docs.avaturn.me/docs/integration/api/create-avatar-with-api/) for more information.","operationId":"avatar.ready","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarReadyWebhook"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"export.ready":{"post":{"tags":["Webhooks"],"summary":"","description":"Triggered when export completes successfully or with failure.\n\n\n### export_url\n\n* If status=\"ready\" -- `export_url` contains url of the image.\n  Url is **temporary** and should be used only to download model to your servers as soon as webhook received.\n* If status=\"failed\" -- `export_url` will be null.","operationId":"export.ready","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportReadyWebhook"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AssetSlot":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Id of asset (can be obtained in asset manager)"}},"type":"object","required":["id"],"title":"AssetSlot"},"AssetSlotWithColor_Annotated_str__StringConstraints__FieldInfo_annotation_NoneType__required_True__description__RGBA_color_in_hexadecimal_format__like__aabbccaa___examples____aabbccaa_____":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Id of asset (can be obtained in asset manager)"},"color":{"anyOf":[{"type":"string","pattern":"^#([0-9a-f]{2}){4}$","description":"RGBA color in hexadecimal format, like #aabbccaa","examples":["#aabbccaa"]},{"type":"null"}],"title":"Color"}},"type":"object","required":["id"],"title":"AssetSlotWithColor"},"AssetSlotWithColor_Annotated_str__StringConstraints__FieldInfo_annotation_NoneType__required_True__description__RGB_color_in_hexadecimal_format__like__aabbcc___examples____aabbcc_____":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Id of asset (can be obtained in asset manager)"},"color":{"anyOf":[{"type":"string","pattern":"^#([0-9a-f]{2}){3}$","description":"RGB color in hexadecimal format, like #aabbcc","examples":["#aabbcc"]},{"type":"null"}],"title":"Color"}},"type":"object","required":["id"],"title":"AssetSlotWithColor"},"AssetSlots":{"properties":{"clothing":{"anyOf":[{"$ref":"#/components/schemas/AssetSlot"},{"type":"null"}]},"hair_and_headwear":{"anyOf":[{"$ref":"#/components/schemas/AssetSlotWithColor_Annotated_str__StringConstraints__FieldInfo_annotation_NoneType__required_True__description__RGB_color_in_hexadecimal_format__like__aabbcc___examples____aabbcc_____"},{"type":"null"}]},"eyewear":{"anyOf":[{"$ref":"#/components/schemas/AssetSlotWithColor_Annotated_str__StringConstraints__FieldInfo_annotation_NoneType__required_True__description__RGBA_color_in_hexadecimal_format__like__aabbccaa___examples____aabbccaa_____"},{"type":"null"}]},"footwear":{"anyOf":[{"$ref":"#/components/schemas/AssetSlot"},{"type":"null"}]}},"type":"object","title":"AssetSlots"},"AvatarBody":{"type":"string","enum":["body_0","body_1","body_2","body_3","body_4"],"title":"AvatarBody"},"AvatarListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Avatar ID"},"status":{"$ref":"#/components/schemas/ScanStatus"}},"type":"object","required":["id","status"],"title":"AvatarListItem"},"AvatarReadyWebhook":{"properties":{"avatar_id":{"type":"string","format":"uuid","title":"Avatar Id","description":"ID of corresponding avatar"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"ID of user owning the corresponding avatar"},"event":{"type":"string","const":"avatar.ready","title":"Event"},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id","description":"ID of session which avatar was created in (if applicable)"},"status":{"type":"string","enum":["ready","failed"],"title":"Avatar Status"}},"type":"object","required":["avatar_id","user_id","session_id","status"],"title":"AvatarReadyWebhook","description":"Triggered after avatar created with [/avatars/new](#/operations/new_avatar_api_v1_avatars_new_post)\nsuccessfully completes it's processing.\n\nSee [detailed guide](https://docs.avaturn.me/docs/integration/api/create-avatar-with-api/) for more information."},"BoneScale":{"properties":{"head":{"type":"number","title":"Head","default":0.0},"arms":{"type":"number","title":"Arms","default":0.0},"chest":{"type":"number","title":"Chest","default":0.0}},"type":"object","title":"BoneScale"},"CreateOrEditExistingSessionConfig":{"properties":{"type":{"type":"string","const":"create_or_edit_existing","title":"Type","default":"create_or_edit_existing"}},"additionalProperties":false,"type":"object","title":"CreateOrEditExistingSessionConfig"},"CreateSessionConfig":{"properties":{"type":{"type":"string","const":"create","title":"Type","default":"create"},"custom_upload":{"type":"boolean","title":"Custom Upload","description":"Deprecated. Do not use. More info [here](https://docs.avaturn.me/docs/integration/api/create-avatar-with-api/)","default":false,"deprecated":true}},"additionalProperties":false,"type":"object","title":"CreateSessionConfig"},"EditExistingSessionConfig":{"properties":{"type":{"type":"string","const":"edit_existing","title":"Type","default":"edit_existing"},"avatar_id":{"type":"string","format":"uuid","title":"Avatar Id"}},"additionalProperties":false,"type":"object","required":["avatar_id"],"title":"EditExistingSessionConfig"},"ExportReadyWebhook":{"properties":{"avatar_id":{"type":"string","format":"uuid","title":"Avatar Id","description":"ID of corresponding avatar"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"ID of user owning the corresponding avatar"},"event":{"type":"string","const":"export.ready","title":"Event"},"status":{"type":"string","enum":["ready","failed"],"title":"Export Status"},"export_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Export Url","description":"Temporary URL to export result or `null` if export failed"}},"type":"object","required":["avatar_id","user_id","status","export_url"],"title":"ExportReadyWebhook","description":"Triggered when export completes successfully or with failure.\n\n\n### export_url\n\n* If status=\"ready\" -- `export_url` contains url of the image.\n  Url is **temporary** and should be used only to download model to your servers as soon as webhook received.\n* If status=\"failed\" -- `export_url` will be null."},"ExternalAvatarCustomization-Input":{"properties":{"assets":{"$ref":"#/components/schemas/AssetSlots"},"body":{"$ref":"#/components/schemas/AvatarBody","description":"Avatar body type"},"age":{"type":"string","enum":["3-6","7-12","13-16","adult"],"title":"Age","default":"adult"},"metadata":{"additionalProperties":{"type":"string","maxLength":500},"propertyNames":{"maxLength":50},"type":"object","maxProperties":10,"title":"Metadata","description":"Arbitrary key-value pairs. Use them to store any data associated with avatar. 10 pairs max, 50 chars max key length, 500 chars max value length "},"bone_scale":{"$ref":"#/components/schemas/BoneScale"},"skin_tone_correction":{"type":"number","title":"Skin Tone Correction","default":0.0},"eye_texture":{"type":"string","enum":["light_green","amber","blue","blue_gray_yellow","brown","dark_brown","gray","gray_green","green","light_gray"],"title":"Eye Texture","default":"brown"}},"type":"object","required":["assets","body"],"title":"ExternalAvatarCustomization"},"ExternalAvatarCustomization-Output":{"properties":{"assets":{"$ref":"#/components/schemas/AssetSlots"},"body":{"$ref":"#/components/schemas/AvatarBody","description":"Avatar body type"},"age":{"type":"string","enum":["3-6","7-12","13-16","adult"],"title":"Age","default":"adult"},"metadata":{"additionalProperties":{"type":"string","maxLength":500},"propertyNames":{"maxLength":50},"type":"object","maxProperties":10,"title":"Metadata","description":"Arbitrary key-value pairs. Use them to store any data associated with avatar. 10 pairs max, 50 chars max key length, 500 chars max value length "},"bone_scale":{"$ref":"#/components/schemas/BoneScale"},"skin_tone_correction":{"type":"number","title":"Skin Tone Correction","default":0.0},"eye_texture":{"type":"string","enum":["light_green","amber","blue","blue_gray_yellow","brown","dark_brown","gray","gray_green","green","light_gray"],"title":"Eye Texture","default":"brown"}},"type":"object","required":["assets","body"],"title":"ExternalAvatarCustomization"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NewAvatarRequest":{"properties":{"user_id":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","title":"User Id","description":"User ID","examples":["<put-user-id-here>"]}},"type":"object","required":["user_id"],"title":"NewAvatarRequest"},"NewAvatarResponse":{"properties":{"avatar_id":{"type":"string","format":"uuid","title":"Avatar Id","description":"Avatar ID"},"upload_url":{"type":"string","title":"Upload Url","description":"Url for upload. See [here](https://docs.avaturn.me/docs/integration/api/create-avatar-with-api/#2-send-a-request-to-the-upload-url-with-images-and-metadata-from-your-frontend-or-backend)"}},"type":"object","required":["avatar_id","upload_url"],"title":"NewAvatarResponse"},"NewExportResponse":{"properties":{"status":{"type":"string","enum":["pending","ready","failed"],"title":"Status"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Exported model URL if `status='ready'`, otherwise null"}},"type":"object","required":["status","url"],"title":"NewExportResponse"},"NewSessionRequest":{"properties":{"user_id":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","title":"User Id"},"config":{"oneOf":[{"$ref":"#/components/schemas/EditExistingSessionConfig"},{"$ref":"#/components/schemas/CreateOrEditExistingSessionConfig"},{"$ref":"#/components/schemas/CreateSessionConfig"}],"title":"Config","default":{"type":"create_or_edit_existing"},"discriminator":{"propertyName":"type","mapping":{"create":"#/components/schemas/CreateSessionConfig","create_or_edit_existing":"#/components/schemas/CreateOrEditExistingSessionConfig","edit_existing":"#/components/schemas/EditExistingSessionConfig"}}}},"type":"object","required":["user_id"],"title":"NewSessionRequest"},"NewSessionResponse":{"properties":{"url":{"type":"string","title":"Url","description":"Url to open on frontend"},"id":{"type":"string","format":"uuid","title":"Id","description":"Session id"},"custom_upload_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Upload Url","description":"Deprecated. Do not use. More info [here](https://docs.avaturn.me/docs/integration/api/create-avatar-with-api/)","deprecated":true}},"type":"object","required":["url","id"],"title":"NewSessionResponse"},"NewUserResponse":{"properties":{"id":{"type":"string","title":"Id","examples":["TGTLFCCRG67V6ERUMDTK3JNI5AYGF6XF"]}},"type":"object","required":["id"],"title":"NewUserResponse"},"RenderReadyWebhook":{"properties":{"avatar_id":{"type":"string","format":"uuid","title":"Avatar Id","description":"ID of corresponding avatar"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"ID of user owning the corresponding avatar"},"event":{"type":"string","const":"render.ready","title":"Event"},"id":{"type":"string","format":"uuid","title":"Id","description":"Render ID. Matches the one form /renders/new response"},"status":{"type":"string","enum":["ready","failed"],"title":"Status"},"render_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Url","description":"Temporary URL to render if rendering was successful or `null` if not. Use it to download the file and store it on your servers"}},"type":"object","required":["avatar_id","user_id","id","status","render_url"],"title":"RenderReadyWebhook","description":"Triggered after rendering completes successfully or with failure.\n\n### id\n\nID will be the same as in `/renders/new` response.\n\n### render_url\n* If `status='ready'` -- `render_url` contains url of the image.\n    Url is **temporary** and should be used only to download image to your servers as soon as webhook received.\n* If `status='failed'` -- `render_url` will be null."},"RenderResult":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/RenderStatus"},"render_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Url"}},"type":"object","required":["id","status","render_url"],"title":"RenderResult"},"RenderStatus":{"type":"string","enum":["pending","ready","failed"],"title":"RenderStatus"},"ScanStatus":{"type":"string","enum":["pending","processing","ready","failed"],"title":"ScanStatus"},"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"},"web_avatar__developer_api__api__avatars__AssetNotInProjectError__Model":{"properties":{"error_code":{"type":"string","title":"Error Code"},"detail":{"type":"string","title":"Detail"},"assets_id":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Assets Id"}},"type":"object","required":["error_code","detail","assets_id"],"title":"Model"},"web_avatar__developer_api__api__avatars__AssetPlacementError__Model":{"properties":{"error_code":{"type":"string","title":"Error Code"},"detail":{"type":"string","title":"Detail"},"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"placement":{"type":"string","title":"Placement"}},"type":"object","required":["error_code","detail","asset_id","placement"],"title":"Model"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"Project API token from developer portal","scheme":"bearer"}}}}