Krea Styles API

Style (LoRA) generation and management endpoints

GitHub OpenAPI
Business capability
Model Training & Data AE-110.70

Operations 7

POST /styles/train Train a custom style (LoRA) #
GET /styles Search styles #
GET /styles/{id} Get a single style by ID #
PATCH /styles/{id} Update a style #
POST /styles/{id}/share/workspace Share a style with your workspace #
DELETE /styles/{id}/share/workspace Remove a style from your workspace #

Documentation

Specifications

Code Examples

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/krea-ai:krea-ai-styles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

krea-ai-styles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Krea Styles API
  version: v1
  description: Style (LoRA) generation and management endpoints
servers:
- url: https://api.krea.ai
  description: Krea API
security:
- bearerAuth: []
tags:
- name: Styles
  description: Style (LoRA) generation and management endpoints
paths:
  /styles/train:
    post:
      tags:
      - Styles
      summary: Train a custom style (LoRA)
      description: Train a custom style (LoRA) with simplified parameters. Uses intelligent defaults based on the training type (Default/Style/Object/Character).
      x-mint:
        content: '<Note>

          Trained styles are private and only usable by the API user that created them. To allow other workspace members to use the style, share it with the workspace using `POST /styles/{id}/share/workspace`.

          </Note>'
      parameters:
      - name: X-Webhook-URL
        in: header
        required: false
        schema:
          type: string
          format: uri
        description: URL to receive a POST request when the job completes. The webhook will receive the job data including results. When signing is configured, deliveries are signed with ECDSA P-256 (ES256); verify them with the keys at https://api.krea.ai/.well-known/jwks.json (see X-Krea-Webhook-* headers). Treat requests without these headers as unauthenticated.
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
              - type: object
                properties:
                  model:
                    default: flux_dev
                    type: string
                    enum:
                    - flux_dev
                    - flux_schnell
                    - wan
                    - wan22
                  type:
                    default: Default
                    type: string
                    enum:
                    - Style
                    - Object
                    - Character
                    - Default
                  name:
                    type: string
                  urls:
                    type: array
                    items:
                      type: string
                      maxLength: 1024
                      format: uri
                      description: Can be an external URL, base64 data URI, or uploaded asset URL.
                  trigger_word:
                    type: string
                  learning_rate:
                    type: number
                  max_train_steps:
                    type: integer
                    minimum: 1
                    maximum: 2000
                  batch_size:
                    type: integer
                    minimum: 1
                    maximum: 9007199254740991
                required:
                - name
                - urls
              - type: object
                properties:
                  model:
                    type: string
                    enum:
                    - qwen
                    - z-image
                    - k2
                    - k2-large
                    description: LoRA base model to train. `k2` is Krea 2 Medium and `k2-large` is Krea 2 Large.
                  type:
                    default: Style
                    type: string
                    enum:
                    - Style
                    - Object
                    - Character
                  name:
                    type: string
                  urls:
                    type: array
                    items:
                      type: string
                      maxLength: 1024
                      format: uri
                      description: Can be an external URL, base64 data URI, or uploaded asset URL.
                  trigger_word:
                    type: string
                  max_train_steps:
                    type: integer
                    minimum: 1
                    maximum: 2000
                required:
                - model
                - name
                - urls
              type: object
      responses:
        '200':
          description: Training job created successfully. The job will be in a pending state until completed. Use /jobs/{id} to check progress.
          content:
            application/json:
              schema:
                type: object
                properties:
                  job_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)$
                  status:
                    type: string
                    enum:
                    - backlogged
                    - queued
                    - scheduled
                    - processing
                    - sampling
                    - intermediate-complete
                    - completed
                    - failed
                    - cancelled
                  created_at:
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  completed_at:
                    type: 'null'
                  result:
                    type: 'null'
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                    - code
                    additionalProperties: false
                  progress:
                    anyOf:
                    - type: number
                      minimum: 0
                      maximum: 1
                    - type: 'null'
                required:
                - job_id
                - status
                - created_at
                - completed_at
                - result
                additionalProperties: false
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '429':
          description: Maximum number of concurrent jobs reached
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
      operationId: postStylesTrain
      x-operation-id-source: derived
  /styles:
    get:
      tags:
      - Styles
      summary: Search styles
      description: List styles with pagination and filtering. Returns public styles, user-created styles, or shared styles based on the filter parameter.
      parameters:
      - in: query
        name: cursor
        schema:
          type: string
      - in: query
        name: limit
        schema:
          type: integer
          minimum: 1
          maximum: 1000
      - in: query
        name: ids
        schema:
          type: string
      - in: query
        name: liked
        schema:
          default: false
          type: boolean
      - in: query
        name: user
        schema:
          type: string
      - in: query
        name: model
        schema:
          type: string
      - in: query
        name: filter
        schema:
          default: all
          type: string
          enum:
          - all
          - user
          - community
          - krea
          - shared
          - unapproved
          - editor
          - gallery
          - public
      responses:
        '200':
          description: List of styles
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the style
                        title:
                          description: Name of the style
                          type:
                          - string
                          - 'null'
                        urls:
                          type: array
                          items:
                            type: string
                            maxLength: 1024
                            format: uri
                            description: Can be an external URL, base64 data URI, or uploaded asset URL.
                          description: Portrait-oriented preview URLs
                        public:
                          type: boolean
                          description: Whether the style is publicly visible
                        cover_url:
                          description: Cover image URL
                          anyOf:
                          - type: string
                            format: uri
                          - type: 'null'
                        prompt:
                          type: string
                          description: Suggested prompt for using this style
                        models:
                          description: Compatible model names (e.g., flux_dev, wan)
                          type: array
                          items:
                            type: string
                        owner:
                          anyOf:
                          - 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)$
                              name:
                                type: string
                              avatar_url:
                                anyOf:
                                - type: string
                                  format: uri
                                - type: 'null'
                            required:
                            - id
                            - name
                            additionalProperties: false
                          - type: 'null'
                          description: Style creator info (null for Krea-official styles)
                        like_count:
                          type: number
                          description: Number of likes
                        created_at:
                          description: Creation timestamp
                          type: string
                      required:
                      - id
                      - title
                      - urls
                      - public
                      - prompt
                      - owner
                      - like_count
                      - created_at
                      additionalProperties: false
                      description: Style response schema
                  next_cursor:
                    type:
                    - string
                    - 'null'
                required:
                - items
                - next_cursor
                additionalProperties: false
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
      operationId: getStyles
      x-operation-id-source: derived
  /styles/{id}:
    get:
      tags:
      - Styles
      summary: Get a single style by ID
      description: Get a single style by ID. Returns public styles or your own private styles.
      parameters:
      - in: path
        name: id
        schema:
          type: string
          description: A unique identifier for a style
          example: 42c63a2a-2dcb-4a60-9a2d-f35f2df40a6f
        required: true
        description: A unique identifier for a style
      responses:
        '200':
          description: Style details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the style
                  title:
                    description: Name of the style
                    type:
                    - string
                    - 'null'
                  urls:
                    type: array
                    items:
                      type: string
                      maxLength: 1024
                      format: uri
                      description: Can be an external URL, base64 data URI, or uploaded asset URL.
                    description: Portrait-oriented preview URLs
                  public:
                    type: boolean
                    description: Whether the style is publicly visible
                  cover_url:
                    description: Cover image URL
                    anyOf:
                    - type: string
                      format: uri
                    - type: 'null'
                  prompt:
                    type: string
                    description: Suggested prompt for using this style
                  models:
                    description: Compatible model names (e.g., flux_dev, wan)
                    type: array
                    items:
                      type: string
                  owner:
                    anyOf:
                    - 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)$
                        name:
                          type: string
                        avatar_url:
                          anyOf:
                          - type: string
                            format: uri
                          - type: 'null'
                      required:
                      - id
                      - name
                      additionalProperties: false
                    - type: 'null'
                    description: Style creator info (null for Krea-official styles)
                  like_count:
                    type: number
                    description: Number of likes
                  created_at:
                    description: Creation timestamp
                    type: string
                required:
                - id
                - title
                - urls
                - public
                - prompt
                - owner
                - like_count
                - created_at
                additionalProperties: false
                description: Style response schema
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '404':
          description: Style not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
      operationId: getStylesById
      x-operation-id-source: derived
    patch:
      tags:
      - Styles
      summary: Update a style
      description: Update style properties. Currently supports updating the public visibility of a style you own.
      parameters:
      - in: path
        name: id
        schema:
          type: string
          description: A unique identifier for a style
          example: 42c63a2a-2dcb-4a60-9a2d-f35f2df40a6f
        required: true
        description: A unique identifier for a style
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                public:
                  type: boolean
                urls:
                  type: array
                  items:
                    type: string
                    maxLength: 1024
                    format: uri
                    description: Can be an external URL, base64 data URI, or uploaded asset URL.
                title:
                  type: string
                cover_url:
                  type: string
      responses:
        '200':
          description: Style updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the style
                  title:
                    description: Name of the style
                    type:
                    - string
                    - 'null'
                  urls:
                    type: array
                    items:
                      type: string
                      maxLength: 1024
                      format: uri
                      description: Can be an external URL, base64 data URI, or uploaded asset URL.
                    description: Portrait-oriented preview URLs
                  public:
                    type: boolean
                    description: Whether the style is publicly visible
                  cover_url:
                    description: Cover image URL
                    anyOf:
                    - type: string
                      format: uri
                    - type: 'null'
                  prompt:
                    type: string
                    description: Suggested prompt for using this style
                  models:
                    description: Compatible model names (e.g., flux_dev, wan)
                    type: array
                    items:
                      type: string
                  owner:
                    anyOf:
                    - 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)$
                        name:
                          type: string
                        avatar_url:
                          anyOf:
                          - type: string
                            format: uri
                          - type: 'null'
                      required:
                      - id
                      - name
                      additionalProperties: false
                    - type: 'null'
                    description: Style creator info (null for Krea-official styles)
                  like_count:
                    type: number
                    description: Number of likes
                  created_at:
                    description: Creation timestamp
                    type: string
                required:
                - id
                - title
                - urls
                - public
                - prompt
                - owner
                - like_count
                - created_at
                additionalProperties: false
                description: Style response schema
        '400':
          description: No valid fields to update
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '404':
          description: Style not found or you are not the owner
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
      operationId: patchStylesById
      x-operation-id-source: derived
  /styles/{id}/share/link:
    get:
      tags:
      - Styles
      summary: Get a shareable link for a style
      description: Generate or retrieve a shareable link for a style you own. The link allows others to access the style.
      parameters:
      - in: path
        name: id
        schema:
          type: string
          description: A unique identifier for a style
          example: 42c63a2a-2dcb-4a60-9a2d-f35f2df40a6f
        required: true
        description: A unique identifier for a style
      responses:
        '200':
          description: Shareable link retrieved (existing link)
          content:
            application/json:
              schema:
                type: object
                properties:
                  share_link:
                    type: string
                    format: uri
                    description: Shareable URL for the style
                  is_new:
                    type: boolean
                    description: Whether the share link is new
                required:
                - share_link
                - is_new
                additionalProperties: false
                description: Response containing a shareable link for a style
        '201':
          description: Shareable link created (new link)
          content:
            application/json:
              schema:
                type: object
                properties:
                  share_link:
                    type: string
                    format: uri
                    description: Shareable URL for the style
                  is_new:
                    type: boolean
                    description: Whether the share link is new
                required:
                - share_link
                - is_new
                additionalProperties: false
                description: Response containing a shareable link for a style
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '404':
          description: Style not found or you are not the owner
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
      operationId: getStylesByIdShareLink
      x-operation-id-source: derived
  /styles/{id}/share/workspace:
    post:
      tags:
      - Styles
      summary: Share a style with your workspace
      description: Share a style you own with your API workspace. All members of the workspace will be able to use the style.
      parameters:
      - in: path
        name: id
        schema:
          type: string
          description: A unique identifier for a style
          example: 42c63a2a-2dcb-4a60-9a2d-f35f2df40a6f
        required: true
        description: A unique identifier for a style
      responses:
        '200':
          description: Style shared with workspace successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the operation succeeded
                  style_id:
                    type: string
                    description: The ID of the shared style
                  workspace:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Workspace ID
                      name:
                        description: Workspace name
                        type:
                        - string
                        - 'null'
                    required:
                    - id
                    - name
                    additionalProperties: false
                    description: The workspace the style was shared with
                required:
                - success
                - style_id
                - workspace
                additionalProperties: false
                description: Response after sharing a style within a workspace
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '403':
          description: You do not own this style or are not a member of the workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '404':
          description: Style not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
      operationId: postStylesByIdShareWorkspace
      x-operation-id-source: derived
    delete:
      tags:
      - Styles
      summary: Remove a style from your workspace
      description: Remove a style you own from your API workspace. Workspace members will no longer have access to the style.
      parameters:
      - in: path
        name: id
        schema:
          type: string
          description: A unique identifier for a style
          example: 42c63a2a-2dcb-4a60-9a2d-f35f2df40a6f
        required: true
        description: A unique identifier for a style
      responses:
        '200':
          description: Style removed from workspace successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                - success
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '403':
          description: You do not own this style
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
        '404':
          description: Style not found or not shared with this workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
                additionalProperties: false
      operationId: deleteStylesByIdShareWorkspace
      x-operation-id-source: derived
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      bearerFormat: Bearer
      type: http
x-provenance:
  method: harvested
  publisher: Krea
  source: https://api.krea.ai/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)