Quickstart

# Quickstart > User media is private: uploads return opaque references, while media fields in read responses are temporary signed URLs valid for two hours. [Private media access](/media-access). This walkthrough clones an avatar and a voice, then generates a video. Every step is asynchronous — you create a resource, then poll it until it is ready. ## 1. Upload a selfie ```bash curl -s https://api.odrazio.com/v1/uploads/image \ -H "Authorization: Bearer $ODRAZIO_KEY" \ -H "Content-Type: application/json" \ -d '{"file":"data:image/jpeg;base64,/9j/4AAQ..."}' # → { "success": true, "data": { "url": "uploads/cmg7z9x1y0000abcd5678wxyz/images/1752312000000-a1b2c3d4.jpg" } } ``` ## 2. Create an avatar ```bash curl -s https://api.odrazio.com/v1/avatars \ -H "Authorization: Bearer $ODRAZIO_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"My avatar","imageUrl":"uploads/cmg7z9x1y0000abcd5678wxyz/images/1752312000000-a1b2c3d4.jpg"}' ``` Poll `GET /v1/avatars/:id` until its `generatedImages` are `COMPLETED`, and note an image `id` for video generation. ## 3. Clone a voice ```bash # upload a reference sample first via /v1/uploads/audio, then: curl -s https://api.odrazio.com/v1/voices \ -H "Authorization: Bearer $ODRAZIO_KEY" \ -H "Content-Type: application/json" \ -d '{ "name":"My voice", "language":"en", "audioUrl":"uploads/cmg7z9x1y0000abcd5678wxyz/audio/1752312000000-b2c3d4e5.wav", "referenceText":"The exact words spoken in the sample." }' ``` Poll `GET /v1/voices/:id` until `status` is `READY`. ## 4. Generate a video ```bash curl -s https://api.odrazio.com/v1/generations \ -H "Authorization: Bearer $ODRAZIO_KEY" \ -H "Content-Type: application/json" \ -d '{ "avatarId":"…", "voiceId":"…", "type":"VIDEO", "inputText":"Hello world.", "language":"en", "resolution":"720p", "avatarImageId":"…" }' ``` ## 5. Poll for the result ```bash curl -s https://api.odrazio.com/v1/generations/GEN_ID \ -H "Authorization: Bearer $ODRAZIO_KEY" ``` When `status` is `COMPLETED`, read `videoUrl` (or `ttsAudioUrl` for a `type: "TTS"` job). A TTS request still requires a ready `avatarId` in the current public API, but it does **not** need `resolution` or `avatarImageId`. Use the avatar created above or a built-in avatar for audio-only work.