SVG AI Vectorization API

Trace an existing raster image's shapes and colors into paths.

GitHub OpenAPI

Operations 1

POST /api/v1/vectorize Trace an existing raster image into SVG #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/svgai-org:svgai-org-vectorization-api"
All apis
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.

Get an API 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 Specification

svgai-org-vectorization-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SVG AI REST Vectorization API
  version: 1.0.0
  description: Generate new SVG designs from text or image references, or vectorize existing raster artwork. API keys are created in the signed-in API & MCP console. Generation and vectorization require paid account access and sufficient credits; website starter credits alone do not unlock API use. GET /api/v1/credits reports current access, balance and operation costs. Examples use sample identifiers, balances and SVG artwork. Creation requests are not idempotent; poll an accepted generation before retrying.
  contact:
    url: https://www.svgai.org/contact
servers:
- url: https://www.svgai.org
  description: Production API; authenticated operations use the account's real credits.
security:
- BearerApiKey: []
- HeaderApiKey: []
tags:
- name: Vectorization
  description: Trace an existing raster image's shapes and colors into paths.
paths:
  /api/v1/vectorize:
    post:
      operationId: vectorizeSvg
      tags:
      - Vectorization
      summary: Trace an existing raster image into SVG
      description: Requires paid access and available credits. Use for preserving the source artwork rather than redesigning it. Backgrounds are traced unless remove_background=true. If removal fails, the original image is traced and background_removed is false. Requests are not idempotent.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VectorizeRequest'
      responses:
        '200':
          description: Completed vectorization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VectorizationResponse'
          headers:
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            RateLimit:
              $ref: '#/components/headers/RateLimit'
        '400':
          description: Invalid input. Read error.message for the rejected field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            RateLimit:
              $ref: '#/components/headers/RateLimit'
        '401':
          description: Missing, invalid, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  type: authentication_error
                  message: 'Missing API key. Pass it as "Authorization: Bearer sk_svgai_..." (create keys at https://svgai.org/dashboard/api).'
        '402':
          description: Paid access or sufficient credits are required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            RateLimit:
              $ref: '#/components/headers/RateLimit'
        '429':
          description: Account rate limit exceeded. error.retry_after_seconds indicates the retry delay when available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            Retry-After:
              description: Seconds to wait before retrying, matching error.retry_after_seconds from the existing account limiter.
              schema:
                type: integer
                minimum: 1
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            RateLimit:
              $ref: '#/components/headers/RateLimit'
        '500':
          description: Unexpected server failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            RateLimit:
              $ref: '#/components/headers/RateLimit'
        '502':
          description: Image processing or vectorization failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimitPolicy'
            RateLimit:
              $ref: '#/components/headers/RateLimit'
components:
  schemas:
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
    VectorizeRequest:
      type: object
      properties:
        image:
          type: string
          minLength: 100
          description: Raw base64 or an image data URL. PNG, JPEG, or WebP; up to 8 MB decoded. Do not send together with image_url.
        image_url:
          type: string
          format: uri
          pattern: ^https?://
          description: Publicly reachable HTTP(S) image URL. Private/reserved hosts are rejected; up to 8 MB downloaded. Do not send together with image.
        remove_background:
          type: boolean
          default: false
          description: Attempt to remove the subject's background before tracing. Check background_removed for the actual result.
      oneOf:
      - required:
        - image
      - required:
        - image_url
    ApiError:
      type: object
      required:
      - type
      - message
      properties:
        type:
          type: string
          enum:
          - invalid_request
          - authentication_error
          - permission_error
          - insufficient_credits
          - payment_required
          - rate_limit_exceeded
          - not_found
          - generation_error
          - server_error
        message:
          type: string
          description: Human-readable explanation.
        retry_after_seconds:
          type: number
          description: Optional retry delay for rate_limit_exceeded.
        credits_remaining:
          type: number
          description: Optional available balance for insufficient_credits.
        credits_required:
          type: number
          description: Optional required credits for insufficient_credits.
        upgrade_url:
          type: string
          format: uri
          description: Optional upgrade URL for payment_required.
    VectorizationResponse:
      type: object
      required:
      - object
      - status
      - svg
      - background_removed
      - credits_used
      - credits_remaining
      properties:
        object:
          type: string
          const: svg.vectorization
        status:
          type: string
          const: completed
        svg:
          type: string
          description: Complete vectorized SVG markup.
        background_removed:
          type: boolean
          description: Whether optional background removal succeeded.
        credits_used:
          type: number
          description: Credits used by this request.
        credits_remaining:
          type: number
          description: Remaining account balance.
  headers:
    RateLimit:
      description: Optional observed remaining request quota (r) and effective-window hint in seconds (t), calculated when responding. Concurrent requests can change available quota; this is not an acceptance, retry or full-reset guarantee. Omitted when authentication has not reached the limiter, the limiter is unavailable, or the observation is expired or invalid.
      schema:
        type: string
      example: '"generate";r=19;t=60'
    RateLimitPolicy:
      description: Optional observed per-user request-rate policy, shared across the account's API keys. q counts requests, not credits; w is the policy window in seconds. Omitted without a valid unexpired limiter observation. Uses the IETF HTTPAPI RateLimit draft syntax.
      schema:
        type: string
      example: '"generate";q=20;w=60'
  securitySchemes:
    BearerApiKey:
      type: http
      scheme: bearer
      bearerFormat: SVG AI API key
      description: 'Create a key at https://www.svgai.org/dashboard/api. Send Authorization: Bearer YOUR_API_KEY. REST uses API keys; OAuth is available for the separately documented MCP endpoint. Never send credentials in URLs.'
    HeaderApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Alternative API-key header. Use one authentication scheme.
externalDocs:
  description: API and MCP setup, task selection, authentication and errors
  url: https://www.svgai.org/docs