### Example Avatar Response Source: https://docs.dev.runwayml.com/api/#tag/Start-generating/paths/~1v1~1image_to_video/post This is an example of a successful response when creating an avatar, showing the structure of the returned avatar object. ```json { * "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", * "name": "string", * "personality": "string", * "startScript": "string", * "voice": { * "type": "runway-live-preset", * "presetId": "victoria", * "name": "string", * "description": "string" }, * "referenceImageUri": "string", * "processedImageUri": "string", * "documentIds": [ * "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], * "createdAt": "2019-08-24T14:15:22Z", * "updatedAt": "2019-08-24T14:15:22Z", * "status": "AvatarProcessing" } ``` -------------------------------- ### POST /v1/image_to_video Source: https://docs.dev.runwayml.com/api Starts a new task to generate a video from an image. ```APIDOC ## POST /v1/image_to_video ### Description This endpoint will start a new task to generate a video from an image. ### Method POST ### Endpoint /v1/image_to_video ### Authentication Use the HTTP `Authorization` header with the `Bearer` scheme along with an API key. ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. This field must be set to the exact value `2024-11-06`. ### Request Body - **model** (string) - Required - Accepted values: "gen4.5", "gen4_turbo", "gen3a_turbo", "veo3.1", "veo3.1_fast", "veo3". - **promptText** (string) - Required - A non-empty string up to 1000 characters describing the desired output. - **promptImage** (string or Array of PromptImages) - Required - A HTTPS URL, Runway or data URI containing an encoded image, or an array of PromptImages. - **PromptImages** (Array of objects) - Required - An array containing at least one PromptImage object. - **uri** (string) - Required - A HTTPS URL, Runway or data URI containing an encoded image. - **position** (string) - Required - The position of the image in the output video. Must be set to the exact value `first`. - **ratio** (string) - Required - The resolution of the output video. Accepted values: "1280:720", "720:1280", "1104:832", "960:960", "832:1104", "1584:672". - **duration** (integer) - Required - The number of seconds of duration for the output video. Must be an integer from 2 to 10. - **seed** (integer) - Optional - If unspecified, a random number is chosen. Varying the seed integer is a way to get different results for the same other request parameters. Using the same seed integer for an identical request will produce similar results. - **contentModeration** (object) - Optional - Settings that affect the behavior of the content moderation system. - **publicFigureThreshold** (string) - Optional - Accepted values: "auto", "low". When set to `low`, the content moderation system will be less strict about preventing generations that include recognizable public figures. ### Request Example ```json { "model": "gen4_turbo", "promptImage": "https://example.com/bunny.jpg", "promptText": "A cute bunny hopping in a meadow", "duration": 10 } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created task. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } ``` #### Error Response (429) - You have exceeded the rate limit for this endpoint. ``` -------------------------------- ### POST /v1/text_to_video Source: https://docs.dev.runwayml.com/api Starts a new task to generate a video from a text prompt. ```APIDOC ## POST /v1/text_to_video ### Description This endpoint will start a new task to generate a video from a text prompt. ### Method POST ### Endpoint /v1/text_to_video ### Authentication Use the HTTP `Authorization` header with the `Bearer` scheme along with an API key. ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. This field must be set to the exact value `2024-11-06`. ``` -------------------------------- ### Generate Avatar Video using Node.js SDK Source: https://docs.dev.runwayml.com/api Initiates an asynchronous task to generate an avatar video. This example uses text-to-speech with a preset voice. Poll the task ID for completion and retrieve the video URL. Ensure the SDK is installed and the API secret is set as an environment variable. ```javascript // npm install --save @runwayml/sdk import RunwayML from '@runwayml/sdk'; // The env var RUNWAYML_API_SECRET is expected to contain your API key. const client = new RunwayML(); const task = await client.avatarVideos .create({ model: 'gwm1_avatars', avatar: { type: 'runway-preset', presetId: 'influencer', }, speech: { type: 'text', text: 'Welcome to Runway! I can help you create amazing videos.', voice: { type: 'preset', presetId: 'clara' }, }, }) .waitForTaskOutput(); console.log(task); ``` -------------------------------- ### Use promptImage with a single image object at the beginning Source: https://docs.dev.runwayml.com/api-details/versions/2024-11-06 Example of using the `promptImage` parameter with an image object, specifying its position as 'first'. ```json { "promptImage": [ { "uri": "https://example.com/image.jpg", "position": "first" } ] } ``` -------------------------------- ### POST /v1/sound_effect Source: https://docs.dev.runwayml.com/api Starts a new task to generate sound effects from a text description. ```APIDOC ## POST /v1/sound_effect ### Description This endpoint will start a new task to generate sound effects from a text description. ### Method POST ### Endpoint /v1/sound_effect ### Authentication - **Authorization** - Use the HTTP `Authorization` header with the `Bearer` scheme along with an API key. ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. This field must be set to the exact value `2024-11-06`. ``` -------------------------------- ### Use promptImage with multiple image objects Source: https://docs.dev.runwayml.com/api-details/versions/2024-11-06 Example of using the `promptImage` parameter with two image objects, one at the 'first' position and another at the 'last' position. ```json { "promptImage": [ { "uri": "https://example.com/image1.jpg", "position": "first" }, { "uri": "https://example.com/image2.jpg", "position": "last" } ] } ``` -------------------------------- ### Generate Avatar Video Source: https://docs.dev.runwayml.com/api Starts an asynchronous task to generate a video of an avatar speaking. Poll GET /v1/tasks/:id to check progress and retrieve the output video URL once complete. ```APIDOC ## POST /v1/avatar_videos ### Description Generate avatar video from audio or text. ### Method POST ### Endpoint /v1/avatar_videos ### Authentication Use the HTTP `Authorization` header with the `Bearer` scheme along with an API key. ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. This field must be set to the exact value `2024-11-06`. ### Request Body - **model** (string) - Required - The model to use for avatar video generation. This field must be set to the exact value `gwm1_avatars`. - **avatar** (RunwayPresetAvatar or CustomAvatar) - Required - The avatar configuration for the session. - **RunwayPresetAvatar** (object) - **type** (string) - Required - This field must be set to the exact value `runway-preset`. - **presetId** (string) - Required - Accepted values:"game-character", "music-superstar", "game-character-man", "cat-character", "influencer", "tennis-coach", "human-resource", "fashion-designer", "cooking-teacher" - ID of a preset avatar. - **CustomAvatar** (object) - **type** (string) - Required - This field must be set to the exact value `custom`. - **avatarId** (string) - Required - ID of a user-created avatar. - **speech** (AudioInput or TextInput) - Required - The speech source for avatar video generation. Either an audio file or text script. - **AudioInput** (object) - **type** (string) - Required - This field must be set to the exact value `audio`. - **audio** (string) - Required - A HTTPS URL, Runway or data URI containing an encoded audio. - **TextInput** (object) - **type** (string) - Required - This field must be set to the exact value `text`. - **text** (string) - Required - Text script for speech-driven video generation. - **voice** (RunwayPresetVoice or CustomVoice) - Optional - Voice override for TTS. - **RunwayPresetVoice** (object) - **type** (string) - Required - This field must be set to the exact value `preset`. - **presetId** (string) - Required - Accepted values:"victoria", "vincent", "clara", "drew", "skye", "max", "morgan", "felix", "mia", "marcus", "summer", "ruby", "aurora", "jasper", "leo", "adrian", "nina", "emma", "blake", "david", "maya", "nathan", "sam", "georgia", "petra", "adam", "zach", "violet", "roman", "luna". - **CustomVoice** (object) - **type** (string) - Required - This field must be set to the exact value `custom`. - **id** (string) - Required - ID of a custom voice. ### Responses #### Success Response (200) - **id** (string) - The ID of the generated task. ### Request Example ```json { "model": "gwm1_avatars", "avatar": { "type": "runway-preset", "presetId": "influencer" }, "speech": { "type": "text", "text": "Welcome to Runway! I can help you create amazing videos.", "voice": { "type": "preset", "presetId": "clara" } } } ``` ``` -------------------------------- ### POST /v1/character_performances Source: https://docs.dev.runwayml.com/api Starts a new task to generate a character performance based on provided character and reference media. ```APIDOC ## POST /v1/character_performances ### Description This endpoint starts a new task to generate a character performance. You can provide a character image or video and a reference video for the performance. ### Method POST ### Endpoint /v1/character_performances ### Parameters #### Request Body - **model** (string) - Required - This field must be set to the exact value `act_two`. - **character** (object) - Required - The character to control. Can be `CharacterImage` or `CharacterVideo`. - **type** (string) - Required - Must be `image` or `video`. - **uri** (string) - Required - A HTTPS URL, Runway upload URI, or data URI for the character media. - **reference** (object) - Required - The reference video containing the performance to apply to the character (`CharacterReferenceVideo`). - **type** (string) - Required - Must be `video`. - **uri** (string) - Required - A HTTPS URL, Runway upload URI, or data URI for the reference video. - **seed** (integer) - Optional - An integer between 0 and 4294967295. Used to generate reproducible results. - **bodyControl** (boolean) - Optional - A boolean indicating whether to enable body control. - **expressionIntensity** (integer) - Optional - An integer between 1 and 5. Default: 3. Increases the intensity of the character's expression. - **ratio** (string) - Optional - The resolution of the output video. Accepted values: "1280:720", "720:1280", "960:960", "1104:832", "832:1104", "1584:672". - **contentModeration** (object) - Optional - Settings that affect the behavior of the content moderation system. - **publicFigureThreshold** (string) - Optional - Accepted values: "auto", "low". Less strict about recognizable public figures when set to `low`. ### Request Example ```json { "model": "act_two", "character": { "type": "video", "uri": "https://example.com/posedCharacter.mp4" }, "reference": { "type": "video", "uri": "https://example.com/actorPerformance.mp4" }, "ratio": "1280:720" } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created task. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } ``` ### Error Handling - **429** - You have exceeded the rate limit for this endpoint. ``` -------------------------------- ### Use promptImage with a single string URI Source: https://docs.dev.runwayml.com/api-details/versions/2024-11-06 Example of using the `promptImage` parameter with a single image URI string. ```json { "promptImage": "https://example.com/image.jpg" } ``` -------------------------------- ### Use promptImage with a single image object at the end Source: https://docs.dev.runwayml.com/api-details/versions/2024-11-06 Example of using the `promptImage` parameter with an image object, specifying its position as 'last'. This will make the video end with the image. ```json { "promptImage": [ { "uri": "https://example.com/image.jpg", "position": "last" } ] } ``` -------------------------------- ### Run a Published Workflow Source: https://docs.dev.runwayml.com/api Starts a new task to execute a published workflow. ```APIDOC ## POST /v1/workflows/{id} ### Description Starts a new task to execute a published workflow. You can optionally provide custom input values via `nodeOutputs` to override the defaults defined in the workflow graph. ### Method POST ### Endpoint /v1/workflows/{id} ### Headers - **Authorization** (string) - Required - Use the HTTP `Authorization` header with the `Bearer` scheme along with an API key. - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. Must be set to `2024-11-06`. ### Path Parameters - **id** (string) - Required - The ID of the published workflow to run. You can copy this value from the developer portal. ### Request Body (Optional) - `nodeOutputs`: An object where keys are node IDs and values are the custom inputs for those nodes. ``` -------------------------------- ### Get Organization Information Source: https://docs.dev.runwayml.com/api Retrieves usage tier and credit balance for the organization. ```APIDOC ## Get Organization Information ### Description Get usage tier and credit balance information about the organization associated with the API key used to make the request. ### Method GET ### Endpoint /v1/organization ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. Must be set to `2024-11-06`. - **Authorization** (string) - Required - Bearer token for authentication. ### Responses #### Success Response (200) - **tier** (object) - Information about the organization's tier. - **maxMonthlyCreditSpend** (number) - **models** (object) - Details on model limits. - **[model_name]** (object) - **maxConcurrentGenerations** (number) - **maxDailyGenerations** (number) - **creditBalance** (number) - The current credit balance. - **usage** (object) - Current usage statistics. - **models** (object) - **[model_name]** (object) - **dailyGenerations** (number) #### Response Example ```json { "tier": { "maxMonthlyCreditSpend": 9007199254740991, "models": { "property1": { "maxConcurrentGenerations": 9007199254740991, "maxDailyGenerations": 9007199254740991 }, "property2": { "maxConcurrentGenerations": 9007199254740991, "maxDailyGenerations": 9007199254740991 } } }, "creditBalance": 9007199254740991, "usage": { "models": { "property1": { "dailyGenerations": 9007199254740991 }, "property2": { "dailyGenerations": 9007199254740991 } } } } ``` ``` -------------------------------- ### Video to Video Generation API Source: https://docs.dev.runwayml.com/api This endpoint starts a new task to generate a video based on an input video and a prompt. ```APIDOC ## Video to Video Generation ### Description This endpoint will start a new task to generate a video based on an input video and a prompt. ### Method POST ### Endpoint /v1/video_to_video ### Request Body - **model** (string) - Required - Accepted values: "gen4_aleph" - **videoUri** (string) - Required - The URI of the input video. - **promptText** (string) - Required - A description of the desired output video. - **references** (array of objects) - Required - An array of reference objects, each containing a `type` and `uri`. - **type** (string) - Required - Accepted values: "image" - **uri** (string) - Required - The URI of the reference image. - **ratio** (string) - Required - The desired aspect ratio for the output video (e.g., "1280:720"). ### Request Example ```json { "model": "gen4_aleph", "videoUri": "https://example.com/bunny.mp4", "promptText": "string", "references": [ { "type": "image", "uri": "https://example.com/easter-scene.jpg" } ], "ratio": "1280:720" } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created task. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } ``` ``` -------------------------------- ### Speech to Speech API Source: https://docs.dev.runwayml.com/api This endpoint starts a new task to generate speech from audio. ```APIDOC ## Speech to Speech API ### Description This endpoint starts a new task to generate speech from audio. ### Method POST ### Endpoint /v1/speech_to_speech ### Request Body - **model** (string) - Required - This field must be set to the exact value `eleven_multilingual_sts_v2`. - **media** (object) - Required - The media to process. - **type** (string) - Required - Must be `audio` or `video`. - **uri** (string) - Required - A HTTPS URL to the audio or video file. - **voice** (object) - Required - The voice to use for the generated speech. - **type** (string) - Required - Must be `runway-preset`. - **presetId** (string) - Required - The preset voice ID to use for the generated speech. Accepted values: "Maggie", "Noah", etc. ### Request Example ```json { "model": "eleven_multilingual_sts_v2", "media": { "type": "audio", "uri": "https://example.com/audio.mp3" }, "voice": { "type": "runway-preset", "presetId": "Maggie" } } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created task. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } ``` ``` -------------------------------- ### Speech to Speech API Source: https://docs.dev.runwayml.com/api/#tag/Start-generating/paths/~1v1~1image_to_video/post This endpoint starts a new task to generate speech from audio or video input. ```APIDOC ## Speech to Speech API ### Description This endpoint starts a new task to generate speech from audio or video input. ### Method POST ### Endpoint /v1/speech_to_speech ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. Must be set to `2024-11-06`. - **Authorization** (string) - Required - Use the HTTP `Authorization` header with the `Bearer` scheme along with an API key. ### Request Body - **model** (string) - Required - Must be set to the exact value `eleven_multilingual_sts_v2`. - **media** (object) - Required - The input media for speech generation. - **type** (string) - Required - Must be set to `audio` or `video`. - **uri** (string) - Required - A HTTPS URL to the audio or video file. - **voice** (object) - Required - The voice to use for the generated speech. - **type** (string) - Required - Must be set to `runway-preset`. - **presetId** (string) - Required - The preset voice ID to use (e.g., "Maggie", "Noah"). ### Request Example ```json { "model": "eleven_multilingual_sts_v2", "media": { "type": "audio", "uri": "https://example.com/audio.mp3" }, "voice": { "type": "runway-preset", "presetId": "Maggie" } } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created task. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } ``` #### Error Response (429) - **message** (string) - You have exceeded the rate limit for this endpoint. ``` -------------------------------- ### Generate Video from Image using Node.js SDK Source: https://docs.dev.runwayml.com/api Use the Node.js SDK to start a new task for generating a video from an image. Ensure the RUNWAYML_API_SECRET environment variable is set with your API key. The .waitForTaskOutput() method waits for the generation to complete. ```javascript // npm install --save @runwayml/sdk import RunwayML from '@runwayml/sdk'; // The env var RUNWAYML_API_SECRET is expected to contain your API key. const client = new RunwayML(); const task = await client.imageToVideo .create({ model: 'gen4_turbo', promptImage: 'https://example.com/bunny.jpg', promptText: 'A cute bunny hopping in a meadow', duration: 10, }) .waitForTaskOutput(); console.log(task); ``` -------------------------------- ### Text to Speech API Source: https://docs.dev.runwayml.com/api This endpoint will start a new task to generate speech from text. ```APIDOC ## Text to Speech API ### Description This endpoint will start a new task to generate speech from text. ### Method POST ### Endpoint /v1/text_to_speech ### Authentication `Authorization`: Use the HTTP `Authorization` header with the `Bearer` scheme along with an API key. ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. Must be set to `2024-11-06`. ### Request Body - **model** (string) - Required - This field must be set to the exact value `eleven_multilingual_v2`. - **promptText** (string) - Required - A non-empty string up to 1000 characters describing the desired speech. - **voice** (object) - Required - The voice to use for the generated speech. - **type** (string) - Required - Must be `runway-preset`. - **presetId** (string) - Required - The preset voice ID. Accepted values: "Maya", "Arjun", "Serene", "Bernard", "Billy", "Mark", "Clint", "Mabel", "Chad", "Leslie", "Eleanor", "Elias", "Elliot", "Grungle", "Brodie", "Sandra", "Kirk", "Kylie", "Lara", "Lisa", "Malachi", "Marlene", "Martin", "Miriam", "Monster", "Paula", "Pip", "Rusty", "Ragnar", "Xylar", "Maggie", "Jack", "Katie", "Noah", "James", "Rina", "Ella", "Mariah", "Frank", "Claudia", "Niki", "Vincent", "Kendrick", "Myrna", "Tom", "Wanda", "Benjamin", "Kiana", "Rachel". ### Request Example ```json { "model": "eleven_multilingual_v2", "promptText": "The quick brown fox jumps over the lazy dog", "voice": { "type": "runway-preset", "presetId": "Leslie" } } ``` ### Response #### Success Response (200) - **id** (string) - The ID of the created task. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } ``` ``` -------------------------------- ### Generate Avatar Video Source: https://docs.dev.runwayml.com/api/#tag/Start-generating/paths/~1v1~1image_to_video/post Starts an asynchronous task to generate a video of an avatar speaking. You can provide speech as either an audio file or text for Text-to-Speech (TTS). Progress can be monitored by polling the GET /v1/tasks/:id endpoint. ```APIDOC ## POST /v1/avatar_videos ### Description Generate avatar video from audio or text. Start an asynchronous task to generate a video of an avatar speaking. Provide `speech` with `type: "audio"` (audio file) or `type: "text"` (text script for TTS). Poll `GET /v1/tasks/:id` to check progress and retrieve the output video URL once complete. ### Method POST ### Endpoint /v1/avatar_videos ### Authentication Use the HTTP `Authorization` header with the `Bearer` scheme along with an API key. ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. Must be set to `2024-11-06`. ### Request Body - **model** (string) - Required - The model to use for avatar video generation. Must be set to `gwm1_avatars`. - **avatar** (RunwayPresetAvatar or CustomAvatar) - Required - The avatar configuration. - **RunwayPresetAvatar** (object) - **type** (string) - Required - Must be `runway-preset`. - **presetId** (string) - Required - Accepted values: `game-character`, `music-superstar`, `game-character-man`, `cat-character`, `influencer`, `tennis-coach`, `human-resource`, `fashion-designer`, `cooking-teacher`. - **CustomAvatar** (object) - **type** (string) - Required - Must be `custom`. - **avatarId** (string) - Required - ID of a user-created avatar. - **speech** (AudioInput or TextInput) - Required - The speech source. - **AudioInput** (object) - **type** (string) - Required - Must be `audio`. - **audio** (string) - Required - A HTTPS URL, Runway, or data URI containing encoded audio. - **TextInput** (object) - **type** (string) - Required - Must be `text`. - **text** (string) - Required - Text script for speech-driven video generation (1-1000 characters). - **voice** (RunwayPresetVoice or CustomVoice) - Optional - Voice override for TTS. - **RunwayPresetVoice** (object) - **type** (string) - Required - Must be `preset`. - **presetId** (string) - Required - Accepted values: `victoria`, `vincent`, `clara`, `drew`, `skye`, `max`, `morgan`, `felix`, `mia`, `marcus`, `summer`, `ruby`, `aurora`, `jasper`, `leo`, `adrian`, `nina`, `emma`, `blake`, `david`, `maya`, `nathan`, `sam`, `georgia`, `petra`, `adam`, `zach`, `violet`, `roman`, `luna`. - **CustomVoice** (object) - **type** (string) - Required - Must be `custom`. - **id** (string) - Required - ID of a custom voice. ### Request Example ```javascript // npm install --save @runwayml/sdk import RunwayML from '@runwayml/sdk'; // The env var RUNWAYML_API_SECRET is expected to contain your API key. const client = new RunwayML(); const task = await client.avatarVideos .create({ model: 'gwm1_avatars', avatar: { type: 'runway-preset', presetId: 'influencer', }, speech: { type: 'text', text: 'Welcome to Runway! I can help you create amazing videos.', voice: { type: 'preset', presetId: 'clara' }, }, }) .waitForTaskOutput(); console.log(task); ``` ### Responses #### Success Response (200) - **id** (string) - The ID of the generated task. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } ``` ``` -------------------------------- ### Upload File and Create Video Generation Task with Node.js SDK Source: https://docs.dev.runwayml.com/api This snippet demonstrates uploading a media file and then using the returned URI to create a video generation task. Ensure the RUNWAYML_API_SECRET environment variable is set. ```javascript // npm install --save @runwayml/sdk import RunwayML from '@runwayml/sdk'; import fs from 'node:fs'; // The env var RUNWAYML_API_SECRET is expected to contain your API key. const client = new RunwayML(); filename = './funny-cats.mp4'; const uploadUri = await client.uploads.createEphemeral( fs.createReadStream(filename), ); // Use the runwayUri in generation requests const task = await client.videoToVideo .create({ model: 'gen4_aleph', videoUri: uploadUri, promptText: 'Add the easter elements to the cat video', references: [ { type: 'image', uri: 'https://example.com/easter-scene.jpg', }, ], ratio: '1280:720', }) .waitForTaskOutput(); console.log(task); ``` -------------------------------- ### Get Avatar Source: https://docs.dev.runwayml.com/api Retrieves details of a specific avatar. ```APIDOC ## Get Avatar GET /v1/avatars/{id} ### Description Get details of a specific avatar. ### Method GET ### Endpoint /v1/avatars/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The avatar ID. ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. Must be set to `2024-11-06`. - **Authorization** (string) - Required - Bearer token for authentication. ### Responses #### Success Response (200) - **id** (string) - The unique identifier for the avatar. - **name** (string) - The name of the avatar. - **personality** (string) - The personality traits of the avatar. - **startScript** (string) - The initial script for the avatar. - **voice** (object) - The voice configuration for the avatar. - **type** (string) - The type of voice (e.g., `runway-live-preset`). - **presetId** (string) - The ID of the voice preset. - **name** (string) - The name of the voice. - **description** (string) - A description of the voice. - **referenceImageUri** (string) - The URI of the reference image for the avatar. - **processedImageUri** (string) - The URI of the processed avatar image. - **documentIds** (array) - List of document IDs associated with the avatar. - **createdAt** (string) - The timestamp when the avatar was created. - **updatedAt** (string) - The timestamp when the avatar was last updated. - **status** (string) - The status of the avatar (e.g., `AvatarProcessing`). ### Request Example ```json { "example": "request body" } ``` ### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "personality": "string", "startScript": "string", "voice": { "type": "runway-live-preset", "presetId": "victoria", "name": "string", "description": "string" }, "referenceImageUri": "string", "processedImageUri": "string", "documentIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "status": "AvatarProcessing" } ``` ``` -------------------------------- ### Get Conversation Source: https://docs.dev.runwayml.com/api Retrieves detailed information about a specific conversation. ```APIDOC ## Get Conversation GET /v1/avatars/{id}/conversations/{conversationId} ### Description Get detailed information about a specific conversation, including the transcript and recording download URL when available. The conversation ID is the same value returned when the realtime session was created. ### Method GET ### Endpoint /v1/avatars/{id}/conversations/{conversationId} ### Parameters #### Path Parameters - **id** (string) - Required - The avatar ID. - **conversationId** (string) - Required - The conversation ID. This is the same value as the realtime session ID for the call. ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. Must be set to `2024-11-06`. - **Authorization** (string) - Required - Bearer token for authentication. ### Responses #### Success Response (200) - **id** (string) - The unique identifier for the conversation. - **name** (string) - The name of the conversation. - **avatar** (object) - Information about the avatar. - **type** (string) - The type of avatar (e.g., `preset`). - **presetId** (string) - The ID of the avatar preset. - **createdAt** (string) - The timestamp when the conversation was created. - **maxDuration** (number) - The maximum duration allowed for the conversation. - **transcript** (array) - The conversation transcript. - **role** (string) - The role of the speaker (e.g., `user`). - **content** (string) - The content of the message. - **timestamp** (string) - The timestamp of the message. - **toolCalls** (array) - List of tool calls made during the conversation. - **id** (string) - The ID of the tool call. - **name** (string) - The name of the tool. - **arguments** (object) - The arguments passed to the tool. - **toolResults** (array) - Results of tool calls. - **id** (string) - The ID of the tool result. - **name** (string) - The name of the tool. - **result** (object) - The result of the tool call. - **error** (string) - Any error message associated with the tool result. - **durationMs** (number) - The duration of the tool execution in milliseconds. - **recordingUrl** (string) - The URL to download the conversation recording. - **tools** (array) - List of tools available for the conversation. - **type** (string) - The type of tool. - **name** (string) - The name of the tool. - **description** (string) - A description of the tool. - **status** (string) - The status of the conversation (e.g., `Option 1`). - **startedAt** (string) - The timestamp when the conversation started. - **duration** (number) - The duration of the conversation. ### Request Example ```json { "example": "request body" } ``` ### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "avatar": { "type": "preset", "presetId": "string" }, "createdAt": "2019-08-24T14:15:22Z", "maxDuration": -9007199254740991, "transcript": [ { "role": "user", "content": "string", "timestamp": "2019-08-24T14:15:22Z", "toolCalls": [ { "id": "string", "name": "string", "arguments": { "property1": null, "property2": null } } ], "toolResults": [ { "id": "string", "name": "string", "result": { "property1": null, "property2": null }, "error": "string", "durationMs": 0 } ] } ], "recordingUrl": "http://example.com", "tools": [ { "type": "client_event", "name": "string", "description": "string" } ], "status": "Option 1", "startedAt": "2019-08-24T14:15:22Z", "duration": -9007199254740991 } ``` ``` -------------------------------- ### Create Realtime Session Source: https://docs.dev.runwayml.com/api This snippet demonstrates how to create a real-time session using the RunwayML SDK. It includes setting up the client and specifying model and avatar details. ```APIDOC ## POST /v1/realtime_sessions ### Description Creates a new real-time session for avatar interactions. ### Method POST ### Endpoint /v1/realtime_sessions ### Request Body - **model** (string) - Required - The model to use for the session. - **avatar** (object) - Required - Details about the avatar. - **type** (string) - Required - The type of avatar ('custom'). - **avatarId** (string) - Required - The ID of the custom avatar. ### Request Example ```json { "model": "gwm1_avatars", "avatar": { "type": "custom", "avatarId": "550e8400-e29b-41d4-a716-446655440000" } } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the real-time session. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" } ``` ``` -------------------------------- ### Get Document Source: https://docs.dev.runwayml.com/api Retrieves the details of a specific knowledge document by its ID. ```APIDOC ## GET /v1/documents/{id} ### Description Gets details of a specific knowledge document. ### Authentication - **Authorization** (string) - Required - Use the HTTP `Authorization` header with the `Bearer` scheme along with an API key. ### Path Parameters - **id** (string) - Required - The unique identifier (UUID) of the document. ### Headers - **X-Runway-Version** (string) - Required - The version of the RunwayML API being used. Must be `2024-11-06`. ### Responses #### Success Response (200) - **id** (string) - The unique identifier of the document. - **name** (string) - The name of the document. - **type** (string) - The type of the document (e.g., 'text'). - **usedBy** (array) - Information about entities using this document. - **content** (string) - The content of the document. - **createdAt** (string) - The timestamp when the document was created. - **updatedAt** (string) - The timestamp when the document was last updated. #### Response Example ```json { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "Document Name", "type": "text", "usedBy": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "Example Service", "imageUrl": "http://example.com" } ], "content": "# Document Content...", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ``` ```