{"openapi":"3.1.0","info":{"title":"Instant API","version":"2026-06-30","description":"Programmatic access to selected instant.tw utilities. Authenticate with an Instant API key. API keys are intended for server-side use; browser calls are CORS-enabled for developer convenience but expose keys to end users if embedded in public frontend code."},"servers":[{"url":"https://api.instant.tw"}],"components":{"securitySchemes":{"bearerApiKey":{"type":"http","scheme":"bearer"},"headerApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"Quota":{"type":"object","properties":{"ok":{"type":"boolean"},"plan":{"type":"string","enum":["api_starter_monthly","api_scale_monthly"]},"month":{"type":"string","examples":["2026-06"]},"usedThisMonth":{"type":"integer","minimum":0},"includedCalls":{"type":"integer","minimum":0},"remainingCalls":{"type":"integer","minimum":0}},"required":["ok","plan","month","usedThisMonth","includedCalls","remainingCalls"]},"SlugifyRequest":{"type":"object","properties":{"text":{"type":"string","maxLength":10000},"maxLength":{"type":"integer","minimum":1,"maximum":200,"default":120}},"required":["text"]},"SlugifyResponse":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"]},"Base64Request":{"type":"object","properties":{"mode":{"type":"string","enum":["encode","decode"],"default":"encode"},"text":{"type":"string","maxLength":100000}},"required":["text"]},"Base64EncodeResponse":{"type":"object","properties":{"base64":{"type":"string"}}},"Base64DecodeResponse":{"type":"object","properties":{"text":{"type":"string"}}},"HashRequest":{"type":"object","properties":{"algorithm":{"type":"string","enum":["sha256","sha1","md5"],"default":"sha256"},"text":{"type":"string","maxLength":100000}},"required":["text"]},"HashResponse":{"type":"object","properties":{"algorithm":{"type":"string"},"hex":{"type":"string"}},"required":["algorithm","hex"]},"Tool":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"pricing":{"type":"string","enum":["free","freemium"]},"url":{"type":"string","format":"uri"},"api":{"type":"object","properties":{"executable":{"type":"boolean"},"reason":{"type":"string"}}}},"required":["name","slug","pricing","url","api"]},"ServerTool":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"endpoint":{"type":"string"},"method":{"type":"string"},"accepts":{"type":"array","items":{"type":"string"}}}},"SignRequestResponse":{"type":"object","properties":{"docId":{"type":"string"},"sent":{"type":"integer"},"recipients":{"type":"integer"}},"required":["docId","sent","recipients"]}},"responses":{"Unauthorized":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PaymentRequired":{"description":"The key owner does not have an active Instant API plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Per-minute limit or hard monthly ceiling reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"security":[{"bearerApiKey":[]},{"headerApiKey":[]}],"paths":{"/v1/health":{"get":{"summary":"Authenticated API health and quota snapshot","responses":{"200":{"description":"Quota snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quota"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/tools":{"get":{"summary":"List available API endpoints","responses":{"200":{"description":"Endpoint list"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/catalog":{"get":{"summary":"Search the live instant.tw tool catalog","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"pricing","in":"query","schema":{"type":"string","enum":["free","freemium"]}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Paginated catalog results"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/catalog/{slug}":{"get":{"summary":"Get one catalog tool by slug","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tool metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Tool not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/freemium-tools":{"get":{"summary":"List freemium tools only","responses":{"200":{"description":"Freemium tool list"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/server-tools":{"get":{"summary":"List tools executable through the API","responses":{"200":{"description":"Server-executable tools"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/run/{tool}":{"post":{"summary":"Run a server-backed PDF/office conversion tool","parameters":[{"name":"tool","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"Converted file stream"},"400":{"description":"Invalid upload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/sign/request":{"post":{"summary":"Create an eSign request and email recipients","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"recipients":{"type":"string","description":"JSON array of { email, name? }"},"subject":{"type":"string"},"message":{"type":"string"}},"required":["file","recipients"]}}}},"responses":{"200":{"description":"Signature request created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignRequestResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/sign/requests":{"get":{"summary":"List eSign requests created by the API key owner","responses":{"200":{"description":"Signature request list"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/text/slugify":{"post":{"summary":"Convert text to a URL slug","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlugifyRequest"}}}},"responses":{"200":{"description":"Slugified text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlugifyResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/text/base64":{"post":{"summary":"Encode or decode Base64","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Base64Request"}}}},"responses":{"200":{"description":"Encoded or decoded result"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/hash":{"post":{"summary":"Generate a SHA-256, SHA-1, or MD5 hash","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashRequest"}}}},"responses":{"200":{"description":"Hash result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}