{
 "openapi": "3.1.0",
 "info": {
  "title": "WagamiAI API",
  "version": "2026-10-28",
  "summary": "YouTube data as JSON for builders and AI agents: search, channels, videos, transcripts, comments, bulk lookups, channel reports, media links and image search.",
  "description": "One API key, pay per answer (2,000 credits = $1); errors and refusals are never charged. Sign up at https://wagamiai.com/signup, make a key in the client area and send it as `Authorization: Bearer <key>`. Docs with examples: https://wagamiai.com/docs. MCP server: https://wagamiai.com/mcp. Plain-text reference: https://wagamiai.com/llms-full.txt. Not affiliated with YouTube or Google.",
  "termsOfService": "https://wagamiai.com/terms"
 },
 "servers": [
  {
   "url": "https://wagamiai.com"
  }
 ],
 "externalDocs": {
  "description": "Docs with examples",
  "url": "https://wagamiai.com/docs"
 },
 "security": [
  {
   "key": []
  }
 ],
 "tags": [
  {
   "name": "Basics"
  },
  {
   "name": "Search"
  },
  {
   "name": "Channels"
  },
  {
   "name": "Discovery"
  },
  {
   "name": "Videos"
  },
  {
   "name": "Playlists"
  },
  {
   "name": "Images"
  },
  {
   "name": "Media"
  },
  {
   "name": "Channel reports"
  }
 ],
 "paths": {
  "/v1/health": {
   "get": {
    "operationId": "health",
    "summary": "Health",
    "description": "Status plus your key's remaining quota. media is ok, or busy when media orders should wait a moment. Free: it does not count against limits.",
    "tags": [
     "Basics"
    ],
    "x-price": "free",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#health"
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"status\": \"ok\", \"media\": \"ok\", \"time\": \"…\", \"limits\": {…}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/limits": {
   "get": {
    "operationId": "key_limits",
    "summary": "Limits",
    "description": "Your key's caps and what is left this minute, today (resets 00:00 UTC) and this week (resets Monday 00:00 UTC). A weekly cap of 0 means none, and its …_left is null. endpoints lists every endpoint group this key may call, with its endpoints, today's use and, where one is set, its daily cap per person (daily_cap), for the whole account (account_daily_cap) and what is left (left_today). A group not listed is not open to this key. For a key on an account, credits has the account's balance, what this key has spent (key_spent), its own cap (key_credit_cap, null = none) and where to add more (add). Free.",
    "tags": [
     "Basics"
    ],
    "x-price": "free",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#key-limits"
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"key\": \"you\", \"limits\": {\"per_min_left\": 118, \"daily_requests_left\": 9500, \"weekly_requests_left\": null, …}, \"caps\": {\"weekly_requests\": 0, …}, \"expires\": null, \"endpoints\": [{\"permission\": \"search.videos\", \"what\": \"…\", \"endpoints\": [\"POST /v1/search\", …], \"used_today\": 12, \"daily_cap\": 500, \"left_today\": 488}, …]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/playbooks": {
   "get": {
    "operationId": "playbooks",
    "summary": "Research plans",
    "description": "Step-by-step research plans for an assistant or an agent to follow: finding rising channels, sizing up a niche, studying a channel or a video, title, thumbnail and script studies, video ideas, a script outline, a production plan. Without a query: every plan in one line (name, family, title, about, needs). With ?name=NAME&about=TEXT: that plan's steps as plan, and under calls the endpoint behind every tool the steps name. Free.",
    "tags": [
     "Basics"
    ],
    "x-price": "free",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#playbooks"
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"playbooks\": [{\"name\": \"niche_scorecard\", \"family\": \"scout\", \"title\", \"about\", \"needs\": \"topic\"}, …], \"next\"}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/plugin": {
   "get": {
    "operationId": "add_on",
    "summary": "Media add-on",
    "description": "The media add-on as a zip, the same file for everyone. Public: no key is needed to fetch it, so an AI agent can fetch it before anything else. It uses your key only when it runs, and GET /v1/setup says how to install it. From 1.6 on it keeps itself up to date (at once when an answer says a newer one is out, else every 6 hours, in the background; WAGAMI_UPDATE=0 (or update=no in the add-on's options) turns that off). An older add-on is told on every answer: the field addon_update and the header X-Addon-Update name the current version and where to get it.",
    "tags": [
     "Basics"
    ],
    "x-price": "free",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#add-on"
    },
    "security": [],
    "responses": {
     "200": {
      "description": "Example: wagami.zip (pyproject.toml + the add-on)",
      "content": {
       "application/zip": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/plugin/version": {
   "get": {
    "operationId": "add_on_version",
    "summary": "Add-on version",
    "description": "The current add-on version and the zip's sha256 and size. Public. An agent that installed the add-on compares it with the installed one (the add-on names its version in its User-Agent) and reinstalls from GET /v1/plugin when it is older.",
    "tags": [
     "Basics"
    ],
    "x-price": "free",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#add-on-version"
    },
    "security": [],
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"version\": \"1.6\", \"sha256\": \"…\", \"size\": 9000, \"get\": \"https://…/v1/plugin\"}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/setup": {
   "get": {
    "operationId": "setup",
    "summary": "Setup",
    "description": "This key's own setup as plain text: what it may call, its limits and, once media is open for it, how to install the media add-on. Made to be handed to an AI agent unchanged. Free.",
    "tags": [
     "Basics"
    ],
    "x-price": "free",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#setup"
    },
    "responses": {
     "200": {
      "description": "Example: WagamiAI API access\nBase URL   https://…\nAPI key    <the key you were sent>\nLimits     …\nSetup for an AI agent (paste this section to it as-is)\n   1. …",
      "content": {
       "text/plain": {
        "schema": {
         "type": "string"
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/search": {
   "post": {
    "operationId": "search",
    "summary": "Search",
    "description": "YouTube search with every native filter.",
    "tags": [
     "Search"
    ],
    "x-price": "3 credits per 20 results",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#search"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "query": {
          "type": "string",
          "description": "Search text, up to 300 characters."
         },
         "kind": {
          "type": "string",
          "description": "video (default), channel, playlist, movie, shorts, live."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 100, default 20."
         },
         "upload": {
          "type": "string",
          "description": "hour, today, week, month, year."
         },
         "duration": {
          "type": "string",
          "description": "short (<4 min), medium (4 to 20), long (>20)."
         },
         "sort": {
          "type": "string",
          "description": "relevance, views, date, rating."
         },
         "features": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Any of hd, 4k, hdr, subtitles, creative_commons, live, 360, vr180, 3d, location, purchased."
         },
         "sp": {
          "type": "string",
          "description": "A raw YouTube sp filter token, if you already have one."
         }
        },
        "additionalProperties": true,
        "required": [
         "query"
        ]
       },
       "example": {
        "query": "deep sea documentary",
        "duration": "long",
        "sort": "views",
        "limit": 5
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"items\": [{\"id\", \"title\", \"channel\", \"channel_id\", \"views\", \"duration\", \"published_ts\", \"thumbnail\", …}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/api/search": {
   "get": {
    "operationId": "mixed_search",
    "summary": "Mixed search (query string)",
    "description": "One call returns videos, channels and playlists, each tagged by type, with readable and machine fields side by side. Answers use a success envelope.",
    "tags": [
     "Search"
    ],
    "x-price": "3 credits per 20 results",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#mixed-search"
    },
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Search text."
     },
     {
      "name": "type",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "all (default), video, channel, playlist, movie."
     },
     {
      "name": "sort_by",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "relevance, view_count, upload_date, rating."
     },
     {
      "name": "upload_date",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "all, hour, today, week, month, year."
     },
     {
      "name": "duration",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "all, short, medium, long."
     },
     {
      "name": "published_within_days",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      },
      "description": "Only items published within this many days."
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer"
      },
      "description": "1 to 100, default 30."
     }
    ],
    "responses": {
     "200": {
      "description": "Example: {\"success\": true, \"count\": 20, \"has_more\": true, \"estimated_results\": null, \"results\": [{\"type\": \"video\", \"video_id\", \"view_count_text\", \"duration_text\", …}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/suggest": {
   "post": {
    "operationId": "suggest",
    "summary": "Autocomplete",
    "description": "YouTube's search suggestions for a prefix.",
    "tags": [
     "Search"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#suggest"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "query": {
          "type": "string",
          "description": "Prefix text."
         }
        },
        "additionalProperties": true,
        "required": [
         "query"
        ]
       },
       "example": {
        "query": "how to b"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"suggestions\": [\"how to boil eggs\", …]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/hashtag": {
   "post": {
    "operationId": "hashtag",
    "summary": "Hashtag",
    "description": "Videos on a hashtag page.",
    "tags": [
     "Search"
    ],
    "x-price": "3 credits per 50 videos",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#hashtag"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "tag": {
          "type": "string",
          "description": "One hashtag, with or without #."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 200, default 60."
         }
        },
        "additionalProperties": true,
        "required": [
         "tag"
        ]
       },
       "example": {
        "tag": "travel",
        "limit": 20
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"items\": [...]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/channel": {
   "post": {
    "operationId": "channel",
    "summary": "Channel",
    "description": "About facts: title, handle, subscribers, video count, links, description, avatar and banner.",
    "tags": [
     "Channels"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#channel"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Handle (@name), channel id (UC…) or channel URL."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "@veritasium"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"channel\": {\"id\", \"title\", \"handle\", \"subscribers\", \"views\", \"video_count\", \"joined\", \"country\", \"links\", \"avatar\", \"banner\", …}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/channel/videos": {
   "post": {
    "operationId": "channel_videos",
    "summary": "Channel tab",
    "description": "Rows from one channel tab.",
    "tags": [
     "Channels"
    ],
    "x-price": "3 credits per 50 items",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#channel-videos"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Handle, channel id or URL."
         },
         "tab": {
          "type": "string",
          "description": "videos (default), shorts, streams, podcasts, playlists."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 1000, default 60."
         },
         "sort": {
          "type": "string",
          "description": "newest (default), popular, oldest."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "@veritasium",
        "tab": "videos",
        "sort": "popular",
        "limit": 25
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"items\": [{\"id\", \"title\", \"views\", \"duration\", \"published_ts\", \"is_short\", \"live\", \"thumbnail\", \"url\"}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/posts": {
   "post": {
    "operationId": "posts",
    "summary": "Community posts",
    "description": "Text, polls, images and shared videos from the community tab.",
    "tags": [
     "Channels"
    ],
    "x-price": "3 credits per 50 posts",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#posts"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Handle, channel id or URL."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 100, default 30."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "@mkbhd",
        "limit": 10
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"items\": [...]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/similar": {
   "post": {
    "operationId": "similar",
    "summary": "Similar channels",
    "description": "Channels watched by the same viewers, strongest first, with the channels the creator lists on its own page. strength runs from 0 to 100; seen says how many of the channel's videos it showed up beside; picked is true when the creator lists it. Up to three of its videos come as examples. An answer with nothing in it costs nothing.",
    "tags": [
     "Channels"
    ],
    "x-price": "15 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#similar"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Handle, channel id or URL."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 50, default 20."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "@veritasium",
        "limit": 10
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"channel_id\", \"channel\", \"items\": [{\"channel_id\", \"channel\", \"handle\", \"url\", \"strength\", \"seen\", \"picked\", \"subscribers\", \"examples\": [{\"id\", \"title\", \"views\", \"url\"}]}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/channel/outliers": {
   "post": {
    "operationId": "outliers",
    "summary": "Channel outliers",
    "description": "A channel's videos that beat its own usual views, biggest first, among the newest videos of a tab (window). Each video comes back with its multiple (how many times the channel's usual views), age_days and still_growing. The channel's channel, handle, subscribers and avatar come with it. 3 credits per 50 videos looked at; when none beat the usual it costs nothing.",
    "tags": [
     "Channels"
    ],
    "x-price": "3 credits per 50 videos checked",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#outliers"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Handle, channel id or URL."
         },
         "tab": {
          "type": "string",
          "description": "videos (default) or shorts."
         },
         "window": {
          "type": "integer",
          "description": "How many of the newest videos to check: 10 to 300, default 60."
         },
         "min_multiple": {
          "type": "string",
          "description": "1 to 100, default 2."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 100, default 20."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "@veritasium",
        "window": 100,
        "min_multiple": 2
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"channel_id\", \"channel\", \"handle\", \"subscribers\", \"avatar\", \"tab\", \"min_multiple\", \"items\": [{\"id\", \"title\", \"views\", \"multiple\", \"age_days\", \"still_growing\", \"duration\", \"published_ts\", \"is_short\", \"thumbnail\", \"url\"}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/channels/find": {
   "post": {
    "operationId": "channels_find",
    "summary": "Find channels",
    "description": "Channels by topic and figures, in any niche: for example new GTA channels that started in the last month and already average 50,000 views a video. Each channel carries its figures (subscribers, average and typical views, views a day and a month, uploads a week, average length, its best video against its usual views, growth, start date), its niche and sub_niche, who makes it (maker: faceless, mostly_faceless, ai_avatar, clips, compilation, presenter_led, official; faceless true or false once known), its style and format, whether it is monetized, an estimated RPM and monthly revenue range in US dollars, its three best videos, and as_of: when its figures were read. With a topic, only channels that are about it come back, and summary gives the topic's own figures over every channel that matched. 2 credits per channel returned; nothing found costs nothing; max_credits caps a call.",
    "tags": [
     "Discovery"
    ],
    "x-price": "2 credits per channel returned",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#channels-find"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "topic": {
          "type": "string",
          "description": "Words to look for, for example GTA, true crime, stoicism. Optional when other filters are given."
         },
         "niche / sub_niche": {
          "type": "string",
          "description": "Niche ids from /v1/niches."
         },
         "faceless": {
          "type": "boolean",
          "description": "true: only channels known to have no person on camera, or an AI presenter; false: only channels known to be something else. Left out: every channel. With either, maker_unknown in the answer counts the channels that match with their maker not known yet."
         },
         "maker / style / format": {
          "type": "string",
          "description": "Values from /v1/niches (makers, styles, formats). maker also takes unknown: channels whose maker is not known yet."
         },
         "form": {
          "type": "string",
          "description": "any (default), long, short, mixed."
         },
         "min_ / max_ figures": {
          "type": "string",
          "description": "subscribers, avg_views, median_views, monthly_views, views_per_day, uploads_per_week, avg_length_seconds, videos, total_views, outlier, growth, rpm_usd, monthly_revenue_usd, each as min_… and max_…."
         },
         "started_within_days": {
          "type": "integer",
          "description": "The channel's first upload in the last N days. Also started_after / started_before (YYYY-MM-DD) and active_within_days (last upload)."
         },
         "sort": {
          "type": "string",
          "description": "relevance (default with a topic), best (default without), views_per_subscriber, monthly_views, newest, subscribers, avg_views, median_views, views_per_day, growth, outlier, revenue, uploads, added, active."
         },
         "limit / page": {
          "type": "integer",
          "description": "1 to 50 a page (default 20); page from 1."
         },
         "live": {
          "type": "string",
          "description": "auto (default): the fullest answer; never: the quickest answer; fresh: page 1 also brings up to fresh_max channels found right now (needs a topic), first in the list."
         },
         "fresh_max": {
          "type": "integer",
          "description": "With live: \"fresh\": at most this many more channels, 1 to 12 (default 6)."
         },
         "max_credits": {
          "type": "integer",
          "description": "The most this call may cost."
         }
        },
        "additionalProperties": true
       },
       "example": {
        "topic": "GTA",
        "started_within_days": 31,
        "min_avg_views": 50000,
        "limit": 6
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"query\", \"filters\", \"page\", \"limit\", \"total\", \"has_more\", \"items\": [{\"id\", \"title\", \"handle\", \"url\", \"avatar\", \"subscribers\", \"avg_views\", \"median_views\", \"views_per_day\", \"monthly_views\", \"uploads_per_week\", \"avg_length_seconds\", \"best_outlier\", \"growth\", \"started\", \"age_days\", \"last_upload\", \"form\", \"niche\": {\"id\", \"name\"}, \"sub_niche\", \"maker\", \"faceless\", \"style\", \"format\", \"language\", \"country\", \"monetized\", \"est_rpm_usd\": {\"low\", \"high\"}, \"est_monthly_revenue_usd\": {\"low\", \"high\"}, \"top_videos\": [{\"id\", \"title\", \"views\", \"outlier\", \"published\", \"thumbnail\", \"url\"}], \"as_of\"}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/videos/find": {
   "post": {
    "operationId": "videos_find",
    "summary": "Find outlier videos",
    "description": "Videos far above their own channel's usual views, on any topic: the ideas that worked. Each comes with its outlier (how many times its channel's usual views), its title_format, its channel (name, subscribers, niche, maker), its thumbnail and as_of: when its figures were read. With a topic the answer also carries title_formats: the title formats those videos use, each with how many videos and channels use it and real titles as examples. 1 credit per video returned; nothing found costs nothing.",
    "tags": [
     "Discovery"
    ],
    "x-price": "1 credit per video returned",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#videos-find"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "topic": {
          "type": "string",
          "description": "Words in the title, for example GTA."
         },
         "niche / sub_niche / maker": {
          "type": "string",
          "description": "As in /v1/channels/find; also faceless, monetized and language."
         },
         "min_outlier": {
          "type": "string",
          "description": "Default 3."
         },
         "live": {
          "type": "string",
          "description": "auto (default): the fullest answer; never: the quickest answer."
         },
         "published_within_days": {
          "type": "integer",
          "description": "Only videos from the last N days. Also channel_started_within_days."
         },
         "min_ / max_ figures": {
          "type": "string",
          "description": "views, subscribers (the channel's), length_seconds, outlier."
         },
         "form": {
          "type": "string",
          "description": "any (default), long, short."
         },
         "per_channel": {
          "type": "integer",
          "description": "Videos of one channel at most, 1 to 50. With a topic the default is 2, so a list is of many channels."
         }
        },
        "additionalProperties": true
       },
       "example": {
        "topic": "GTA",
        "max_subscribers": 50000,
        "published_within_days": 30,
        "min_outlier": 5
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"query\", \"filters\", \"total\", \"has_more\", \"items\": [{\"id\", \"title\", \"views\", \"outlier\", \"published\", \"age_days\", \"length_seconds\", \"is_short\", \"thumbnail\", \"url\", \"channel\": {\"id\", \"title\", \"handle\", \"subscribers\", \"median_views\", \"started\", \"niche\", \"maker\", \"faceless\"}}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/titles/formats": {
   "post": {
    "operationId": "titles_formats",
    "summary": "Title formats",
    "description": "The title formats that work for a topic, niche or channel: each with how many videos and channels use it, their median views and how far above their channel's usual they typically go, templates such as {N} things about {X} nobody noticed and real titles as examples. Send a draft title too and it comes back read and compared: its title_formats, template, features, the formats it shares and formats_it_lacks with examples. A draft title sent alone (no topic, niche or channel) is read and costs nothing. 3 credits a call.",
    "tags": [
     "Discovery"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#titles-formats"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string",
          "description": "A draft title, 1 to 300 characters."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 20 formats (default 15)."
         },
         "live": {
          "type": "string",
          "description": "auto (default): the fullest answer; never: the quickest answer."
         }
        },
        "additionalProperties": true
       },
       "example": {
        "topic": "GTA 6",
        "title": "Lucia's best moments"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"query\", \"filters\", \"videos_weighed\", \"title_formats\": [{\"id\", \"label\", \"family\", \"videos\", \"channels\", \"median_views\", \"median_outlier\", \"templates\", \"examples\"}], \"title\": {\"title\", \"title_format\", \"title_formats\", \"template\", \"features\", \"compared_with\", \"shared_formats\", \"formats_it_lacks\", \"usual_characters\", \"usual_words\"}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/ideas": {
   "post": {
    "operationId": "ideas",
    "summary": "Video ideas",
    "description": "Video ideas from what is working, each a draft title with the real video that proves it (proof: title, views, outlier, channel), its title format and the name it is about (subject). mode today (the default): the formats standing out in a topic, niche or channel now, filled with the names its newest videos are about. like: more like one title, with the videos alike. bend: the formats working in from carried into to, each with in_target: its state there (not_done, rare, done_and_working, done_did_not_stand_out). The answer also carries the formats and subjects the ideas come from. 5 credits a call.",
    "tags": [
     "Discovery"
    ],
    "x-price": "5 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#ideas"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "mode": {
          "type": "string",
          "description": "today (default), like (needs title), bend (needs from and to)."
         },
         "title": {
          "type": "string",
          "description": "Mode like: the title to make more like. Without a topic, niche or channel its own subject is where to look."
         },
         "from / to": {
          "type": "string",
          "description": "Mode bend: each a topic, niche, sub_niche or channel, with any filter."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 30 ideas (default 12)."
         },
         "live": {
          "type": "string",
          "description": "auto (default) or never."
         }
        },
        "additionalProperties": true
       },
       "example": {
        "mode": "bend",
        "from": {
         "topic": "GTA 6"
        },
        "to": {
         "topic": "Red Dead Redemption"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"mode\", \"source\", \"target\", \"source_videos\", \"target_videos\", \"ideas\": [{\"draft\", \"title_format\", \"label\", \"template\", \"subject\": {\"name\", \"videos\", \"channels\"}, \"proof\": {\"id\", \"title\", \"views\", \"outlier\", \"url\", \"channel\"}}], \"formats\": [{\"id\", \"label\", \"videos\", \"median_outlier\", \"templates\", \"proof\", \"in_target\": {\"videos\", \"share\", \"state\", \"example\"}}], \"subjects\": [{\"name\", \"videos\", \"channels\", \"median_outlier\", \"example\"}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/channels/profile": {
   "post": {
    "operationId": "channels_profile",
    "summary": "Channel profiles",
    "description": "Figures and labels for up to 25 channels you name, any channel on YouTube: the same fields as /v1/channels/find. not_found lists the ones that could not be read. 2 credits per channel. With detail: true the first 5 channels also carry insight: history (subscribers, views and videos day by day), change, look (format, style, how its videos are told and a short description of how they look), breakouts (its uploads far past its usual views), reasons (plain sentences), ideas (title ideas from its breakouts), room (sub-niches beside it), alike (channels like it) and writeup (why it works, in plain sentences: summary, titles, thumbnails, opening, script, format, rhythm, and make_next: up to 3 videos to make, each a title and an angle). Parts with nothing in them are left out.",
    "tags": [
     "Discovery"
    ],
    "x-price": "2 credits per channel",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#channels-profile"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "refs": {
          "type": "string",
          "description": "1 to 25 channels: @handle, UC… id or channel link."
         },
         "live": {
          "type": "string",
          "description": "auto (default) or never."
         },
         "detail": {
          "type": "boolean",
          "description": "Add insight to the first 5 channels (no extra credits)."
         },
         "refresh": {
          "type": "boolean",
          "description": "Bring figures that have grown old up to date."
         },
         "check_monetization": {
          "type": "boolean",
          "description": "Check now whether each channel is monetized: a channel whose answer is older than a day, not known yet or never checked is checked in this call (any channel on YouTube); one checked in the last day is given as it is. monetized is true, false or null (cannot be told yet) and monetized_as_of says when it was checked. Same price."
         }
        },
        "additionalProperties": true,
        "required": [
         "refs"
        ]
       },
       "example": {
        "refs": [
         "@veritasium",
         "@kurzgesagt"
        ],
        "detail": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"not_found\": [], \"items\": [{\"id\", \"title\", \"subscribers\", \"niche\", \"maker\", \"faceless\", \"est_monthly_revenue_usd\", \"views_per_subscriber\", \"top_videos\", \"as_of\", \"insight\": {\"history\", \"change\", \"look\", \"breakouts\", \"reasons\", \"ideas\", \"room\", \"alike\", \"writeup\"}, …}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/niches": {
   "post": {
    "operationId": "niches",
    "summary": "Niches",
    "description": "Every niche with its figures: how many channels, the share without a person on camera and of Shorts channels, median views and subscribers, an estimated RPM range, growth, how many channels started in the last 30 and 365 days, outlier videos in the last 30 days, title formulas that work, the thumbnail style that works, and its sub-niches with their channel counts. It also lists the makers, styles, formats and sorts the find routes take. Send compact: true for the figures alone, or name niches to get only those in full. 3 credits a call.",
    "tags": [
     "Discovery"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#niches"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "niche": {
          "type": "string",
          "description": "Niche ids to get in full (from a compact answer)."
         },
         "compact": {
          "type": "boolean",
          "description": "true: every niche with its figures only, without formulas and sub-niches."
         }
        },
        "additionalProperties": true
       },
       "example": {
        "compact": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"library\": {\"channels\", \"videos\"}, \"niches\": [{\"id\", \"name\", \"group\", \"about\", \"channels\", \"faceless_share\", \"shorts_share\", \"median_views\", \"median_subscribers\", \"est_rpm_usd\", \"growth\", \"new_channels_30d\", \"outlier_videos_30d\", \"title_formulas\", \"thumbnail_style\", \"sub_niches\": [{\"id\", \"name\", \"channels\"}]}], \"makers\", \"styles\", \"formats\", \"channel_sorts\", \"video_sorts\"}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/video": {
   "post": {
    "operationId": "video",
    "summary": "Video",
    "description": "Full metadata for one video, including the resolutions it offers (the standard heights up to max_height), approx_mb (about how many MB the whole video is at each height, when YouTube states it), max_fps, codecs, aspect_ratio, the license text (for example Creative Commons), the song it lists (music), location, release_timestamp (a premiere or a planned live) and live_viewers while it is live. Fields YouTube does not show for a video are null.",
    "tags": [
     "Videos"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#video"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or any YouTube video link (watch, shorts, live, embed, youtu.be; with or without https://)."
         },
         "page": {
          "type": "boolean",
          "description": "Adds more facts about the video: ads, ad_breaks, midroll, ai_label, spoken_lang, made_for_kids, family_safe, category, related."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "dQw4w9WgXcQ",
        "page": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"video\": {\"id\", \"title\", \"description\", \"channel\", \"channel_id\", \"views\", \"likes\", \"comments\", \"duration\", \"upload_date\", \"chapters\", \"heatmap\", \"tags\", \"live\", \"availability\", \"caption_langs\", \"max_height\", \"resolutions\", \"approx_mb\": {\"720\": 54.2, \"1080\": 95.0}, \"max_fps\", \"codecs\", \"license\", \"music\", …}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/videos": {
   "post": {
    "operationId": "videos",
    "summary": "Videos (batch)",
    "description": "Many videos in one call: up to 200 are read a call, 1 credit per video answered. Refs past that, and any not reached in the call's time, come back with \"retry\": true and cost nothing: send them again. A failed item carries its own error; the rest still return.",
    "tags": [
     "Videos"
    ],
    "x-price": "1 credit per video",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#videos"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "refs": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "1 to 1,000 ids or URLs (200 read a call)."
         },
         "page": {
          "type": "boolean",
          "description": "As in /v1/video."
         },
         "max_credits": {
          "type": "integer",
          "description": "The most this call may spend: fewer videos are read, the rest come back to send again."
         }
        },
        "additionalProperties": true,
        "required": [
         "refs"
        ]
       },
       "example": {
        "refs": [
         "dQw4w9WgXcQ",
         "jNQXAC9IVRw"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"items\": [{…}, {\"id\": \"…\", \"error\": {\"class\", \"error\"}}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/comments": {
   "post": {
    "operationId": "comments",
    "summary": "Comments",
    "description": "Comment threads.",
    "tags": [
     "Videos"
    ],
    "x-price": "3 credits per 50 comments",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#comments"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or URL."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 500, default 100."
         },
         "sort": {
          "type": "string",
          "description": "top (default) or new."
         },
         "replies": {
          "type": "boolean",
          "description": "Include replies."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "dQw4w9WgXcQ",
        "limit": 50,
        "sort": "top"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"items\": [{\"author\", \"text\", \"likes\", \"timestamp\", …}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/captions": {
   "post": {
    "operationId": "captions",
    "summary": "Captions",
    "description": "Timed caption cues, the manual track first, then the automatic one.",
    "tags": [
     "Videos"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#captions"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or URL."
         },
         "lang": {
          "type": "string",
          "description": "Language code, default en."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "dQw4w9WgXcQ",
        "lang": "en"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"captions\": {\"id\", \"lang\", \"kind\": \"creator|automatic\", \"lines\": [{\"t\", \"d\", \"text\"}]}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/transcript": {
   "post": {
    "operationId": "transcript",
    "summary": "Transcript",
    "description": "The captions as plain text.",
    "tags": [
     "Videos"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#transcript"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or URL."
         },
         "lang": {
          "type": "string",
          "description": "Default en."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "dQw4w9WgXcQ"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"transcript\": \"Today we look at three simple ways to light a small studio…\"}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/transcripts": {
   "post": {
    "operationId": "transcripts",
    "summary": "Transcripts (batch)",
    "description": "Plain-text transcripts of many videos in one call (up to 50 read a call), in the order asked. A video with none in that language has an empty transcript and a hint naming the languages it has; one that cannot be read carries an error of its own (with \"retry\": true when asking again usually works). kind is creator or automatic. 3 credits per transcript that comes back.",
    "tags": [
     "Videos"
    ],
    "x-price": "3 credits per transcript",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#transcripts"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "refs": {
          "type": "string",
          "description": "1 to 1,000 video ids or URLs (50 read a call; the rest come back to send again, free)."
         },
         "lang": {
          "type": "string",
          "description": "Default en."
         },
         "max_credits": {
          "type": "integer",
          "description": "The most this call may spend."
         }
        },
        "additionalProperties": true,
        "required": [
         "refs"
        ]
       },
       "example": {
        "refs": [
         "dQw4w9WgXcQ",
         "jNQXAC9IVRw"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"items\": [{\"id\", \"lang\", \"kind\", \"transcript\"}, {\"id\", \"error\": {\"class\", \"error\", \"retry\"}}]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/related": {
   "post": {
    "operationId": "related",
    "summary": "Related",
    "description": "The related videos YouTube shows beside a video.",
    "tags": [
     "Videos"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#related"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or URL."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 50, default 20."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "dQw4w9WgXcQ",
        "limit": 10
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"items\": [...]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/storyboard": {
   "post": {
    "operationId": "storyboard",
    "summary": "Storyboard",
    "description": "Preview sprite sheets (the frames shown when you hover the progress bar) with their grid layout. Frame k (counting across the sheets) shows the video at k × interval_s seconds, YouTube's own spacing (1, 2, 5 or 10 s); null means the frames are spread evenly over duration.",
    "tags": [
     "Videos"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#storyboard"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or URL."
         },
         "view": {
          "type": "boolean",
          "description": "true: the sheets themselves come back as pictures (pictures: each with sheet, from_s, to_s, mime, bytes and picture_base64), for an assistant to look through the video. Same price."
         },
         "sheets": {
          "type": "integer",
          "description": "With view: 1 to 4 sheets spread over the video, default 2."
         },
         "at": {
          "type": "string",
          "description": "With view: start at this second of the video."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "dQw4w9WgXcQ"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"storyboard\": {\"id\", \"duration\", \"rows\", \"cols\", \"frame_width\", \"frame_height\", \"frames\", \"interval_s\": 10.0, \"sheets\": [\"https://i.ytimg.com/sb/…\"]}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/thumbnail": {
   "post": {
    "operationId": "thumbnail",
    "summary": "Thumbnail",
    "description": "The best thumbnail URL, or the image bytes themselves with bytes: true. With view: true the picture comes back inside the answer (picture_base64 beside url, quality, mime, bytes) for an assistant to look at; with refs up to 8 videos' thumbnails come back together (pictures, and not_shown for any that had none), each one shown at the price of a thumbnail.",
    "tags": [
     "Videos"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#thumbnail"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or URL."
         },
         "refs": {
          "type": "string",
          "description": "Up to 8 video ids or URLs, in place of ref: their thumbnails as pictures in one answer."
         },
         "view": {
          "type": "boolean",
          "description": "true: the picture itself in the answer (size hq unless quality is given)."
         },
         "quality": {
          "type": "string",
          "description": "maxres (default), sd, hq, mq, default."
         },
         "bytes": {
          "type": "boolean",
          "description": "Stream the image. You can also pass url for any YouTube image (avatar, banner, storyboard tile)."
         }
        },
        "additionalProperties": true
       },
       "example": {
        "ref": "dQw4w9WgXcQ",
        "quality": "maxres"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"url\": \"https://i.ytimg.com/vi/…/maxresdefault.jpg\"}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/resolve": {
   "post": {
    "operationId": "resolve",
    "summary": "Resolve",
    "description": "Turns a handle, channel URL or custom URL into the canonical channel id.",
    "tags": [
     "Videos"
    ],
    "x-price": "3 credits",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#resolve"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Handle, channel URL or id."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "@veritasium"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"resolved\": {\"id\", \"handle\", \"title\", \"url\"}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/playlist": {
   "post": {
    "operationId": "playlist",
    "summary": "Playlist",
    "description": "Playlist facts and entries.",
    "tags": [
     "Playlists"
    ],
    "x-price": "3 credits per 50 videos",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#playlist"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Playlist id (PL…) or URL."
         },
         "limit": {
          "oneOf": [
           {
            "type": "integer"
           },
           {
            "type": "string",
            "enum": [
             "all"
            ]
           }
          ],
          "description": "1 to 1000 or \"all\", default 200."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref"
        ]
       },
       "example": {
        "ref": "PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF",
        "limit": 25
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"playlist\": {\"id\", \"title\", \"count\", \"entries\": [...]}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/images": {
   "post": {
    "operationId": "images",
    "summary": "Image search",
    "description": "Pictures for any query, in one list, and the same picture never comes back twice. Each item gives the picture's own address (url), the page it is on and its site (items[].page, items[].host), its size and format, and two links on this service: thumb, a small preview, and fetch, the full picture (see Picture links). 4 credits for a search that finds at least one picture (up to 100 of them); a search that finds none is free. It needs the images.search permission on keys with limited access. The answer repeats the filters the search ran with (filters), in the names you sent. Filters narrow what is found; min_width, min_height and format are checked on each picture, so asking for them can bring back fewer pictures than limit.",
    "tags": [
     "Images"
    ],
    "x-price": "4 credits per search",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#images"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "query": {
          "type": "string",
          "description": "What to look for, 1 to 200 characters."
         },
         "limit": {
          "type": "integer",
          "description": "1 to 100, default 30."
         },
         "safe": {
          "type": "string",
          "description": "Always strict: adult pictures are never returned. moderate and off are still accepted and give the same strict results."
         },
         "size": {
          "type": "string",
          "description": "small, medium, large, wallpaper."
         },
         "type": {
          "type": "string",
          "description": "photo, clipart, gif, line (line drawings), transparent."
         },
         "layout": {
          "type": "string",
          "description": "square, wide, tall."
         },
         "color": {
          "type": "string",
          "description": "color, mono, or one of red, orange, yellow, green, blue, purple, pink, brown, black, gray, white."
         },
         "license": {
          "type": "string",
          "description": "any (the default: the licence doesn't matter), creative_commons (any Creative Commons licence), commercial (Creative Commons that allows commercial use), public_domain; also modify and modify_commercial (free to change, and to change for commercial use). The older names share, share_commercial and public still work and mean the same as creative_commons, commercial and public_domain. The licence is what the picture's site reports, and a filter, not a grant: every item carries the page it came from (items[].page, null in the rare case it is not known), so check that page for the terms before you publish or reuse the picture."
         },
         "time": {
          "type": "string",
          "description": "day, week, month, year: only pictures found within that time."
         },
         "people": {
          "type": "string",
          "description": "face (faces in close up) or portrait (head and shoulders). Best effort: some results may still not show a person."
         },
         "min_width": {
          "type": "integer",
          "description": "1 to 10000: the smallest width in pixels. Checked on each picture whose size is known; a picture of unknown size (width null) is kept."
         },
         "min_height": {
          "type": "integer",
          "description": "1 to 10000: the smallest height in pixels, checked the same way."
         },
         "format": {
          "type": "string",
          "description": "jpg, png, gif, webp. Only pictures known to be in that format come back (items[].format says jpeg for jpg)."
         },
         "page": {
          "type": "integer",
          "description": "1 to 5, default 1: the next pages of results for the same query."
         }
        },
        "additionalProperties": true,
        "required": [
         "query"
        ]
       },
       "example": {
        "query": "northern lights over a lake",
        "layout": "wide",
        "license": "commercial",
        "min_width": 1920,
        "limit": 30
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"query\": \"northern lights over a lake\", \"filters\": {\"safe\": \"strict\", \"layout\": \"wide\", \"license\": \"commercial\", \"min_width\": 1920}, \"count\": 30, \"items\": [{\"id\": \"…\", \"title\": \"Aurora above the still lake\", \"url\": \"https://example.org/photos/aurora.jpg\", \"page\": \"https://example.org/gallery/aurora\", \"host\": \"example.org\", \"width\": 2400, \"height\": 1350, \"format\": \"jpeg\", \"thumb\": \"https://wagamiai.com/v1/image/…?w=thumb\", \"fetch\": \"https://wagamiai.com/v1/image/…\"}, …]}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/image/{token}": {
   "get": {
    "operationId": "image_link",
    "summary": "Picture links",
    "description": "The thumb and fetch links of an image search answer (if one starts with /, put your base URL in front). They need no header: each is signed for the key that searched and works for 24 hours, so a thumb link can go straight into an <img> tag. ?w=thumb gives a small preview, free and not counted. Without it you get the full picture (any image/*, up to 15 MB) for 3 credits, charged once per link: fetching the same link again is free. A picture its site no longer has, does not share or that is not a picture answers 404 with class: not_found (take another result: asking again will not help); one that could not be reached just now answers 502. Neither costs anything. A link that ended answers 404 with class: link_ended: search again. Keep fetch links on your side: each full picture is charged to your key.",
    "tags": [
     "Images"
    ],
    "x-price": "3 credits per picture",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#image-link"
    },
    "security": [],
    "parameters": [
     {
      "name": "token",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "From items[].thumb or items[].fetch."
     },
     {
      "name": "w",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "thumb: the small preview (free)."
     }
    ],
    "responses": {
     "200": {
      "description": "Example: Picture bytes (Content-Type image/jpeg, image/png, …) · 404 when the link ended or is unknown",
      "content": {
       "image/*": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/download": {
   "post": {
    "operationId": "download",
    "summary": "Video media",
    "description": "Media opens with your account's first payment. Answers at once (200) with the video's picture and sound as two streams links (up to the height you choose, within your key's cap). Your machine fetches them and joins them into one MP4: see Media links. The media add-on and the developer client (GET /v1/client) do all of it by themselves; your key's GET /v1/setup has the exact commands. An order without delivery: \"links\" answers 409 links_only with what to send instead. A live stream, or one that has just ended, has no length yet: an order for the whole video answers 422 length_unknown and costs nothing; ask for a part with Clip (start and end).",
    "tags": [
     "Media"
    ],
    "x-price": "12 credits per minute · 36 above 1080p",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#download"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or URL."
         },
         "height": {
          "oneOf": [
           {
            "type": "string"
           },
           {
            "type": "integer"
           }
          ],
          "description": "best (default) or 144, 240, 360, 480, 720, 1080, 1440, 2160. You get the tallest picture the video offers up to that height, never above your key's max_height. Up to 1080 on every key; 1440 and 2160 come with media on paid accounts."
         },
         "audio": {
          "type": "boolean",
          "description": "false: the picture alone (one video stream, no sound). Default true: picture and sound."
         },
         "delivery": {
          "type": "string",
          "description": "links."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref",
         "delivery"
        ]
       },
       "example": {
        "ref": "jNQXAC9IVRw",
        "height": 720,
        "delivery": "links"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"kind\": \"download\", \"video\": {\"id\", \"title\", \"channel\", \"duration\", …}, \"streams\": [{\"kind\": \"video\", \"url\": \"/v1/media/…\", \"format_id\": \"v720\", \"ext\": \"mp4\", \"codec\": \"avc1…\", \"width\": 1280, \"height\": 720, \"fps\": 30, \"size\": …}, {\"kind\": \"audio\", \"url\": \"/v1/media/…\", \"format_id\": \"a128\", \"ext\": \"m4a\", \"codec\": \"mp4a…\", \"size\": …}], \"expires_in\": 18000}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/clip": {
   "post": {
    "operationId": "clip",
    "summary": "Clip",
    "description": "A time range, up to your key's max_seconds (GET /v1/limits). Media opens with your account's first payment. Answers at once like Video media, plus cut: {\"start\", \"end\"}. Your machine reads just that range of each stream (byte ranges) and cuts on the exact frame; see Media links. With clip_only: true each link is a small file of only the part of the video around the clip (a few MB, not the whole video): save it in full, then cut each stream at its own cut_in_file. Without it, a plain download of a link (no Range) gives the video from its start to the end of the clip: the clip stays at its own times and nothing past it is sent or charged; reading in parts (Range, as players and media tools do) reaches the whole video. With clip_only: false a plain download gets the whole video too. Several parts of one video: send cuts instead of start and end. One order answers them all, in clips: each with its own cut and streams (clip-only unless you send clip_only: false), each charged by its own seconds. A part that starts past the video's end comes back as {\"cut\", \"ok\": false, \"class\": \"bad_input\", \"error\"} and costs nothing.",
    "tags": [
     "Media"
    ],
    "x-price": "12 credits per minute · 36 above 1080p",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#clip"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or URL."
         },
         "start": {
          "oneOf": [
           {
            "type": "number"
           },
           {
            "type": "string"
           }
          ],
          "description": "Seconds (42.8) or a time (\"1:05.5\", \"1:02:03.25\"), to the millisecond. Required unless you send cuts."
         },
         "end": {
          "oneOf": [
           {
            "type": "number"
           },
           {
            "type": "string"
           }
          ],
          "description": "Same forms; end − start at most your key's max_seconds. Required unless you send cuts."
         },
         "cuts": {
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "items": {
           "type": "object",
           "required": [
            "end"
           ],
           "additionalProperties": false,
           "properties": {
            "start": {
             "oneOf": [
              {
               "type": "number"
              },
              {
               "type": "string"
              }
             ]
            },
            "end": {
             "oneOf": [
              {
               "type": "number"
              },
              {
               "type": "string"
              }
             ]
            }
           }
          },
          "description": "1-10 parts of the same video, each {\"start\", \"end\"} in the same forms, each at most your key's max_seconds. Use it instead of start and end when you need several shots from one video: one order, one answer, faster than one order per shot."
         },
         "height": {
          "oneOf": [
           {
            "type": "string"
           },
           {
            "type": "integer"
           }
          ],
          "description": "As in Video media."
         },
         "audio": {
          "type": "boolean",
          "description": "false: the picture alone, as in Video media."
         },
         "clip_only": {
          "type": "boolean",
          "description": "true: each stream's link holds only the part of the video around the clip, and each stream says clip_only: true, starts_at (the video time its file begins at) and cut_in_file ({\"start\", \"end\"}: where the clip lies inside that file). A stream that says clip_only: false is the whole video: read its cut range as without the option. Recommended; the add-on (1.8) and the developer client (1.3) use it."
         },
         "delivery": {
          "type": "string",
          "description": "links."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref",
         "delivery"
        ]
       },
       "example": {
        "ref": "dQw4w9WgXcQ",
        "start": 42,
        "end": 52,
        "height": 1080,
        "delivery": "links",
        "clip_only": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"kind\": \"clip\", \"video\": {…}, \"streams\": [{\"kind\": \"video\", …, \"size\": 2418260, \"clip_only\": true, \"starts_at\": 40.04, \"cut_in_file\": {\"start\": 1.96, \"end\": 11.96}}, {\"kind\": \"audio\", …}], \"cut\": {\"start\": 42.0, \"end\": 52.0}, \"expires_in\": 18000}\n// with \"cuts\": [{\"start\": 42, \"end\": 46}, {\"start\": 95.5, \"end\": 99}]\n{\"ok\": true, \"kind\": \"clip\", \"video\": {…}, \"clips\": [{\"cut\": {\"start\": 42.0, \"end\": 46.0}, \"streams\": [{\"kind\": \"video\", …, \"clip_only\": true, \"starts_at\": 40.04, \"cut_in_file\": {\"start\": 1.96, \"end\": 5.96}}, {\"kind\": \"audio\", …}]}, {\"cut\": {\"start\": 95.5, \"end\": 99.0}, \"streams\": […]}], \"expires_in\": 18000}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/audio": {
   "post": {
    "operationId": "audio",
    "summary": "Audio",
    "description": "The best sound as one M4A stream link: the whole track, or a range (given as cut) kept on your machine, up to your key's max_seconds. Media opens with your account's first payment. A whole track needs no joining: save the link as it is.",
    "tags": [
     "Media"
    ],
    "x-price": "12 credits per minute",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#audio"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "ref": {
          "type": "string",
          "description": "Video id or URL."
         },
         "start": {
          "oneOf": [
           {
            "type": "number"
           },
           {
            "type": "string"
           }
          ],
          "description": "Seconds or a time, as in Clip."
         },
         "end": {
          "oneOf": [
           {
            "type": "number"
           },
           {
            "type": "string"
           }
          ],
          "description": "Same forms."
         },
         "delivery": {
          "type": "string",
          "description": "links."
         }
        },
        "additionalProperties": true,
        "required": [
         "ref",
         "delivery"
        ]
       },
       "example": {
        "ref": "dQw4w9WgXcQ",
        "delivery": "links"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"kind\": \"audio\", \"video\": {…}, \"streams\": [{\"kind\": \"audio\", \"url\": \"/v1/media/…\", \"ext\": \"m4a\", …}], \"expires_in\": 18000}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/media/{link}": {
   "get": {
    "operationId": "media",
    "summary": "Media links",
    "description": "Each streams[].url is a path on this service: prefix your base URL and fetch it. It needs no key (it is your key's own, made for this one order), supports byte ranges (so a large video resumes where it stopped and can be read in parts), works for expires_in seconds (5 hours), and never counts again. A link passes along what its order covers: a whole video's links their streams three times over (resumes and a second save fit), a clip's links its own part of the video with room to spare (the stream's header and index, the keyframe before cut.start, a minute around the cut and retries). So read only a clip's part (seeking to cut.start, as a media tool's seek does), not the whole stream, or ask the clip with clip_only: true and save each small file in full; A link paid in credits never stops there: what it passes past its order is charged by the second at the order's media rate (bytes past it, as a share of the stream, times its length), each byte once: reading a part again is never charged again, up to its stream ten times over in all; then it answers 410 link_spent (free): order again. With no credits left it answers 402 before passing more. Join the picture and sound into one MP4 with any tool that copies MP4 tracks (nothing to encode again for a whole video); for a clip, read cut.start to cut.end of each and encode just the clip's picture again for an exact first frame. Your key's GET /v1/setup gives the exact commands; the add-on and GET /v1/client do it all. Free.",
    "tags": [
     "Media"
    ],
    "x-price": "free",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#media"
    },
    "security": [],
    "parameters": [
     {
      "name": "link",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "From streams[].url."
     }
    ],
    "responses": {
     "200": {
      "description": "Example: Stream bytes (206 with Range) · 404 when the link ended, 402 with no credits for bytes past its order, 410 link_spent past its stream ten times over: order again",
      "content": {
       "application/octet-stream": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/social": {
   "post": {
    "operationId": "social",
    "summary": "Facebook, Instagram or X video",
    "description": "A public post on X (twitter.com), Instagram or Facebook (fb.watch links too), from its link. Media opens with your account's first payment. Answers who posted it (author), when (published), its text and figures (views, likes, comments, reposts, where the site shows them), and under videos each of its videos with the files the site offers: kind video (picture and sound together), video_only or audio, best first. Each file's link is a full address on this service: fetch it as it is (no key header needed, byte ranges work) before links_expire; file_name is a name to save it under. Priced as a whole-video download, by started minute of the post's videos together; a video whose length the site does not give counts as one minute. Fetching the links costs nothing more. Only posts anyone may see without signing in. A link that is not a post answers 422 bad_link; a post that is gone 404 not_found; one that is private or needs a sign-in 403 not_public; one with no video 422 no_video; adult posts 422 restricted_content; 503 busy with retry: true means send it again in a minute. None of these costs anything.",
    "tags": [
     "Media"
    ],
    "x-price": "12 credits per minute",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#social"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "The post's link: x.com/…/status/…, instagram.com/p/… or /reel/…, facebook.com/…/videos/…, facebook.com/reel/…, fb.watch/…."
         }
        },
        "additionalProperties": true,
        "required": [
         "url"
        ]
       },
       "example": {
        "url": "https://x.com/someone/status/1890000000000000001"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"ok\": true, \"site\": \"x\", \"id\": \"1890000000000000001\", \"url\": \"https://x.com/i/status/1890000000000000001\", \"title\", \"text\", \"author\": {\"name\", \"handle\"}, \"published\": \"2026-11-30T12:00:00Z\", \"duration\": 75.4, \"views\": 12000, \"likes\": 300, \"comments\", \"reposts\", \"thumbnail\": \"https://…/v1/social/file/…\", \"videos\": [{\"index\": 1, \"duration\": 75.4, \"width\": 720, \"height\": 1280, \"thumbnail\", \"files\": [{\"kind\": \"video\", \"ext\": \"mp4\", \"width\": 720, \"height\": 1280, \"fps\", \"size\", \"bitrate_kbps\": 2176, \"link\": \"https://…/v1/social/file/…\", \"file_name\": \"x-1890000000000000001-1-video.mp4\"}, …]}], \"links_expire\": \"2026-11-30T18:00:00Z\"}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/social/file/{token}": {
   "get": {
    "operationId": "social_file",
    "summary": "Social video files",
    "description": "One file from a Facebook, Instagram or X video answer: its bytes as the site serves them. No key needed (the link is your key's own), byte ranges work, and it lives until the answer's links_expire (6 hours). A link can be fetched 40 times; after that, or once it ended, send the post's link again for fresh links. Free.",
    "tags": [
     "Media"
    ],
    "x-price": "free",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#social-file"
    },
    "security": [],
    "parameters": [
     {
      "name": "token",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "From videos[].files[].link or a thumbnail."
     }
    ],
    "responses": {
     "200": {
      "description": "Example: File bytes (206 with Range) · 404 link_expired when the link ended or is unknown, 429 link_used_up after 40 fetches, 503 busy: try again in a minute",
      "content": {
       "application/octet-stream": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/thumbnails-zip": {
   "post": {
    "operationId": "thumbnails_zip",
    "summary": "Thumbnail pack",
    "description": "Up to 100 thumbnails at the largest size (HQ when that is missing) as one ZIP named 001-Title-ID.jpg…",
    "tags": [
     "Media"
    ],
    "x-price": "3 credits per thumbnail",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#thumbnails-zip"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "video_ids": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Up to 100 ids or URLs. Or:"
         },
         "url": {
          "type": "string",
          "description": "A channel URL, with video_type (videos|shorts|both), sort (recent|popular), max_videos (1 to 100)."
         }
        },
        "additionalProperties": true
       },
       "example": {
        "url": "https://www.youtube.com/@MrBeast",
        "sort": "popular",
        "max_videos": 20
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: ZIP bytes",
      "content": {
       "application/zip": {
        "schema": {
         "type": "string",
         "format": "binary"
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/report": {
   "post": {
    "operationId": "report",
    "summary": "Queue a channel report",
    "description": "A channel (or a single video) with stats for each video, optional comments and transcripts. Returns a job_id to poll. Each key can have up to 6 jobs open at once, and finished jobs are kept for 48 hours. You are charged for what the report returns, never more than the limits you asked for (see Credits and billing). A queued report is paid at the most it could cost; what it did not use comes back to your balance (all of it if the report fails) and shows in your credit history.",
    "tags": [
     "Channel reports"
    ],
    "x-price": "3 credits per video",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#report"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "description": "Channel or video URL."
         },
         "video_type": {
          "type": "string",
          "description": "videos, shorts, both (default)."
         },
         "sort": {
          "type": "string",
          "description": "recent (default) or popular."
         },
         "max_videos": {
          "type": "integer",
          "description": "1 to 100, default 20."
         },
         "include_comments": {
          "type": "boolean",
          "description": "Comments per video (max_comments 1 to 100). 3 credits per 50 comments returned, per video."
         },
         "include_transcript": {
          "type": "boolean",
          "description": "Transcript per video. 3 credits per video."
         }
        },
        "additionalProperties": true,
        "required": [
         "url"
        ]
       },
       "example": {
        "url": "https://www.youtube.com/@MrBeast",
        "video_type": "videos",
        "sort": "popular",
        "max_videos": 10,
        "include_comments": true
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"success\": true, \"job_id\": 482019374451, \"mode\": \"channel\", \"message\": \"…\"}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/report/{job_id}": {
   "get": {
    "operationId": "report_poll",
    "summary": "Poll a channel report",
    "description": "pending → processing → completed (with result) or failed (with error). Only the key that queued a job can see it.",
    "tags": [
     "Channel reports"
    ],
    "x-price": "free",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#report-poll"
    },
    "parameters": [
     {
      "name": "job_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "From the queue call."
     }
    ],
    "responses": {
     "200": {
      "description": "Example: {\"success\": true, \"status\": \"completed\", \"result\": {\"mode\", \"channel\", \"total_videos\", \"total_views\", \"videos\": [...]}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  },
  "/v1/report-fast": {
   "post": {
    "operationId": "report_fast",
    "summary": "Channel report inline",
    "description": "The same body and result shape, answered in a single call. Best for 20 videos or fewer. Charged like Queue a channel report; asking for the same report again within 10 minutes, or while it is still running, answers at once with that report and is charged like it.",
    "tags": [
     "Channel reports"
    ],
    "x-price": "3 credits per video",
    "externalDocs": {
     "url": "https://wagamiai.com/docs#report-fast"
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
       },
       "example": {
        "url": "https://youtube.com/@MrBeast",
        "video_type": "videos",
        "max_videos": 5
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Example: {\"success\": true, \"status\": \"completed\", \"result\": {…}}",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          }
         },
         "additionalProperties": true
        }
       }
      }
     },
     "default": {
      "$ref": "#/components/responses/Refusal"
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "key": {
    "type": "http",
    "scheme": "bearer",
    "description": "Your WagamiAI API key, from https://wagamiai.com/signup (client area, Keys)."
   }
  },
  "responses": {
   "Refusal": {
    "description": "A refusal or an error, never charged. 400: bad_request; 401: key_missing · key_unknown · unauthorized; 402: out_of_credits · key_credit_cap · account_paused · account_required; 403: not_permitted · key_disabled · key_expired · ip_not_allowed · media_off; 404: unknown_route · link_expired · not_found; 405: wrong_method; 409: links_only; 410: addon_outdated · link_spent; 411 / 413: bad_request · too_large; 422: not_found · yt_unavailable · members_only · geo_block · drm · age_restricted · live_not_started · live_no_recording · post_live · not_available · no_tab · too_long · live · length_unknown · bad_ref · too_many_refs · bad_query · bad_input · restricted_content; 429: rate_limited · daily_quota · download_quota · endpoint_quota · slow_down · concurrency · jobs_open · busy; 500: internal; 503: busy; 504: timeout",
    "content": {
     "application/json": {
      "schema": {
       "type": "object",
       "required": [
        "ok",
        "error"
       ],
       "properties": {
        "ok": {
         "type": "boolean",
         "const": false
        },
        "error": {
         "type": "string"
        },
        "class": {
         "type": "string"
        },
        "retry": {
         "type": "boolean"
        }
       },
       "additionalProperties": true
      }
     }
    }
   }
  }
 }
}
