{"openapi":"3.1.0","info":{"title":"TIG Agent API","version":"1.1.0","description":"Run Transparent Image Generator (TIG) tools over JSON. Free utilities are instant and keyless; AI tools return a job_id to poll."},"servers":[{"url":"https://videotogifs.com/functions"}],"components":{"schemas":{"Envelope":{"type":"object","required":["success","data","error","credits","timing_ms"],"properties":{"success":{"type":"boolean"},"data":{"type":["object","null"]},"error":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["INVALID_PARAMS","AUTH_REQUIRED","INSUFFICIENT_CREDITS","TOOL_NOT_FOUND","JOB_NOT_FOUND","TOO_LARGE","UNSUPPORTED_FORMAT","RATE_LIMITED","PROCESSING_FAILED","BROWSER_ONLY"]},"message":{"type":"string"},"docs_url":{"type":"string"}}},"credits":{"type":"object","properties":{"charged":{"type":"number"},"remaining":{"type":["number","null"]}}},"timing_ms":{"type":"number"}}},"tool_es_avi_a_gif":{"type":"object","description":"AVI a GIF (Español) — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"es/avi-a-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_avi_to_gif":{"type":"object","description":"AVI to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"avi-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_flv_to_gif":{"type":"object","description":"FLV to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"flv-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_to_video":{"type":"object","description":"GIF to Video — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-to-video"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["mp4","webp"]},"tool_gif_to_webp":{"type":"object","description":"GIF to WebP — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-to-webp"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert","compress"],"x-tig-credit-cost":0,"x-tig-output-formats":["webp"]},"tool_mkv_to_gif":{"type":"object","description":"MKV to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"mkv-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_mov_to_gif":{"type":"object","description":"MOV to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"mov-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_es_mp4_a_gif":{"type":"object","description":"MP4 a GIF (Español) — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"es/mp4-a-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_mp4_to_gif":{"type":"object","description":"MP4 to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"mp4-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_ogv_to_gif":{"type":"object","description":"OGV to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"ogv-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_video_converter":{"type":"object","description":"Video Converter — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"video-converter"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert","compress"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_video_to_gif":{"type":"object","description":"Video to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"video-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_es_webm_a_gif":{"type":"object","description":"WebM a GIF (Español) — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"es/webm-a-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_webm_to_gif":{"type":"object","description":"WebM to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"webm-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_webp_to_gif":{"type":"object","description":"WebP to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"webp-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_youtube_to_gif":{"type":"object","description":"YouTube to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"youtube-to-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]}},"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-Api-Key"},"Session":{"type":"http","scheme":"bearer"}}},"paths":{"/agentApi":{"post":{"operationId":"runTool","summary":"Run a tool","description":"Send the tool slug as ?tool=<slug> or as \"tool\" in the body. Sync tools return output URLs; job tools return 202 with data.job_id.","parameters":[{"name":"tool","in":"query","required":false,"schema":{"type":"string","enum":["es/avi-a-gif","avi-to-gif","flv-to-gif","gif-to-video","gif-to-webp","mkv-to-gif","mov-to-gif","es/mp4-a-gif","mp4-to-gif","ogv-to-gif","video-converter","video-to-gif","es/webm-a-gif","webm-to-gif","webp-to-gif","youtube-to-gif"]}}],"security":[{},{"ApiKey":[]},{"Session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/tool_es_avi_a_gif"},{"$ref":"#/components/schemas/tool_avi_to_gif"},{"$ref":"#/components/schemas/tool_flv_to_gif"},{"$ref":"#/components/schemas/tool_gif_to_video"},{"$ref":"#/components/schemas/tool_gif_to_webp"},{"$ref":"#/components/schemas/tool_mkv_to_gif"},{"$ref":"#/components/schemas/tool_mov_to_gif"},{"$ref":"#/components/schemas/tool_es_mp4_a_gif"},{"$ref":"#/components/schemas/tool_mp4_to_gif"},{"$ref":"#/components/schemas/tool_ogv_to_gif"},{"$ref":"#/components/schemas/tool_video_converter"},{"$ref":"#/components/schemas/tool_video_to_gif"},{"$ref":"#/components/schemas/tool_es_webm_a_gif"},{"$ref":"#/components/schemas/tool_webm_to_gif"},{"$ref":"#/components/schemas/tool_webp_to_gif"},{"$ref":"#/components/schemas/tool_youtube_to_gif"}],"discriminator":{"propertyName":"tool","mapping":{"es/avi-a-gif":"#/components/schemas/tool_es_avi_a_gif","avi-to-gif":"#/components/schemas/tool_avi_to_gif","flv-to-gif":"#/components/schemas/tool_flv_to_gif","gif-to-video":"#/components/schemas/tool_gif_to_video","gif-to-webp":"#/components/schemas/tool_gif_to_webp","mkv-to-gif":"#/components/schemas/tool_mkv_to_gif","mov-to-gif":"#/components/schemas/tool_mov_to_gif","es/mp4-a-gif":"#/components/schemas/tool_es_mp4_a_gif","mp4-to-gif":"#/components/schemas/tool_mp4_to_gif","ogv-to-gif":"#/components/schemas/tool_ogv_to_gif","video-converter":"#/components/schemas/tool_video_converter","video-to-gif":"#/components/schemas/tool_video_to_gif","es/webm-a-gif":"#/components/schemas/tool_es_webm_a_gif","webm-to-gif":"#/components/schemas/tool_webm_to_gif","webp-to-gif":"#/components/schemas/tool_webp_to_gif","youtube-to-gif":"#/components/schemas/tool_youtube_to_gif"}}}}}},"responses":{"200":{"description":"Completed (sync tools)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"202":{"description":"Job queued (AI tools) — poll GET /agentApi?job=<id>","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"description":"INVALID_PARAMS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"AUTH_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"402":{"description":"INSUFFICIENT_CREDITS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"TOOL_NOT_FOUND / JOB_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"413":{"description":"TOO_LARGE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"415":{"description":"UNSUPPORTED_FORMAT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"500":{"description":"PROCESSING_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"501":{"description":"BROWSER_ONLY","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}},"get":{"operationId":"getJobOrFile","summary":"Poll a job (?job=<id>) or fetch a discovery file (?file=…)","parameters":[{"name":"job","in":"query","required":false,"schema":{"type":"string"},"description":"Job id → data: { job_id, status, progress_pct, result }"},{"name":"file","in":"query","required":false,"schema":{"type":"string","enum":["llms.txt","llms-full.txt","tools.json","openapi.json"]}}],"security":[{"ApiKey":[]},{"Session":[]},{}],"responses":{"200":{"description":"Job status envelope or discovery file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"404":{"description":"JOB_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}}}}