API docs › Recipes
UGC ad with an AI creator
A made-up creator talks about your product to a phone camera, with the product in hand: 1 to 3 clips of 8 seconds, with captions.
Upload a product photo (optional, so the product on screen is the real one) (multipart field "file"). The answer has the input id ("t-…"):
curl -X POST https://photonsphere.ai/api/tools -H "Authorization: Bearer nok_YOUR_KEY" -F "file=@my-file" # → {"id":"t-…","kind":"video|audio|image|text"}Run the tool (credits shown in the app are charged now and refunded if it fails):
curl -X PUT https://photonsphere.ai/api/tools -H "Authorization: Bearer nok_YOUR_KEY" -H "Content-Type: application/json" \ -d '{"input":"","tool":"ugcad","params":{"product":"Glow Drops vitamin C serum","benefit":"three drops in the morning and my skin looks awake","format":"review","creator":"skincare","place":"bathroom","clips":2,"photo":"t-PHOTO","language":"en"}}' # → {"id":"JOB_ID"}Poll the job, then download the result:
curl https://photonsphere.ai/api/tools/JOB_ID -H "Authorization: Bearer nok_YOUR_KEY" # {"state":"running"|"ready"|"error","progress":0-100} curl -o result.mp4 "https://photonsphere.ai/api/tools/JOB_ID?download=1" -H "Authorization: Bearer nok_YOUR_KEY"
All calls need Authorization: Bearer nok_… (see Authentication). Prices are the same as in the app.