{"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://gifbuilders.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_apng_converter":{"type":"object","description":"APNG Converter — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"apng-converter"},"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":["apng"]},"tool_gif_editor_add_text":{"type":"object","description":"Add Text to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor/add-text"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["edit"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_animated_gif_maker":{"type":"object","description":"Animated GIF Maker — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"animated-gif-maker"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["animate"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_editor_speed":{"type":"object","description":"Change GIF Speed — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor/speed"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["edit"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_editor_combine":{"type":"object","description":"Combine GIFs — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor/combine"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["edit"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_compress_gif":{"type":"object","description":"Compress GIF — live API","required":["tool","source_url"],"properties":{"tool":{"type":"string","const":"compress-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"},"quality":{"type":"integer","minimum":1,"maximum":100,"default":70,"description":"Palette quality — lower = smaller file"},"max_width":{"type":"integer","minimum":16,"maximum":2048,"description":"Downscale so width ≤ this value"},"frame_step":{"type":"integer","minimum":1,"maximum":4,"default":1,"description":"Keep every Nth frame (2 = half the frames)"}},"x-tig-capabilities":["compress"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_compress_gif_without_losing_quality":{"type":"object","description":"Compress GIF Without Losing Quality — live API","required":["tool","source_url"],"properties":{"tool":{"type":"string","const":"compress-gif/without-losing-quality"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"},"quality":{"type":"integer","minimum":1,"maximum":100,"default":70,"description":"Palette quality — lower = smaller file"},"max_width":{"type":"integer","minimum":16,"maximum":2048,"description":"Downscale so width ≤ this value"},"frame_step":{"type":"integer","minimum":1,"maximum":4,"default":1,"description":"Keep every Nth frame (2 = half the frames)"}},"x-tig-capabilities":["compress"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_compress_gif_discord_8mb":{"type":"object","description":"Compress GIF for Discord (8MB) — live API","required":["tool","source_url"],"properties":{"tool":{"type":"string","const":"compress-gif/discord-8mb"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"},"quality":{"type":"integer","minimum":1,"maximum":100,"default":70,"description":"Palette quality — lower = smaller file"},"max_width":{"type":"integer","minimum":16,"maximum":2048,"description":"Downscale so width ≤ this value"},"frame_step":{"type":"integer","minimum":1,"maximum":4,"default":1,"description":"Keep every Nth frame (2 = half the frames)"}},"x-tig-capabilities":["compress"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_compress_gif_for_twitter":{"type":"object","description":"Compress GIF for Twitter — live API","required":["tool","source_url"],"properties":{"tool":{"type":"string","const":"compress-gif/for-twitter"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"},"quality":{"type":"integer","minimum":1,"maximum":100,"default":70,"description":"Palette quality — lower = smaller file"},"max_width":{"type":"integer","minimum":16,"maximum":2048,"description":"Downscale so width ≤ this value"},"frame_step":{"type":"integer","minimum":1,"maximum":4,"default":1,"description":"Keep every Nth frame (2 = half the frames)"}},"x-tig-capabilities":["compress"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_create_gif":{"type":"object","description":"Create GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"create-gif"},"prompt":{"type":"string","maxLength":1000,"description":"Text prompt (pre-fills the tool page)"}},"x-tig-capabilities":["generate","animate"],"x-tig-credit-cost":null,"x-tig-output-formats":["gif"]},"tool_crop_gif":{"type":"object","description":"Crop GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"crop-gif"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["resize"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_editor_crop":{"type":"object","description":"Crop GIF (editor) — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor/crop"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["resize"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_editor_cut_frames":{"type":"object","description":"Cut GIF Frames — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor/cut-frames"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["edit"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_editor_video_to_gif":{"type":"object","description":"Editor: Video to GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor/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_free_gif_maker":{"type":"object","description":"Free GIF Maker — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"free-gif-maker"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["animate"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_builder":{"type":"object","description":"GIF Builder — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-builder"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["animate"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_editor":{"type":"object","description":"GIF Editor Hub — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["edit"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_editor_effects":{"type":"object","description":"GIF Effects — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor/effects"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["restyle"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_generator":{"type":"object","description":"GIF Generator — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-generator"},"prompt":{"type":"string","maxLength":1000,"description":"Text prompt (pre-fills the tool page)"}},"x-tig-capabilities":["generate","animate"],"x-tig-credit-cost":null,"x-tig-output-formats":["gif"]},"tool_gif_optimizer":{"type":"object","description":"GIF Optimizer — live API","required":["tool","source_url"],"properties":{"tool":{"type":"string","const":"gif-optimizer"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"},"quality":{"type":"integer","minimum":1,"maximum":100,"default":70,"description":"Palette quality — lower = smaller file"},"max_width":{"type":"integer","minimum":16,"maximum":2048,"description":"Downscale so width ≤ this value"},"frame_step":{"type":"integer","minimum":1,"maximum":4,"default":1,"description":"Keep every Nth frame (2 = half the frames)"}},"x-tig-capabilities":["compress"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_png_to_gif":{"type":"object","description":"PNG to GIF — live API","required":["tool","source_urls"],"properties":{"tool":{"type":"string","const":"png-to-gif"},"source_urls":{"type":"array","items":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"},"minItems":2,"maxItems":60,"description":"Ordered frame image URLs"},"fps":{"type":"integer","minimum":1,"maximum":50,"default":10,"description":"Frames per second"},"width":{"type":"integer","minimum":16,"maximum":1024,"description":"Output width (defaults to first frame width)"}},"x-tig-capabilities":["animate","convert"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_pixel_art_studio":{"type":"object","description":"Pixel Art Studio — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"pixel-art-studio"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["edit","animate"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif","png","json"]},"tool_gif_editor_resize":{"type":"object","description":"Resize GIF — live API","required":["tool","source_url","width"],"properties":{"tool":{"type":"string","const":"gif-editor/resize"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"},"width":{"type":"integer","minimum":16,"maximum":2048,"description":"Target width in px"},"height":{"type":"integer","minimum":16,"maximum":2048,"description":"Target height in px (omit to keep aspect ratio)"}},"x-tig-capabilities":["resize"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif","png","jpg"]},"tool_gif_editor_reverse":{"type":"object","description":"Reverse GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor/reverse"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["edit"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_editor_rotate":{"type":"object","description":"Rotate GIF — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-editor/rotate"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["edit"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_sprite_animator":{"type":"object","description":"Sprite Animator — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"sprite-animator"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["animate"],"x-tig-credit-cost":null,"x-tig-output-formats":["gif","sprite_sheet"]},"tool_sticker_pack_builder":{"type":"object","description":"Sticker Pack Builder — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"sticker-pack-builder"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["convert","resize"],"x-tig-credit-cost":0,"x-tig-output-formats":["apng","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":["apng-converter","gif-editor/add-text","animated-gif-maker","gif-editor/speed","gif-editor/combine","compress-gif","compress-gif/without-losing-quality","compress-gif/discord-8mb","compress-gif/for-twitter","create-gif","crop-gif","gif-editor/crop","gif-editor/cut-frames","gif-editor/video-to-gif","free-gif-maker","gif-builder","gif-editor","gif-editor/effects","gif-generator","gif-optimizer","png-to-gif","pixel-art-studio","gif-editor/resize","gif-editor/reverse","gif-editor/rotate","sprite-animator","sticker-pack-builder"]}}],"security":[{},{"ApiKey":[]},{"Session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/tool_apng_converter"},{"$ref":"#/components/schemas/tool_gif_editor_add_text"},{"$ref":"#/components/schemas/tool_animated_gif_maker"},{"$ref":"#/components/schemas/tool_gif_editor_speed"},{"$ref":"#/components/schemas/tool_gif_editor_combine"},{"$ref":"#/components/schemas/tool_compress_gif"},{"$ref":"#/components/schemas/tool_compress_gif_without_losing_quality"},{"$ref":"#/components/schemas/tool_compress_gif_discord_8mb"},{"$ref":"#/components/schemas/tool_compress_gif_for_twitter"},{"$ref":"#/components/schemas/tool_create_gif"},{"$ref":"#/components/schemas/tool_crop_gif"},{"$ref":"#/components/schemas/tool_gif_editor_crop"},{"$ref":"#/components/schemas/tool_gif_editor_cut_frames"},{"$ref":"#/components/schemas/tool_gif_editor_video_to_gif"},{"$ref":"#/components/schemas/tool_free_gif_maker"},{"$ref":"#/components/schemas/tool_gif_builder"},{"$ref":"#/components/schemas/tool_gif_editor"},{"$ref":"#/components/schemas/tool_gif_editor_effects"},{"$ref":"#/components/schemas/tool_gif_generator"},{"$ref":"#/components/schemas/tool_gif_optimizer"},{"$ref":"#/components/schemas/tool_png_to_gif"},{"$ref":"#/components/schemas/tool_pixel_art_studio"},{"$ref":"#/components/schemas/tool_gif_editor_resize"},{"$ref":"#/components/schemas/tool_gif_editor_reverse"},{"$ref":"#/components/schemas/tool_gif_editor_rotate"},{"$ref":"#/components/schemas/tool_sprite_animator"},{"$ref":"#/components/schemas/tool_sticker_pack_builder"}],"discriminator":{"propertyName":"tool","mapping":{"apng-converter":"#/components/schemas/tool_apng_converter","gif-editor/add-text":"#/components/schemas/tool_gif_editor_add_text","animated-gif-maker":"#/components/schemas/tool_animated_gif_maker","gif-editor/speed":"#/components/schemas/tool_gif_editor_speed","gif-editor/combine":"#/components/schemas/tool_gif_editor_combine","compress-gif":"#/components/schemas/tool_compress_gif","compress-gif/without-losing-quality":"#/components/schemas/tool_compress_gif_without_losing_quality","compress-gif/discord-8mb":"#/components/schemas/tool_compress_gif_discord_8mb","compress-gif/for-twitter":"#/components/schemas/tool_compress_gif_for_twitter","create-gif":"#/components/schemas/tool_create_gif","crop-gif":"#/components/schemas/tool_crop_gif","gif-editor/crop":"#/components/schemas/tool_gif_editor_crop","gif-editor/cut-frames":"#/components/schemas/tool_gif_editor_cut_frames","gif-editor/video-to-gif":"#/components/schemas/tool_gif_editor_video_to_gif","free-gif-maker":"#/components/schemas/tool_free_gif_maker","gif-builder":"#/components/schemas/tool_gif_builder","gif-editor":"#/components/schemas/tool_gif_editor","gif-editor/effects":"#/components/schemas/tool_gif_editor_effects","gif-generator":"#/components/schemas/tool_gif_generator","gif-optimizer":"#/components/schemas/tool_gif_optimizer","png-to-gif":"#/components/schemas/tool_png_to_gif","pixel-art-studio":"#/components/schemas/tool_pixel_art_studio","gif-editor/resize":"#/components/schemas/tool_gif_editor_resize","gif-editor/reverse":"#/components/schemas/tool_gif_editor_reverse","gif-editor/rotate":"#/components/schemas/tool_gif_editor_rotate","sprite-animator":"#/components/schemas/tool_sprite_animator","sticker-pack-builder":"#/components/schemas/tool_sticker_pack_builder"}}}}}},"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"}}}}}}}}}