{"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://transparentgifmaker.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_gif_background_remover_free":{"type":"object","description":"Free GIF Background Remover — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-background-remover-free"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["remove-bg"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_gif_with_transparency":{"type":"object","description":"GIF with Transparency — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"gif-with-transparency"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["remove-bg"],"x-tig-credit-cost":0,"x-tig-output-formats":["gif"]},"tool_remove_gif_background":{"type":"object","description":"Make a GIF Transparent — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"remove-gif-background"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["remove-bg"],"x-tig-credit-cost":null,"x-tig-output-formats":["gif"]},"tool_transparent_gif_generator":{"type":"object","description":"Transparent GIF Generator — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"transparent-gif-generator"},"prompt":{"type":"string","maxLength":1000,"description":"Text prompt (pre-fills the tool page)"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["generate","animate"],"x-tig-credit-cost":null,"x-tig-output-formats":["gif","webp","apng"]},"tool_transparent_gif_maker":{"type":"object","description":"Transparent GIF Maker — browser-only (returns BROWSER_ONLY with action_url)","required":["tool"],"properties":{"tool":{"type":"string","const":"transparent-gif-maker"},"source_url":{"type":"string","format":"uri","description":"Public http(s) URL of the input file (max 15 MB)"}},"x-tig-capabilities":["animate","remove-bg"],"x-tig-credit-cost":null,"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":["gif-background-remover-free","gif-with-transparency","remove-gif-background","transparent-gif-generator","transparent-gif-maker"]}}],"security":[{},{"ApiKey":[]},{"Session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/tool_gif_background_remover_free"},{"$ref":"#/components/schemas/tool_gif_with_transparency"},{"$ref":"#/components/schemas/tool_remove_gif_background"},{"$ref":"#/components/schemas/tool_transparent_gif_generator"},{"$ref":"#/components/schemas/tool_transparent_gif_maker"}],"discriminator":{"propertyName":"tool","mapping":{"gif-background-remover-free":"#/components/schemas/tool_gif_background_remover_free","gif-with-transparency":"#/components/schemas/tool_gif_with_transparency","remove-gif-background":"#/components/schemas/tool_remove_gif_background","transparent-gif-generator":"#/components/schemas/tool_transparent_gif_generator","transparent-gif-maker":"#/components/schemas/tool_transparent_gif_maker"}}}}}},"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"}}}}}}}}}