{
  "openapi": "3.0.3",
  "info": {
    "title": "Vuela API",
    "version": "1.0.0",
    "description": "Generate AI videos (text to video, multi-character scenes, avatars) and SEO articles with Vuela, and read back your projects, contents and videos.\n\nQuick start: create an API token in your Vuela dashboard (https://app.vuela.ai), send it as `Authorization: Bearer <token>`, and check it with `POST /generate/validate-token`. Credits are only deducted for successful generations. Full docs: https://vuela.ai/docs",
    "contact": {
      "name": "Vuela",
      "url": "https://vuela.ai"
    },
    "termsOfService": "https://vuela.ai/legal"
  },
  "externalDocs": {
    "description": "API documentation",
    "url": "https://vuela.ai/docs"
  },
  "servers": [
    {
      "url": "https://api.vuela.ai"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Generate"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Contents"
    },
    {
      "name": "Videos"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API token generated in the Vuela dashboard."
      }
    }
  },
  "paths": {
    "/generate/validate-token": {
      "post": {
        "tags": [
          "Generate"
        ],
        "operationId": "validateToken",
        "summary": "Validate token",
        "description": "Check that the API token is configured properly.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API token."
          },
          "402": {
            "description": "Not enough credits in the account."
          }
        }
      }
    },
    "/generate/article": {
      "post": {
        "tags": [
          "Generate"
        ],
        "operationId": "generateArticle",
        "summary": "Generate an informative article",
        "description": "Generates an informative article focused on SEO and user intent. At least one of `title` or `keyword` is required. One article per call.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "project": {
                    "type": "string",
                    "description": "Project ID to link this content to."
                  },
                  "title": {
                    "type": "string",
                    "description": "Title of the article. Required if `keyword` is not present."
                  },
                  "keyword": {
                    "type": "string",
                    "description": "Keyword or topic of the article. Required if `title` is not present."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language of the article (2-letter code).",
                    "default": "en"
                  },
                  "country": {
                    "type": "string",
                    "description": "Country context (2-letter code).",
                    "default": "US"
                  },
                  "focus": {
                    "type": "string",
                    "description": "Additional focus or context for the article."
                  },
                  "add_internal_links": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add internal links to the article."
                  },
                  "project_website": {
                    "type": "string",
                    "description": "Website URL for internal linking. Required if `add_internal_links` is true."
                  },
                  "add_external_links": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add external links to the article."
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "title"
                    ]
                  },
                  {
                    "required": [
                      "keyword"
                    ]
                  }
                ]
              },
              "example": {
                "keyword": "how to start a faceless YouTube channel",
                "language": "en",
                "country": "US"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API token."
          },
          "402": {
            "description": "Not enough credits in the account."
          }
        }
      }
    },
    "/generate/video": {
      "post": {
        "tags": [
          "Generate"
        ],
        "operationId": "generateVideo",
        "summary": "Generate a video",
        "description": "Generates a video from a script, with single voice, multi-character scenes or an avatar. One video per call.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "mode",
                  "video_script",
                  "aspect_ratio",
                  "animation_type"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "description": "Generation mode.",
                    "enum": [
                      "single_voice",
                      "scenes",
                      "avatar"
                    ]
                  },
                  "quality_tier": {
                    "type": "string",
                    "description": "Quality level. Custom styles only in premium.",
                    "enum": [
                      "basic",
                      "premium"
                    ],
                    "default": "premium"
                  },
                  "video_script": {
                    "type": "string",
                    "description": "Script of the video; line breaks as \\n. In `scenes` mode it uses [characters], [scene:] and [end] blocks."
                  },
                  "language": {
                    "type": "string",
                    "description": "Video language (2-letter code).",
                    "default": "en"
                  },
                  "country": {
                    "type": "string",
                    "description": "Target country (2-letter code).",
                    "default": "US"
                  },
                  "aspect_ratio": {
                    "type": "string",
                    "description": "Aspect ratio.",
                    "enum": [
                      "16:9",
                      "9:16"
                    ],
                    "default": "16:9"
                  },
                  "animation_type": {
                    "type": "string",
                    "description": "`moving_image` (Ken Burns) or `ai_video` (AI animation, not compatible with `scenes`).",
                    "enum": [
                      "moving_image",
                      "ai_video"
                    ]
                  },
                  "voice_id": {
                    "type": "string",
                    "description": "Narration voice. Required in `single_voice` and `avatar` modes."
                  },
                  "voice_style": {
                    "type": "string",
                    "description": "Voice style.",
                    "enum": [
                      "narrative",
                      "expressive",
                      "dynamic"
                    ],
                    "default": "expressive"
                  },
                  "voice_speed": {
                    "type": "string",
                    "description": "Narration speed.",
                    "enum": [
                      "standard",
                      "fast",
                      "very_fast"
                    ],
                    "default": "standard"
                  },
                  "voices": {
                    "type": "array",
                    "maxItems": 8,
                    "description": "Character voices. Required in `scenes` mode.",
                    "items": {
                      "type": "object",
                      "required": [
                        "character",
                        "voice_id"
                      ],
                      "properties": {
                        "character": {
                          "type": "string"
                        },
                        "voice_id": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "media_type": {
                    "type": "string",
                    "description": "Media to use. Required except for `avatar` mode with `full_screen` layout; `ai_image` in `scenes` mode.",
                    "enum": [
                      "ai_image",
                      "google_image",
                      "custom_image"
                    ]
                  },
                  "style": {
                    "type": "string",
                    "description": "Visual style for AI images. Required when `media_type` is `ai_image`.",
                    "enum": [
                      "photorealistic",
                      "flat_design",
                      "comic",
                      "minimal",
                      "anime",
                      "3d",
                      "cyber",
                      "classic_bw",
                      "dark",
                      "watercolor",
                      "bw_sketch",
                      "retro",
                      "pop",
                      "pixel",
                      "papercut",
                      "doodle",
                      "sticker",
                      "fairytale",
                      "low_poly",
                      "fantasy",
                      "impressionist",
                      "surreal",
                      "minecraft",
                      "street_art",
                      "lego",
                      "barbie",
                      "retro_cartoon",
                      "psychedelic",
                      "gothic",
                      "art_nouveau",
                      "origami",
                      "metallic",
                      "glitch_art",
                      "wool_craft",
                      "stop_motion",
                      "clay_model",
                      "80s_sitcom",
                      "custom"
                    ],
                    "default": "photorealistic"
                  },
                  "style_id": {
                    "type": "string",
                    "description": "Custom style ID. Required when `style` is `custom` (premium only)."
                  },
                  "images_per_minute": {
                    "type": "integer",
                    "minimum": 8,
                    "maximum": 40,
                    "default": 8,
                    "description": "Images per minute of video. Not used with `custom_image`."
                  },
                  "custom_images_urls": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uri"
                    },
                    "description": "Image URLs. Required when `media_type` is `custom_image`."
                  },
                  "avatar_id": {
                    "type": "string",
                    "description": "Avatar ID. Required in `avatar` mode."
                  },
                  "avatar_layout": {
                    "type": "string",
                    "description": "Avatar layout. Required in `avatar` mode.",
                    "enum": [
                      "full_screen",
                      "combined"
                    ]
                  },
                  "avatar_layout_style": {
                    "type": "string",
                    "description": "Required when `avatar_layout` is `combined`.",
                    "enum": [
                      "split_screen",
                      "overlay",
                      "overlay_corner",
                      "presentation"
                    ]
                  },
                  "avatar_layout_options": {
                    "type": "object",
                    "description": "Required for the `presentation` layout style.",
                    "properties": {
                      "perspective": {
                        "type": "boolean",
                        "default": false
                      },
                      "background_id": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10
                      }
                    }
                  },
                  "add_subtitles": {
                    "type": "boolean",
                    "default": false
                  },
                  "caption_font": {
                    "type": "string",
                    "description": "Caption font; `custom` uses `caption_font_url`.",
                    "default": "Roboto"
                  },
                  "caption_font_url": {
                    "type": "string",
                    "description": "Custom font URL.",
                    "format": "uri"
                  },
                  "caption_alignment": {
                    "type": "string",
                    "description": "Caption position.",
                    "enum": [
                      "top",
                      "top_middle",
                      "middle",
                      "bottom_middle",
                      "bottom"
                    ],
                    "default": "bottom"
                  },
                  "subtitle_highlight_color": {
                    "type": "string",
                    "description": "Word highlight color.",
                    "enum": [
                      "purple",
                      "blue",
                      "orange",
                      "yellow",
                      "red",
                      "deepskyblue",
                      "green",
                      "teal",
                      "pink",
                      "cyan",
                      "magenta",
                      "lime",
                      "navy",
                      "maroon",
                      "olive",
                      "silver",
                      "gold",
                      "indigo",
                      "coral",
                      "turquoise",
                      "darkgreen",
                      "darkorange",
                      "crimson",
                      "skyblue",
                      "violet",
                      "khaki",
                      "salmon",
                      "plum",
                      "orchid",
                      "sienna"
                    ]
                  },
                  "subtitle_stroke_width": {
                    "type": "integer",
                    "enum": [
                      0,
                      1,
                      2,
                      3
                    ],
                    "default": 0,
                    "description": "0 hidden, 1 light, 2 standard, 3 heavy."
                  },
                  "subtitle_highlight_mode": {
                    "type": "string",
                    "description": "Highlight mode.",
                    "enum": [
                      "background",
                      "text"
                    ],
                    "default": "background"
                  },
                  "add_background_music": {
                    "type": "boolean",
                    "default": false
                  },
                  "background_music_id": {
                    "type": "string",
                    "description": "Background music track. Required if `add_background_music` is true."
                  }
                }
              },
              "example": {
                "mode": "single_voice",
                "quality_tier": "basic",
                "video_script": "Did you know octopuses have three hearts?",
                "aspect_ratio": "9:16",
                "animation_type": "moving_image",
                "voice_id": "YOUR_VOICE_ID",
                "media_type": "ai_image",
                "style": "photorealistic",
                "add_subtitles": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API token."
          },
          "402": {
            "description": "Not enough credits in the account."
          }
        }
      }
    },
    "/my-projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "operationId": "listProjects",
        "summary": "List my projects",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Page number to fetch."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Number of items per page."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search by project name or domain."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API token."
          },
          "402": {
            "description": "Not enough credits in the account."
          }
        }
      }
    },
    "/my-projects/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "operationId": "getProject",
        "summary": "Project details",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Project ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API token."
          },
          "402": {
            "description": "Not enough credits in the account."
          }
        }
      }
    },
    "/my-content": {
      "get": {
        "tags": [
          "Contents"
        ],
        "operationId": "listContents",
        "summary": "List my contents",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Page number to fetch."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Number of items per page."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search by title or content ID."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "creating",
                "failed",
                "completed"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "article"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API token."
          },
          "402": {
            "description": "Not enough credits in the account."
          }
        }
      }
    },
    "/my-content/{contentId}": {
      "get": {
        "tags": [
          "Contents"
        ],
        "operationId": "getContent",
        "summary": "Content details",
        "parameters": [
          {
            "name": "contentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Content ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API token."
          },
          "402": {
            "description": "Not enough credits in the account."
          }
        }
      }
    },
    "/my-videos": {
      "get": {
        "tags": [
          "Videos"
        ],
        "operationId": "listVideos",
        "summary": "List my videos",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Page number to fetch."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Number of items per page."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search term for video fields."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API token."
          },
          "402": {
            "description": "Not enough credits in the account."
          }
        }
      }
    },
    "/my-videos/{videoId}": {
      "get": {
        "tags": [
          "Videos"
        ],
        "operationId": "getVideo",
        "summary": "Video details",
        "parameters": [
          {
            "name": "videoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Video ID."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API token."
          },
          "402": {
            "description": "Not enough credits in the account."
          }
        }
      }
    }
  }
}