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

# SVG (paid plans)



## OpenAPI

````yaml /openapi.json get /diagrams/{id}/image.svg
openapi: 3.1.0
info:
  title: diagramkit API
  version: '1'
  description: >-
    Make, change, animate and download diagrams. Full reference: /docs/api.md on
    diagramkit’s site.
servers:
  - url: https://app.diagramkit.ai/api/v1
security:
  - bearer: []
paths:
  /diagrams/{id}/image.svg:
    get:
      summary: SVG (paid plans)
      operationId: downloadSvg
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: device
          in: query
          required: false
          schema:
            type: string
            enum:
              - desktop
              - phone
            default: desktop
          description: 'Which layout: 900 px or 390 px wide.'
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 1
          description: Which page of a multi-page diagram.
      responses:
        '200':
          description: The file.
          headers:
            X-Download-Url:
              description: >-
                A link to the same file that works without a key for 15 minutes,
                for a browser, build step or coding agent to GET. Only this file
                of this diagram, at this version.
              schema:
                type: string
                format: uri
            X-Download-Expires-At:
              description: When the link stops working.
              schema:
                type: string
                format: date-time
          content:
            image/svg+xml:
              schema:
                type: string
                format: binary
        '403':
          description: >-
            plan_required: the account's plan does not include this download
            (SVG and PDF are on paid plans). Do not retry; PNG and JPEG work on
            every plan.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: An error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            message:
              type: string
            issues:
              type: array
              items:
                type: string
          required:
            - type
            - message
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key (aid_…) from Settings › API.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.