Scripts

Scripts are how we describe the generation of a video. along with what (if any) variables are required for a new video generation.

The Script model

The Script model allows for describing how the generation of a video should progress.

Properties

  • Name
    project_id
    Type
    string
    Description

    Name of the project the script is associated with.

  • Name
    inputs
    Type
    string
    Description

    Required inputs for generation of a video.

  • Name
    value
    Type
    object
    Description

    Graph of the generation process.


GET/projects/:project_uuid/scripts

List all scripts for a project

This endpoint allows you to retrieve a list of all scripts for a project.

Optional attributes

  • Name
    limit
    Type
    integer
    Description

    Limit the number of messages returned.

Request

GET
/projects/{project_uuid}/scripts
from videojungle import ApiClient

client = ApiClient(token)

# List all scripts for a project id
client.scripts.list("fff-fff-fff-fff")

Response

[
{
"value": {
  "edges": [
    {
      "id": "e2-3",
      "source": "2",
      "target": "3"
    },
    {
      "id": "e3-7",
      "source": "3",
      "target": "7"
    },
    {
      "id": "e7-8",
      "source": "7",
      "target": "8"
    },
    {
      "id": "e8-9",
      "source": "8",
      "target": "9"
    },
    {
      "id": "e9-10",
      "source": "9",
      "target": "10"
    }
  ],
  "nodes": [
    {
      "id": "1",
      "data": {
        "job": "Generative Project",
        "data": "Create inputs for prompt and generate output.",
        "face": "projectImg",
        "name": "Project Flow"
      },
      "type": "custom"
    },
    {
      "id": "2",
      "data": {
        "job": "Render Custom Prompt",
        "data": "custom_prompt.jinja2",
        "face": "promptFlow",
        "name": "Render Custom Prompt"
      },
      "type": "custom"
    },
    {
      "id": "3",
      "data": {
        "job": "Generate Prompt",
        "data": "GPT-4 Prompt",
        "face": "gptFlow",
        "name": "GPT-4 Prompt"
      },
      "type": "custom"
    },
    {
      "id": "7",
      "data": {
        "job": "Generate Audio from text",
        "data": "Generates audio from text",
        "face": "text2Speech",
        "name": "Text to Speech"
      },
      "type": "custom"
    },
    {
      "id": "8",
      "data": {
        "job": "Generate Transcript with Time Markers",
        "data": "Generates transcript with time markers for video",
        "face": "speech2text",
        "name": "Speech 2 Text"
      },
      "type": "custom"
    },
    {
      "id": "9",
      "data": {
        "job": "Generate Images from text",
        "data": "Generates images for video files",
        "face": "genImage",
        "name": "Generate Images"
      },
      "type": "custom"
    },
    {
      "id": "10",
      "data": {
        "job": "Generate Video from assets",
        "data": "Given audio, images, and transcription, generates video",
        "face": "videoFlow",
        "name": "Generate Video"
      },
      "type": "custom"
    }
  ]
},
"name": "default",
"manuscript_persona": null,
"project_id": "ca5e8192-112a-4e20-9f25-437dad6acb24",
"id": "c1bdac16-2bd5-40a4-94d7-93e82fda0c87",
"inputs": [
  {
    "id": 1,
    "name": "zodiac sign",
    "type": "text",
    "label": "zodiac sign",
    "example": "",
    "placeholder": ""
  },
  {
    "id": 2,
    "name": "lucky number",
    "type": "text",
    "label": "lucky number",
    "example": "",
    "placeholder": ""
  },
  {
    "id": 3,
    "name": "lucky color",
    "type": "text",
    "label": "lucky color",
    "example": "",
    "placeholder": ""
  }
],
"manuscript": null,
"created_at": "2024-09-03T12:45:38.120156",
"project": {
  "name": "First Project",
  "description": "My first project",
  "created_at": "2024-09-03T12:45:38.012247",
  "owner_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
  "id": "ca5e8192-112a-4e20-9f25-437dad6acb24",
  "data": "",
  "thumbnail": null
}
}
]

Was this page helpful?