Adobe Illustrator Documents API

Manage Illustrator documents, including opening, creating, saving, closing, and exporting documents in various formats.

OpenAPI Specification

adobe-illustrator-documents-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Adobe Illustrator Scripting Application Documents API
  description: The Adobe Illustrator Scripting API provides programmatic access to Illustrator's functionality through JavaScript, AppleScript, and VBScript. It allows developers to automate repetitive tasks, manipulate documents, select and edit text, generate art from data, and batch process files. Scripts can control nearly every aspect of Illustrator, from creating and modifying paths and shapes to managing layers, colors, and typography.
  version: 29.0.0
  contact:
    name: Adobe Developer Support
    url: https://developer.adobe.com/illustrator/
  license:
    name: Proprietary
    url: https://www.adobe.com/legal/terms.html
  x-logo:
    url: https://www.adobe.com/favicon.ico
servers:
- url: https://localhost
  description: Local Illustrator Application
tags:
- name: Documents
  description: Manage Illustrator documents, including opening, creating, saving, closing, and exporting documents in various formats.
paths:
  /documents:
    get:
      operationId: listDocuments
      summary: Adobe Illustrator List Open Documents
      description: Returns a list of all currently open Illustrator documents.
      tags:
      - Documents
      responses:
        '200':
          description: List of open documents retrieved successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Document'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createDocument
      summary: Adobe Illustrator Create a New Document
      description: Creates a new Illustrator document with the specified settings, including document color mode, dimensions, and artboard configuration.
      tags:
      - Documents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentCreate'
      responses:
        '201':
          description: Document created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /documents/{documentId}:
    get:
      operationId: getDocument
      summary: Adobe Illustrator Get a Document
      description: Returns detailed information about a specific open document, including its layers, artboards, and document properties.
      tags:
      - Documents
      parameters:
      - $ref: '#/components/parameters/documentId'
      responses:
        '200':
          description: Document retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '404':
          description: Document not found.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: closeDocument
      summary: Adobe Illustrator Close a Document
      description: Closes the specified document. Optionally saves changes before closing.
      tags:
      - Documents
      parameters:
      - $ref: '#/components/parameters/documentId'
      - name: saveChanges
        in: query
        description: Whether to save changes before closing.
        schema:
          type: string
          enum:
          - save
          - discard
          - prompt
          default: prompt
        example: save
      responses:
        '204':
          description: Document closed successfully.
        '404':
          description: Document not found.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /documents/{documentId}/save:
    post:
      operationId: saveDocument
      summary: Adobe Illustrator Save a Document
      description: Saves the specified document. If the document has not been saved before, a file path must be provided.
      tags:
      - Documents
      parameters:
      - $ref: '#/components/parameters/documentId'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filePath:
                  type: string
                  description: File path to save to.
                format:
                  type: string
                  description: File format for saving.
                  enum:
                  - ai
                  - eps
                  - pdf
                  - svg
      responses:
        '200':
          description: Document saved successfully.
        '404':
          description: Document not found.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /documents/{documentId}/export:
    post:
      operationId: exportDocument
      summary: Adobe Illustrator Export a Document
      description: Exports the document to a specified format, including PNG, JPEG, SVG, PDF, TIFF, and other supported formats.
      tags:
      - Documents
      parameters:
      - $ref: '#/components/parameters/documentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportOptions'
      responses:
        '200':
          description: Document exported successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  filePath:
                    type: string
                    description: Path to the exported file.
                  format:
                    type: string
                    description: Format of the exported file.
        '404':
          description: Document not found.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Document:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the document.
          example: example_value
        name:
          type: string
          description: Name of the document.
          examples:
          - Untitled-1
          example: Example Artboard
        fullName:
          type: string
          description: Full file path of the document.
          example: Example Artboard
        saved:
          type: boolean
          description: Whether the document has been saved.
          example: true
        documentColorSpace:
          type: string
          description: The document color mode.
          enum:
          - CMYK
          - RGB
          example: CMYK
        width:
          type: number
          description: Document width in points.
          example: 72.0
        height:
          type: number
          description: Document height in points.
          example: 72.0
        rulerUnits:
          type: string
          description: Ruler units used in the document.
          enum:
          - Points
          - Picas
          - Inches
          - Millimeters
          - Centimeters
          - Pixels
          example: Points
        rulerOrigin:
          type: array
          description: The ruler origin point [x, y].
          items:
            type: number
          minItems: 2
          maxItems: 2
        layerCount:
          type: integer
          description: Number of layers in the document.
          example: 1024
        artboardCount:
          type: integer
          description: Number of artboards in the document.
          example: 1024
        activeLayer:
          type: string
          description: Name of the currently active layer.
          example: example_value
    DocumentCreate:
      type: object
      properties:
        name:
          type: string
          description: Name of the new document.
          example: Example Artboard
        documentColorSpace:
          type: string
          description: Color mode of the document.
          enum:
          - CMYK
          - RGB
          default: RGB
          example: CMYK
        width:
          type: number
          description: Document width in points.
          default: 612
          example: 72.0
        height:
          type: number
          description: Document height in points.
          default: 792
          example: 72.0
        numArtboards:
          type: integer
          description: Number of artboards to create.
          default: 1
          example: 1024
        artboardLayout:
          type: string
          description: Layout for multiple artboards.
          enum:
          - GridByRow
          - GridByCol
          - Row
          - Column
          - RLGridByRow
          - RLGridByCol
          - RLRow
          example: GridByRow
        rasterResolution:
          type: string
          description: Raster effects resolution.
          enum:
          - ScreenResolution
          - MediumResolution
          - HighResolution
          default: HighResolution
          example: ScreenResolution
    ExportOptions:
      type: object
      required:
      - filePath
      - format
      properties:
        filePath:
          type: string
          description: File path for the exported file.
          example: /path/to/file.ai
        format:
          type: string
          description: Export format.
          enum:
          - PNG8
          - PNG24
          - JPEG
          - SVG
          - PDF
          - TIFF
          - GIF
          - AutoCAD
          - Flash
          - Photoshop
          example: PNG8
        artboardRange:
          type: string
          description: Range of artboards to export (e.g., "1-3" or "1,3,5"). Empty string exports all artboards.
          default: ''
          example: example_value
        horizontalScale:
          type: number
          description: Horizontal scaling factor as a percentage.
          default: 100
          example: 72.0
        verticalScale:
          type: number
          description: Vertical scaling factor as a percentage.
          default: 100
          example: 72.0
        resolution:
          type: number
          description: Export resolution in PPI.
          default: 72
          example: 72.0
        antiAliasing:
          type: boolean
          description: Whether to use anti-aliasing.
          default: true
          example: true
        transparency:
          type: boolean
          description: Whether to preserve transparency.
          default: true
          example: true
  parameters:
    documentId:
      name: documentId
      in: path
      required: true
      description: Unique identifier of the document.
      schema:
        type: string
externalDocs:
  description: Adobe Illustrator Scripting Guide
  url: https://ai-scripting.docsforadobe.dev/