First, you need to register a YouCam API account for free at https://yce.makeupar.com/. You can then purchase or subscribe to get your units to use the service. You can see your subscription plan, pay as you go units, and your usage record at https://yce.makeupar.com/api-console/en/api-keys/. You can go to the API Key tab under your account page to generate and maintain your API keys to start using the YouCam API.
- Include your API key in the request header using Bearer Token:
Authorization: Bearer YOUR_API_KEY
You can find your API Key at https://yce.makeupar.com/api-console/en/api-keys/.
- Invoke the File API
- Get an ulpoad URL
requests.urland a correspondingfile_idfrom the File API response. - Use the
requests.urlfrom the File API response to upload the image
- Send the uploaded image along with the AI task configuration via an HTTP POST request to
/s2s/v2.0/task/skin-analysis. Use AI Skin Analysis task here for example. - Await a unique task ID in the response, which identifies this interaction.
- Use the obtained
task_idto periodically poll the task status using an HTTP GET request (e.g.,GET /skin-analysis/${task_id}). Use AI Skin Analysis task here for example. - Continuously monitor for:
Task_status = "success"(process completed).Task_status = "error"(resolve or retry if applicable).
- Update the workflow accordingly once the status transitions to success.
- A successful response includes a download URL for the result image.