> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trybloom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Vectorize an image to SVG

> Vectorize a raster image to SVG. This works with completed generated images and with uploaded or scraped images. It works best for logos, icons, and flat artwork; photos give poor results. The endpoint returns a new image ID immediately; poll `GET /images/{id}` to check the status and retrieve the result.



## OpenAPI

````yaml https://www.trybloom.ai/api/v1/spec.json post /images/{id}/vectorize
openapi: 3.1.1
info:
  title: Bloom API
  version: 1.0.0
servers:
  - url: https://www.trybloom.ai/api/v1
security:
  - apiKey: []
  - bearer: []
tags:
  - name: Account
    description: >-
      Inspect the authenticated account — profile, credit balance, and
      accessible workspaces.
  - name: Brands
    description: Manage brands and brand identity.
  - name: Images
    description: Generate, edit, and retrieve images.
paths:
  /images/{id}/vectorize:
    post:
      tags:
        - Images
      summary: Vectorize an image to SVG
      description: >-
        Vectorize a raster image to SVG. This works with completed generated
        images and with uploaded or scraped images. It works best for logos,
        icons, and flat artwork; photos give poor results. The endpoint returns
        a new image ID immediately; poll `GET /images/{id}` to check the status
        and retrieve the result.
      operationId: images.vectorize
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              ID of a completed generated image, or an uploaded/scraped image,
              to vectorize
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                brandSessionId:
                  type: string
                  format: uuid
                  description: Brand ID (from GET /brands)
              required:
                - brandSessionId
      responses:
        '202':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        const: pending
                    required:
                      - id
                      - status
                required:
                  - data
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesVectorize400ErrorResponse'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesVectorize401ErrorResponse'
        '402':
          description: '402'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesVectorize402ErrorResponse'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesVectorize403ErrorResponse'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesVectorize404ErrorResponse'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesVectorize429ErrorResponse'
          headers:
            Retry-After:
              description: >-
                Seconds until the API-key request limit resets. Present only
                when the request-rate limiter can calculate the delay.
              schema:
                type: integer
                minimum: 0
components:
  schemas:
    ImagesVectorize400ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: IMAGE_NOT_COMPLETED
                    status:
                      const: 400
                    message:
                      type: string
                      default: Source image must be completed before vectorizing
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: IMAGE_NOT_VECTORIZABLE
                    status:
                      const: 400
                    message:
                      type: string
                      default: Source image is already a vector (SVG)
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: IMAGE_TOO_SMALL
                    status:
                      const: 400
                    message:
                      type: string
                      default: >-
                        Source image is below the vectorizer's minimum
                        dimensions
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    ImagesVectorize401ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: UNAUTHORIZED
                    status:
                      const: 401
                    message:
                      type: string
                      default: Invalid or missing API credentials
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    ImagesVectorize402ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: INSUFFICIENT_CREDITS
                    status:
                      const: 402
                    message:
                      type: string
                      default: Not enough credits to vectorize
                    data:
                      type: object
                      properties:
                        action_url:
                          type: string
                          format: uri
                          description: >-
                            Deep link to /pricing for the caller to top up
                            credits
                      required:
                        - action_url
                  required:
                    - code
                    - status
                    - message
                    - data
                - type: object
                  properties:
                    code:
                      const: PAYMENT_REQUIRED
                    status:
                      const: 402
                    message:
                      type: string
                      default: Subscription paused — complete payment to resume
                    data:
                      type: object
                      properties:
                        action_url:
                          type: string
                          format: uri
                          description: >-
                            Deep link to /pricing to complete the pending
                            payment
                      required:
                        - action_url
                  required:
                    - code
                    - status
                    - message
                    - data
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    ImagesVectorize403ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: ACCOUNT_BANNED
                    status:
                      const: 403
                    message:
                      type: string
                      default: This account has been suspended.
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: FORBIDDEN
                    status:
                      const: 403
                    message:
                      type: string
                      default: Plan upgrade required
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    ImagesVectorize404ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: IMAGE_NOT_FOUND
                    status:
                      const: 404
                    message:
                      type: string
                      default: Source image not found
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: SESSION_NOT_FOUND
                    status:
                      const: 404
                    message:
                      type: string
                      default: Brand session not found
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    ImagesVectorize429ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: TOO_MANY_REQUESTS
                    status:
                      const: 429
                    message:
                      type: string
                      default: Rate limit exceeded
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    ApiError:
      type: object
      properties:
        code:
          type: string
        status:
          type: integer
        message:
          type: string
        data: {}
      required:
        - code
        - status
        - message
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Bloom API key, for example `x-api-key: bloom_sk_...`.'
    bearer:
      type: http
      scheme: bearer
      description: Bloom API key (`Bearer bloom_sk_...`) or Bloom OAuth access token.

````