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

# Create image (sync)

> Generate an image synchronously. Waits for render to complete and returns the image URL. Use ?strict=true to fail on invalid modifications.



## OpenAPI

````yaml /openapi.yaml post /api/v1/images/sync
openapi: 3.0.0
info:
  title: Kynva Public API
  description: >

    # Kynva Public API v4.0


    The stateless contract API: everything flows through

    `POST /api/v1/facade/generate` with a `RenderForgeRequestV1` body.


    ## Entry Points


    ### Sync preview

    ```

    POST /generate { operation: "preview" } → 200 with rendered outputs

    ```


    ### Async render

    ```

    POST /generate { operation: "render" } → 202 + job → poll GET
    /render-jobs/{id} or subscribe to webhooks

    ```


    ### Signed image URLs (the OG-image primitive)

    ```

    POST /api/v1/generate/sign → signed GET URLs → 302 to immutable rendered
    PNGs

    ```


    ## Core Principle

    Deterministic by construction: the same request, engine version, and seed

    produce byte-identical output.


    ## API Versioning

    Include `X-API-Version: 2026-01-01` in all requests.


    ## Authentication

    Include `Authorization: Bearer <token>` in all requests (signed image

    GET URLs authenticate by signature instead).


    ## Idempotency

    Include `Idempotency-Key: <uuid>` for all POST/PATCH mutations.


    ## Rate Limiting

    Tiered limits per endpoint category (see documentation).
  version: 4.0.0
  contact:
    name: Kynva Support
    url: https://github.com/fredadun/renderforge
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.kynva.ai
    description: Production
  - url: https://renderforge-production-838f.up.railway.app
    description: Production (direct, until api.kynva.ai DNS lands)
  - url: http://localhost:3000
    description: Development
security:
  - bearerAuth: []
tags:
  - name: Brands
    description: Brand management
  - name: BrandKits
    description: Brand kit version management
  - name: Assets
    description: Asset upload and management
  - name: Drafts
    description: Draft creation and workflow
  - name: Decisions
    description: Decision records and explainability
  - name: Render Jobs
    description: Async render job management
  - name: Webhooks
    description: Webhook configuration and DLQ
  - name: Render Now
    description: Single-call convenience endpoint
  - name: Templates (Advanced)
    description: Template selection and listing
  - name: Validation (Advanced)
    description: Stateless validation
  - name: Compile (Advanced)
    description: Stateless compilation
  - name: Licenses (Advanced)
    description: License checking
  - name: Spec Render (Advanced)
    description: Direct spec preview/render
  - name: Reference
    description: Reference data (export profiles, API versions)
  - name: System
    description: Health checks and system info
  - name: Images
    description: Generate images from templates
  - name: Templates
    description: Manage reusable templates
  - name: Health
    description: Service health and status
paths:
  /api/v1/images/sync:
    post:
      tags:
        - Images
      summary: Create image (sync)
      description: >-
        Generate an image synchronously. Waits for render to complete and
        returns the image URL. Use ?strict=true to fail on invalid
        modifications.
      parameters:
        - schema:
            type: boolean
            default: false
          in: query
          name: strict
          required: false
          description: Fail on invalid modification properties instead of using fallbacks
        - schema:
            type: boolean
            default: true
          in: query
          name: cache
          required: false
          description: Use render cache (set to false to force re-render)
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - templateId
              properties:
                templateId:
                  type: string
                  description: ID of the template to render
                modifications:
                  type: array
                  description: >-
                    Array of layer modifications (see docs/MODIFICATIONS.md for
                    full list)
                  items:
                    type: object
                    additionalProperties: true
                    properties:
                      name:
                        type: string
                        description: Layer name to modify
                      text:
                        type: string
                        description: New text content
                      src:
                        type: string
                        description: New image URL
                      color:
                        type: string
                        description: New color (hex)
                      hide:
                        type: boolean
                        description: Hide the layer
                      textEffect:
                        type: string
                        description: >-
                          Text effect: clean, shadowed, shadow-soft,
                          shadow-hard, glow, glow-strong, outline,
                          outline-thick, neon, emboss
                      gradientFill:
                        type: object
                        description: >-
                          Gradient text fill: { colors: [...], direction:
                          horizontal|vertical|diagonal }
                      gradient:
                        type: object
                        description: >-
                          Background gradient: { colors: [...], direction:
                          top-bottom|diagonal|radial|... }
                      texture:
                        type: string
                        description: 'Texture overlay: grain, paper, noise, canvas, film'
                format:
                  type: string
                  enum:
                    - png
                    - jpg
                    - webp
                  default: webp
                  description: Output format
                scale:
                  type: number
                  minimum: 1
                  maximum: 3
                  default: 2
                  description: Resolution multiplier
                metadata:
                  type: object
                  description: Custom metadata
                brandId:
                  type: string
                  description: Brand ID for consistency validation (optional)
                stylePreset:
                  type: string
                  description: >-
                    Style preset ID to apply (e.g., "retro-80s",
                    "cinematic-teal-orange")
                variables:
                  type: object
                  description: >-
                    Variables for conditional logic and text interpolation
                    (e.g., { "price": 150, "status": "active" })
                  additionalProperties: true
        required: true
      responses:
        '200':
          description: Image generated successfully
          content:
            application/json:
              schema:
                description: Image generated successfully
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      status:
                        type: string
                        enum:
                          - completed
                      imageUrl:
                        type: string
                        description: Public URL of the rendered image
                      width:
                        type: number
                      height:
                        type: number
                      format:
                        type: string
                      renderTime:
                        type: number
                        description: Render time in milliseconds
                      cached:
                        type: boolean
                        description: Whether the result was served from cache
                      stylePreset:
                        type: string
                        description: Style preset that was applied (if any)
                      warnings:
                        type: array
                        description: >-
                          Warnings about unsupported or invalid modification
                          properties
                        items:
                          type: object
                          properties:
                            property:
                              type: string
                            value: {}
                            message:
                              type: string
                            fallback: {}
                      brandValidation:
                        type: object
                        description: Brand validation result (if brandId was provided)
                        properties:
                          valid:
                            type: boolean
                          brandName:
                            type: string
                          violations:
                            type: array
                          summary:
                            type: object
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Your Kynva API key (kyn_live_xxx or kyn_test_xxx; legacy rf_ keys remain
        valid)

````