> ## 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.

# Get a style



## OpenAPI

````yaml /openapi.json get /styles/{id}
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/{id}:
    get:
      tags:
        - Styles
      summary: Get a style
      operationId: getStyle
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/StyleDetail'
                required:
                  - data
              example:
                data:
                  id: 7c1a9e02-3d4b-4f8a-9b2c-1e0d5a6f3b8c
                  name: Acme Brand
                  url: https://acme.com
                  description: >-
                    A bold, modern consumer-tech brand with a high-contrast
                    geometric identity.
                  tagline: Build the future, boldly.
                  colours:
                    - type: solid
                      name: Primary
                      hex: '#FF0066'
                      role: primary
                  typography:
                    - fontFamily: Inter
                      weight: bold
                      textTransform: none
                      role: heading
                  tone:
                    - Bold
                    - Confident
                  aesthetic: Modern, high-contrast, geometric.
                  logoUrl: >-
                    https://cdn.example.com/styleguides/usr_8a2f3c/7c1a9e02/logo.png
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          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:
    StyleDetail:
      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
        description:
          nullable: true
          description: Free-text description of the brand, or null if none.
          type: string
        tagline:
          nullable: true
          description: Short brand tagline, or null if none.
          type: string
        colours:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - solid
                  name:
                    type: string
                    minLength: 1
                    maxLength: 50
                  hex:
                    type: string
                    pattern: ^#[0-9a-fA-F]{6}$
                  role:
                    default: ''
                    type: string
                    maxLength: 200
                required:
                  - type
                  - name
                  - hex
                  - role
                additionalProperties: false
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - gradient
                  name:
                    type: string
                    minLength: 1
                    maxLength: 50
                  gradientSubtype:
                    type: string
                    enum:
                      - linear
                      - radial
                  stops:
                    minItems: 2
                    maxItems: 6
                    type: array
                    items:
                      type: object
                      properties:
                        hex:
                          type: string
                          pattern: ^#[0-9a-fA-F]{6}$
                        positionPct:
                          nullable: true
                          type: number
                          minimum: 0
                          maximum: 100
                      required:
                        - hex
                      additionalProperties: false
                  angleDeg:
                    nullable: true
                    type: number
                  role:
                    default: ''
                    type: string
                    maxLength: 200
                required:
                  - type
                  - name
                  - gradientSubtype
                  - stops
                  - role
                additionalProperties: false
          description: >-
            The brand palette: solid colours and gradients, each tagged with a
            role.
        typography:
          type: array
          items:
            type: object
            properties:
              fontFamily:
                type: string
                minLength: 1
                maxLength: 100
              weight:
                nullable: true
                type: string
                enum:
                  - thin
                  - regular
                  - bold
              textTransform:
                nullable: true
                type: string
                enum:
                  - uppercase
                  - lowercase
                  - none
              role:
                type: string
                enum:
                  - heading
                  - body
            required:
              - fontFamily
              - role
            additionalProperties: false
          description: The brand fonts, each tagged with a heading or body role.
        tone:
          type: array
          items:
            type: string
          description: Brand tone-of-voice descriptors.
        aesthetic:
          type: string
          description: Free-text description of the brand's visual aesthetic.
        logoUrl:
          nullable: true
          description: URL of the extracted brand logo, or null if none.
          type: string
      required:
        - id
        - name
        - url
        - description
        - tagline
        - colours
        - typography
        - tone
        - aesthetic
        - logoUrl
      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

````