{"openapi":"3.1.0","info":{"title":"Vectenza API","description":"Convert raster images to SVG. Authenticate with a developer API key from https://vectenza.com/developers: `Authorization: Bearer vz_…`.","version":"1.0.0"},"paths":{"/v1/vectorizations":{"post":{"tags":["v1"],"summary":"Convert an image to SVG (or PNG)","operationId":"create_vectorization_v1_vectorizations_post","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Retry-safe POST: a retry with the same key returns the first job instead of converting (and charging) again.","title":"Idempotency-Key"},"description":"Retry-safe POST: a retry with the same key returns the first job instead of converting (and charging) again."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorizationOut"}}}},"200":{"description":"Replayed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorizationOut"}}}},"400":{"description":"Invalid image or fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"No credits left today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Account not invited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Idempotency-Key reused for a different request, or still running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Rate or concurrency limit; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"500":{"description":"Unexpected failure (nothing is charged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"503":{"description":"Server busy; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","format":"binary","description":"PNG, JPEG, GIF, WebP or BMP"},"output.file_format":{"type":"string","enum":["png","svg"],"default":"svg"},"processing.max_colors":{"type":"integer","minimum":0,"description":"0: no limit"}},"additionalProperties":{"type":"string","description":"Any other processing.*, output.* or engine.* field; GET /config/fields lists them."}}}}}}},"/v1/vectorizations/{vectorization_id}":{"get":{"tags":["v1"],"summary":"Get a vectorization","operationId":"get_vectorization_v1_vectorizations__vectorization_id__get","parameters":[{"name":"vectorization_id","in":"path","required":true,"schema":{"type":"string","title":"Vectorization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorizationOut"}}}},"400":{"description":"Invalid image or fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"No credits left today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Account not invited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Idempotency-Key reused for a different request, or still running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Rate or concurrency limit; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"500":{"description":"Unexpected failure (nothing is charged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"503":{"description":"Server busy; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/vectorizations/{vectorization_id}/result":{"get":{"tags":["v1"],"summary":"Download the result file","operationId":"get_vectorization_result_v1_vectorizations__vectorization_id__result_get","parameters":[{"name":"vectorization_id","in":"path","required":true,"schema":{"type":"string","title":"Vectorization Id"}}],"responses":{"200":{"description":"The SVG (or PNG) file","content":{"image/svg+xml":{},"image/png":{}}},"400":{"description":"Invalid image or fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"No credits left today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Account not invited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Idempotency-Key reused for a different request, or still running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Rate or concurrency limit; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"500":{"description":"Unexpected failure (nothing is charged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"503":{"description":"Server busy; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/credits":{"get":{"tags":["v1"],"summary":"The account's remaining credits","operationId":"get_credits_v1_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsOut"}}}},"400":{"description":"Invalid image or fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"401":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"402":{"description":"No credits left today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"403":{"description":"Account not invited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"409":{"description":"Idempotency-Key reused for a different request, or still running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"429":{"description":"Rate or concurrency limit; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"500":{"description":"Unexpected failure (nothing is charged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}},"503":{"description":"Server busy; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorOut"}}}}}}}},"components":{"schemas":{"CreditsOut":{"properties":{"object":{"type":"string","const":"credits","title":"Object","default":"credits"},"unit":{"type":"string","title":"Unit","description":"image: each new source image costs 1 credit a day; run: every conversion costs 1"},"daily":{"anyOf":[{"$ref":"#/components/schemas/DailyCredits"},{"type":"null"}],"description":"null without an account"},"bonus_remaining":{"type":"integer","title":"Bonus Remaining","description":"One-time credits, spent after the daily allowance"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining","description":"daily + bonus; null: unlimited"}},"type":"object","required":["unit","daily","bonus_remaining","remaining"],"title":"CreditsOut"},"DailyCredits":{"properties":{"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"null: no daily limit"},"used":{"type":"integer","title":"Used"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining"},"resets_at":{"type":"string","title":"Resets At"}},"type":"object","required":["limit","used","remaining","resets_at"],"title":"DailyCredits"},"ErrorDetail":{"properties":{"status":{"type":"integer","title":"Status"},"code":{"type":"integer","title":"Code"},"type":{"type":"string","title":"Type","description":"Stable error kind: invalid_request, unauthorized, insufficient_credits, forbidden, not_found, conflict, payload_too_large, rate_limited, internal_error, server_busy"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","code","type","message"],"title":"ErrorDetail"},"ErrorOut":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"type":"object","required":["error"],"title":"ErrorOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ResultInfo":{"properties":{"format":{"type":"string","title":"Format","description":"svg or png"},"content_type":{"type":"string","title":"Content Type"},"bytes":{"type":"integer","title":"Bytes"},"url":{"type":"string","title":"Url","description":"Path of GET /v1/vectorizations/{id}/result"}},"type":"object","required":["format","content_type","bytes","url"],"title":"ResultInfo"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VectorizationOut":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"vectorization","title":"Object","default":"vectorization"},"status":{"type":"string","enum":["processing","succeeded"],"title":"Status","description":"Jobs finish within the POST today, so a returned job has succeeded; more statuses may be added for asynchronous jobs."},"created_at":{"type":"string","title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"credits_charged":{"type":"integer","title":"Credits Charged","description":"0 when the image was already counted today or the caller does not use credits"},"result":{"anyOf":[{"$ref":"#/components/schemas/ResultInfo"},{"type":"null"}]}},"type":"object","required":["id","status","created_at","completed_at","credits_charged","result"],"title":"VectorizationOut"}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A developer API key (vz_…)"}}},"security":[{"apiKey":[]}]}