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

# List styles

> Cursor-paginated.



## OpenAPI

````yaml /openapi.json get /styles
openapi: 3.0.3
info:
  title: Dafty API
  version: v1
  description: >-
    Generate on-brand graphics from a simple, opinionated API. Authenticate with
    an API key via the `x-api-key` header (or `Authorization: Bearer`).
    Generation endpoints return `202` with a job; poll `GET /jobs/{id}`
    (optionally `?wait=true`) for the result.
servers:
  - url: https://app.dafty.ai/api/v1
    description: Base URL for all v1 endpoints.
security:
  - apiKey: []
  - bearerAuth: []
tags:
  - name: Account
    description: Who an API key belongs to.
  - name: Images
    description: Generate, edit, resize, and upscale images.
  - name: Videos
    description: >-
      Generate video: animate a single image, or transition between a start and
      end frame. One clip per request.
  - name: Jobs
    description: Poll, list, and cancel asynchronous jobs.
  - name: Styles
    description: Extract brand styles and search their assets.
  - name: Uploads
    description: Bring your own reference images via direct-to-storage upload.
paths:
  /styles:
    get:
      tags:
        - Styles
      summary: List styles
      description: Cursor-paginated.
      operationId: listStyles
      parameters:
        - name: cursor
          in: query
          required: false
          description: Opaque pagination cursor returned as `nextCursor` by a prior call.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Max items per page.
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/StyleListItem'
                  nextCursor:
                    type: string
                    nullable: true
                required:
                  - data
              example:
                data:
                  - id: 7c1a9e02-3d4b-4f8a-9b2c-1e0d5a6f3b8c
                    name: Acme Brand
                    url: https://acme.com
                    logoUrl: >-
                      https://cdn.example.com/styleguides/usr_8a2f3c/7c1a9e02/logo.png
                    palette:
                      - '#FF0066'
                      - '#1A1A2E'
                      - '#FFFFFF'
                nextCursor: null
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many requests. A per-key rate limit was hit; back off and retry.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
            X-RateLimit-Limit:
              description: Requests allowed in the current window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Seconds until the current window resets.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    StyleListItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: Unique id of the style.
        name:
          type: string
          description: Display name of the style.
        url:
          nullable: true
          description: >-
            The website the style was extracted from, or null if it was created
            manually.
          type: string
        logoUrl:
          nullable: true
          description: URL of the extracted brand logo, or null if none.
          type: string
        palette:
          type: array
          items:
            type: string
          description: >-
            The brand colours as hex strings. The first entry is the dominant
            colour.
      required:
        - id
        - name
        - url
        - logoUrl
        - palette
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                Stable, machine-readable error code. Common values:
                `VALIDATION_ERROR` (400), `NOT_FOUND` (404),
                `INSUFFICIENT_CREDITS` / `SUBSCRIPTION_REQUIRED` (402),
                `RATE_LIMIT_ERROR` / `USAGE_LIMIT_EXCEEDED` /
                `CONCURRENT_LIMIT_REACHED` (429), `INTERNAL_ERROR` (500).
            message:
              type: string
            details:
              type: object
              additionalProperties: true
              nullable: true
              description: >-
                Present on validation errors: the offending fields and why they
                failed.
          required:
            - message
      required:
        - error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
    bearerAuth:
      type: http
      scheme: bearer

````