Model Router

Routed audio generation

Start an audio generation task using a saved Model Router config instead of naming a model. Set input.type to speech to speak promptText verbatim, or audio to generate audio described by promptText.

post/v1/generate/audio

Headers

X-Runway-Version'2024-11-06' required

The version of the RunwayML API being used. You can read more about versioning here.

Request body

configIdstring required

The slug of a saved Model Router config to route this request with.

Example request

{
  "input": {
    "voice": {
      "audioUri": "https://example.com/audio.mp3"
    },
    "referenceAudios": [
      {
        "uri": "https://example.com/audio.mp3"
      }
    ]
  }
}

Response

The routing decision. Includes a task id for real requests; dry runs return the decision only.

idstring uuid required

The ID of the created task. Poll GET /v1/tasks/:id for the result.

Changes

Changed in 5 of the 54 revisions of this API.10113

    • added subschema #1: RoutedAudioTaskCreated to the response body oneOf list for the response status 200

      response-body-one-of-added

    • the response's body type/format changed from object/ to / for status 200

      response-body-type-changed

    • removed the required property id from the response with the 200 status

      response-required-property-removed

    • removed the required property routing from the response with the 200 status

      response-required-property-removed

  • cbbe796a13a0114See the full diff
    • the response's body type/format changed from / to object/ for status 200

      response-body-type-changed

    • removed the request property dryRun

      request-property-removed

    • removed response discriminator for the response status 200

      response-body-discriminator-removed

    • removed subschema #1: RoutedAudioTaskCreated subschema #2: RoutedAudioDryRun from the response body oneOf list for the response status 200

      response-body-one-of-removed

    • added the required property id to the response with the 200 status

      response-required-property-added

    • added the required property routing to the response with the 200 status

      response-required-property-added

    • added subschema #1: RoutedAudioTaskCreated subschema #2: RoutedAudioDryRun to the response body oneOf list for the response status 200

      response-body-one-of-added

    • the response's body type/format changed from object/ to / for status 200

      response-body-type-changed

    • removed the required property anyOf[subschema #1]/pipeline/items/remaining from the response with the 400 status

      response-required-property-removed

    • removed the required property id from the response with the 200 status

      response-required-property-removed

    • removed the required property routing from the response with the 200 status

      response-required-property-removed

    • added the new optional request property dryRun

      new-optional-request-property

    • the input/promptText request property's maxLength was increased from 3000 to 5000

      request-property-max-length-increased

    • added response discriminator for the response status 200

      response-body-discriminator-added

    • added the non-success response with the status 429

      response-non-success-status-added

    • added the required property anyOf[subschema #1]/pipeline/items/models to the response with the 400 status

      response-required-property-added

    • added the required property anyOf[subschema #1]/pipeline/items/type to the response with the 400 status

      response-required-property-added

    • added subschema #1 subschema #2 to the response body anyOf list for the response status 400

      response-body-any-of-added

    • removed subschema #1 subschema #2 from the response body anyOf list for the response status 400

      response-body-any-of-removed

    • endpoint added

      endpoint-added