{"openapi":"3.1.0","info":{"title":"SynthID Removal API | GeminiWatermarks.com","version":"1.2.0","description":"Quality-focused SynthID processing works with your image credits. The /api/v1/images endpoint creates both single images and batches. Completion uses credits even for warned results, but failed or canceled incomplete work leaves credits unused. There is no free API processing quota."},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Add an API key in Account > API access. Avoid exposing keys through client code or URLs."}},"schemas":{"Error":{"type":"object","required":["error","code"],"properties":{"error":{"type":"string"},"code":{"type":"string"}}},"Image":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"state":{"type":"string","enum":["awaiting_upload","queued","processing","ready","failed","deleting","deleted","expired","not_started"]},"progress":{"type":"integer"},"message":{"type":"string"},"filename":{"type":"string"},"code":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"chargeCents":{"type":"integer","deprecated":true},"qualityTier":{"type":["string","null"]},"warning":{"type":["string","null"]},"warningCode":{"type":["string","null"],"enum":["texture_changed","quality_changed","visible_label_and_quality",null]},"statusUrl":{"type":"string"},"downloadUrl":{"type":["string","null"]},"pollAfterSeconds":{"type":"integer"},"batchId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"chargeCredits":{"type":"number","minimum":0,"readOnly":true}}},"Account":{"type":"object","properties":{"currency":{"const":"USD","deprecated":true},"availableCents":{"type":"integer","deprecated":true},"priceCents":{"type":"integer","readOnly":true,"deprecated":true},"limits":{"type":"object","additionalProperties":{"type":"integer"}},"paidBalanceCents":{"type":"integer","minimum":0,"description":"Usable paid balance with promotional credit excluded.","deprecated":true},"bonusBalanceCents":{"type":"integer","minimum":0,"description":"Bonus funds currently available for image charges.","deprecated":true},"bulkImagePriceCents":{"type":"integer","const":10,"readOnly":true,"deprecated":true},"bulkMinimumImages":{"type":"integer","const":5,"readOnly":true},"availableCredits":{"type":"number","minimum":0,"readOnly":true},"paidCredits":{"type":"number","minimum":0,"readOnly":true},"bonusCredits":{"type":"number","minimum":0,"readOnly":true},"creditsPerImage":{"type":"number","minimum":0,"readOnly":true,"const":1},"bulkCreditsPerImage":{"type":"number","minimum":0,"readOnly":true,"const":0.5}}},"File":{"type":"object","required":["filename","contentType","sizeBytes"],"properties":{"filename":{"type":"string"},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"]},"sizeBytes":{"type":"integer","minimum":1,"maximum":15728640}}},"Batch":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"state":{"type":"string"},"priceCents":{"type":"integer","readOnly":true,"enum":[0,10,16,20],"deprecated":true},"complete":{"type":"boolean"},"uploadExpiresAt":{"type":"string","format":"date-time"},"processingDeadlineAt":{"type":"string","format":"date-time"},"accessExpiresAt":{"type":"string","format":"date-time"},"statusUrl":{"type":"string"},"zipUrl":{"type":"string"},"pollAfterSeconds":{"type":"integer"},"items":{"type":"array","items":{"type":"object","description":"The input sequence, with null ids on rejected entries.","properties":{"id":{"type":["string","null"]},"state":{"type":"string","enum":["awaiting_upload","queued","processing","ready","failed","deleting","deleted","expired","not_started"]},"progress":{"type":"integer"},"message":{"type":"string"},"filename":{"type":"string"},"code":{"type":["string","null"]},"expiresAt":{"type":["string","null"],"format":"date-time"},"chargeCents":{"type":"integer","deprecated":true},"qualityTier":{"type":["string","null"]},"warning":{"type":["string","null"]},"warningCode":{"type":["string","null"],"enum":["texture_changed","quality_changed","visible_label_and_quality",null]},"statusUrl":{"type":"string"},"downloadUrl":{"type":["string","null"]},"pollAfterSeconds":{"type":"integer"},"batchId":{"type":"string","pattern":"^[a-f0-9]{32}$"},"ordinal":{"type":"integer"},"chargeCredits":{"type":"number","minimum":0,"readOnly":true}}}},"uploads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"ordinal":{"type":"integer"},"url":{"type":"string","format":"uri"},"method":{"const":"PUT"},"headers":{"type":"object","properties":{"Content-Type":{"type":"string"}}},"contentType":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"confirmUrl":{"type":"string"}}}},"creditsPerImage":{"type":"number","enum":[0,0.5,0.8,1],"readOnly":true}}}},"responses":{"Error400":{"description":"Invalid request","headers":{"Retry-After":{"description":"The provided retry wait, in seconds.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error401":{"description":"Invalid or revoked API key","headers":{"Retry-After":{"description":"The provided retry wait, in seconds.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error402":{"description":"Insufficient prepaid balance","headers":{"Retry-After":{"description":"The provided retry wait, in seconds.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error404":{"description":"Not found or not owned","headers":{"Retry-After":{"description":"The provided retry wait, in seconds.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error409":{"description":"Idempotency conflict, active batch or price mismatch","headers":{"Retry-After":{"description":"The provided retry wait, in seconds.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error410":{"description":"Expired or missing result","headers":{"Retry-After":{"description":"The provided retry wait, in seconds.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error413":{"description":"Request too large","headers":{"Retry-After":{"description":"The provided retry wait, in seconds.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error429":{"description":"Rate or upload concurrency limit","headers":{"Retry-After":{"description":"The provided retry wait, in seconds.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error503":{"description":"Processing temporarily unavailable","headers":{"Retry-After":{"description":"The provided retry wait, in seconds.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/account":{"get":{"operationId":"getAccount","summary":"Read balance and limits","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"402":{"$ref":"#/components/responses/Error402"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"410":{"$ref":"#/components/responses/Error410"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/v1/images":{"post":{"operationId":"uploadImages","summary":"Upload one image or create a batch","description":"Create one operation from JSON files metadata for 1-20 images, each limited to 15 MiB with separate storage uploads. One image can be sent directly as multipart with a 16 MiB overall request limit. Prices come from the service. The supplied helpers for Python and Node.js automate JSON creation, file transfers and confirmations.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Send identical content when retrying with this key. Account and creation endpoint determine scope; retention is seven days.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["image"],"additionalProperties":false,"properties":{"image":{"type":"string","format":"binary"}}},"encoding":{"image":{"contentType":"image/jpeg, image/png, image/webp"}}},"application/json":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"array","minItems":1,"maxItems":20,"items":{"$ref":"#/components/schemas/File"}}},"additionalProperties":false}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Image"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"402":{"$ref":"#/components/responses/Error402"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"410":{"$ref":"#/components/responses/Error410"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/v1/images/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"get":{"operationId":"getImage","summary":"Read status, warnings and expiry","description":"Wait 15 seconds between queue polls and 5 between processing polls, stopping when the state is terminal.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Image"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"402":{"$ref":"#/components/responses/Error402"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"410":{"$ref":"#/components/responses/Error410"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"delete":{"operationId":"deleteImage","summary":"Cancel or delete an image","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Cleanup pending"},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"402":{"$ref":"#/components/responses/Error402"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"410":{"$ref":"#/components/responses/Error410"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/v1/images/{id}/download":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"get":{"operationId":"downloadImage","summary":"Download a ready result","responses":{"200":{"description":"Authenticated result stream","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"402":{"$ref":"#/components/responses/Error402"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"410":{"$ref":"#/components/responses/Error410"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/v1/batches/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"get":{"operationId":"getBatch","summary":"Read ordered batch statuses","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"402":{"$ref":"#/components/responses/Error402"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"410":{"$ref":"#/components/responses/Error410"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/v1/batches/{id}/items/{imageId}/uploaded":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}},{"name":"imageId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"post":{"operationId":"confirmUpload","summary":"Confirm a direct upload","responses":{"200":{"description":"Already handled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Image"}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"402":{"$ref":"#/components/responses/Error402"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"410":{"$ref":"#/components/responses/Error410"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/v1/batches/{id}/cancel":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"post":{"operationId":"cancelBatch","summary":"Cancel unfinished items","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"402":{"$ref":"#/components/responses/Error402"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"410":{"$ref":"#/components/responses/Error410"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/api/v1/batches/{id}/zip":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"get":{"operationId":"downloadBatchZip","summary":"Stream ready results as a ZIP","responses":{"200":{"description":"Authenticated result stream","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"402":{"$ref":"#/components/responses/Error402"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"410":{"$ref":"#/components/responses/Error410"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}}},"servers":[{"url":"https://geminiwatermarks.com"}]}