Shapesoda Results API
Stored results (24 hours, up to 30 days with `retention_days`): download in any format, upgrade a preview, delete.
Stored results (24 hours, up to 30 days with `retention_days`): download in any format, upgrade a preview, delete.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/shapesoda-com:shapesoda-com-results-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Shapesoda Results API
version: 1.2.0
summary: Convert raster images (PNG, JPEG, WebP, BMP, GIF, TIFF) into SVG, PDF, EPS or DXF vectors, or a rendered PNG.
description: 'REST API and MCP server of Shapesoda (https://shapesoda.com). Account and vectorization requests (`/v1/vectorize`, `/v1/account`, `/mcp`) are authenticated with an API key sent as `Authorization: Bearer `; create keys in the account menu on shapesoda.com (a key is shown once). Stored results (`/v1/results/{id}`) use the result token instead of the key: `Authorization: Bearer ` is recommended; `?token=` is also accepted but can leak into access logs, browser history and analytics. One-time MCP upload links carry their own secret and need no extra authentication; `/v1/plans` is public. Never call the API from a browser or mobile app with your secret key. One successfully vectorized image costs 1 credit, whatever number of formats you request in that call; failed requests are refunded automatically. Errors are JSON objects `{"error": {"code", "message", "request_id"}}` — branch on `code`, the `message` is a human-readable hint.
Limits (defaults): 60 requests per minute per key with bursts of 10 (a token bucket; a request rejected with `429 rate_limited` does not use up a token, so waiting `Retry-After` seconds is enough; `Retry-After` is always a whole number of seconds, never a date); 5,000 images per key per UTC day (free repeats included); input up to 10 MB and 40 megapixels (images above 4.2 MP or 4096 px per side are downscaled automatically). Test mode (`mode=test`): free and watermarked, 100 calls per key and 100 per account per UTC day; `retention_days` and `image_url` are not available in test mode (`400 bad_request`); a stored test result lives 1 hour. Preview (`mode=preview`): free PNG preview up to 1 MP, 200 per account per UTC day (`429 preview_limit`); the vectors are unlocked from the preview link for 1 credit. Retention: `retention_days` (1–30) keeps a result for up to 30 days, free of charge. Free repeats: the same request (same bytes and parameters) within 24 hours is free without limit; the same image with other options is free for 30 days after it was paid for, up to 20 times per image per day. Result storage: a single-format request stores nothing; several formats, `retain=true`, `retention_days`, an explicit `Accept: application/json` and MCP results are stored encrypted for 24 hours (up to 30 days with `retention_days`; test-mode results for 1 hour; previews for 24 hours) with a key derived from a token only the client gets, then deleted. Fine-tuning: besides the presets there are options for processing, drawing, curves and stroke, gap filler, output size and format-specific output; a preset only sets defaults and every explicit option wins. Documentation: https://shapesoda.com/api'
termsOfService: https://shapesoda.com/terms
license:
name: Proprietary
url: https://shapesoda.com/terms
contact:
name: Shapesoda support
email: support@shapesoda.com
url: https://shapesoda.com/api
servers:
- url: https://shapesoda.com
description: Production
security:
- bearerAuth: []
tags:
- name: Results
description: 'Stored results (24 hours, up to 30 days with `retention_days`): download in any format, upgrade a preview, delete.'
paths:
/v1/results/{id}:
parameters:
- name: id
in: path
required: true
description: '`result_id` from the vectorize response (JSON field or `X-Result-Id`).'
schema:
type: string
pattern: ^res_[a-f0-9]{24}$
get:
operationId: getResult
tags:
- Results
summary: Download a stored result
description: 'Downloads a stored result (kept for 24 hours, or for `retention_days`) in any format. Access is granted by the result token only, not by the API key. Send it as `Authorization: Bearer ` (recommended); `?token=` is also accepted, but a token in a URL can leak into access logs, browser history and analytics. Anyone who has the token can download the result. A format that was not requested originally is built once from the stored source image with exactly the same preset, options and mode (a test result stays watermarked); this is free, but limited by the request rate of the account that owns the result (60 per minute with bursts of 10, shared by all links of that account; `429 rate_limited` with `Retry-After`) and by the shared job queue (`503 busy`). Formats that are already stored are not rate limited.
Preview results (`mode=preview`): the preview PNG (`format=png`) is free and stays a preview. Any vector format (`svg`, `pdf`, `eps`, `dxf`) - or `format=png&upgrade=true` for the full-size PNG - upgrades the result: it is built from the stored source image with the same options in `live` mode and charges 1 credit once (`X-Credits-Charged: 1`; 0 if the same image was already paid for within 30 days). If the credit cannot be charged, `402 no_credits` or `spend_limit`; if the build fails, the credit is returned and the result stays a preview. After the upgrade the result is a normal `live` result (`X-Mode: live`) and every format is free. Concurrent upgrade requests charge once. Served as an attachment `vector.`. An unknown id, a wrong token and an expired result are indistinguishable: `404 not_found`.'
security:
- resultToken: []
- resultTokenQuery: []
parameters:
- name: format
in: query
required: false
description: 'Format to download. Default: the first format of the original request, in the order you listed them in `format` (the preset''s format if `format` was omitted; `png` for a preview). For a preview result any vector format upgrades it (1 credit).'
schema:
$ref: '#/components/schemas/Format'
- name: upgrade
in: query
required: false
description: '`true` - upgrade a preview result to `live` (1 credit, once) even when the requested format is `png`, so you get the full-size PNG instead of the 1 MP preview. Has no effect on results that are not previews. Vector formats upgrade a preview without this flag.'
schema:
type: boolean
default: false
responses:
'200':
description: The file in the requested format.
headers:
X-Mode:
$ref: '#/components/headers/X-Mode'
X-Credits-Charged:
$ref: '#/components/headers/X-Credits-Charged'
X-Credits-Remaining:
$ref: '#/components/headers/X-Credits-Remaining'
X-Result-Expires:
$ref: '#/components/headers/X-Result-Expires'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
content:
image/svg+xml:
schema:
type: string
application/pdf:
schema:
type: string
contentMediaType: application/pdf
application/postscript:
schema:
type: string
contentMediaType: application/postscript
application/dxf:
schema:
type: string
contentMediaType: application/dxf
image/png:
schema:
type: string
contentMediaType: image/png
'400':
$ref: '#/components/responses/BadRequest'
'402':
$ref: '#/components/responses/PaymentRequired'
'404':
$ref: '#/components/responses/NotFound'
'405':
$ref: '#/components/responses/MethodNotAllowed'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/Internal'
'503':
$ref: '#/components/responses/Unavailable'
delete:
operationId: deleteResult
tags:
- Results
summary: Delete a stored result
description: Deletes the stored source image and every format right away, before the 24 hours run out. Same token rules as downloading.
security:
- resultToken: []
- resultTokenQuery: []
responses:
'204':
description: Deleted.
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
'404':
$ref: '#/components/responses/NotFound'
'405':
$ref: '#/components/responses/MethodNotAllowed'
components:
headers:
X-Request-Id:
description: Unique request ID; also returned in error bodies.
schema:
type: string
pattern: ^req_[a-f0-9]{20}$
X-Credits-Remaining:
description: Images that can still be processed right now.
schema:
type: integer
X-Mode:
description: '`live`, `test` or `preview` — the mode the result was made in.'
schema:
$ref: '#/components/schemas/Mode'
Retry-After:
description: 'Seconds to wait before retrying: a whole number (delta-seconds), never an HTTP date.'
schema:
type: integer
X-Result-Expires:
description: 'Present when the result was stored: when it is deleted (ISO 8601): 24 hours after the request, or `retention_days` days for a result stored with it (1 hour for test mode).'
schema:
type: string
format: date-time
X-Credits-Charged:
description: 'Credits charged by this request: `1`, or `0` for test mode, previews and free repeats. On `getResult`: `1` when the call upgraded a preview, otherwise `0`.'
schema:
type: integer
enum:
- 0
- 1
schemas:
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
- request_id
properties:
code:
type: string
description: Stable machine-readable error code.
enum:
- bad_request
- empty
- unauthorized
- no_credits
- spend_limit
- forbidden
- not_found
- method_not_allowed
- too_large
- unsupported_format
- invalid_image
- too_many_pixels
- rate_limited
- daily_limit
- test_limit
- preview_limit
- internal
- busy
- timeout
- storage_full
- url_invalid
- url_blocked
- url_unreachable
- url_timeout
- url_unavailable
message:
type: string
description: Human-readable description; may change or be localized.
request_id:
type: string
example:
error:
code: too_many_pixels
message: Human-readable description
request_id: req_4f1c2a9e0b7d4c3a8e21
Format:
type: string
enum:
- svg
- pdf
- eps
- dxf
- png
Mode:
type: string
enum:
- live
- test
- preview
default: live
responses:
BadRequest:
description: '`bad_request` (unknown parameter or value, conflicting options such as `palette` with `colors` or both `width` and `height`, a file together with `image_url`, `image_url` in test mode, malformed form), `url_invalid` (`image_url` is not an http(s) URL on port 80/443 without credentials, up to 2048 characters) or `empty` (no image).'
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
TooManyRequests:
description: '`rate_limited` (retry after `Retry-After` seconds; a rejected request does not use up a rate-limit token; also more than 2 `image_url` downloads of one account at a time), `daily_limit` (daily cap per key; resets at 00:00 UTC), `test_limit` (daily test-mode cap per key or account; resets at 00:00 UTC) or `preview_limit` (200 `mode=preview` calls per account per UTC day; resets at 00:00 UTC, `Retry-After` is the time until then).'
headers:
Retry-After:
$ref: '#/components/headers/Retry-After'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unavailable:
description: '`busy` (queue full; retry after `Retry-After` seconds), `timeout` (processing took longer than 60 s; not charged), `storage_full` (result storage is full; not charged; retry after `Retry-After` or request a single format) or `url_unavailable` (input by URL is off or temporarily down; upload the file instead).'
headers:
Retry-After:
$ref: '#/components/headers/Retry-After'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: '`not_found`: unknown path, or an unknown, expired or wrong-token upload/result link.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
MethodNotAllowed:
description: '`method_not_allowed`.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PaymentRequired:
description: '`no_credits` (no credits left) or `spend_limit` (your monthly spending limit is reached).'
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Internal:
description: '`internal`: unexpected error; not charged.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'API key from the account menu on shapesoda.com, e.g. `Authorization: Bearer ssk_…`.'
resultToken:
type: http
scheme: bearer
description: 'Result token (`result_token` or `X-Result-Token`), not the API key: `Authorization: Bearer <result_token>`.'
resultTokenQuery:
type: apiKey
in: query
name: token
description: 'Result token in the query string: `?token=<result_token>`. Prefer the Authorization header: a token in a URL can leak into access logs, browser history and analytics. Links returned by MCP already carry it.'
externalDocs:
description: Developer documentation
url: https://shapesoda.com/api