Krea API

One REST API and one API token to access 50+ image and video generation models from Black Forest Labs (Flux), Google (Imagen, Nano Banana, Veo), OpenAI (gpt-image), Runway, Kling, ByteDance (Seedream, Seedance, SeedEdit), MiniMax (Hailuo), Alibaba (Wan), Luma (Ray), xAI (Grok Imagine), Ideogram, Qwen, and Lightricks. Asynchronous job pattern with poll-or-webhook delivery, asset upload management, custom LoRA training, and node-app execution — all on https://api.krea.ai with Bearer-token authentication and a unified compute-unit billing model.

Krea API is one of 8 APIs that Krea publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include AI, Artificial Intelligence, Image Generation, Video Generation, and Generative AI. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, authentication docs, and rate-limit docs.

OpenAPI Specification

krea-api-openapi.json Raw ↑
{"openapi":"3.1.0","info":{"title":"Krea API","version":"v1"},"tags":[{"name":"General","description":"Core API operations including job management and billing information"},{"name":"Assets","description":"Asset management endpoints for uploading and managing images, videos, audio files, and 3D models"},{"name":"Styles","description":"Style (LoRA) generation and management endpoints"},{"name":"Node Apps","description":"Executing custom node apps built in our nodes tool"},{"name":"Image","description":"Image generation endpoints"},{"name":"Image Enhance","description":"Image enhance endpoints"},{"name":"Video","description":"Video generation endpoints"}],"servers":[{"url":"https://api.krea.ai","description":"Krea API"}],"security":[{"bearerAuth":[]}],"paths":{"/jobs":{"get":{"tags":["General"],"summary":"List jobs","description":"List jobs with pagination and filtering. Returns jobs belonging to the authenticated user.","parameters":[{"in":"query","name":"cursor","description":"ISO 8601 timestamp cursor for pagination (jobs created before this time)","schema":{"type":"string","format":"date-time","description":"ISO 8601 timestamp cursor for pagination (jobs created before this time)"}},{"in":"query","name":"limit","description":"Number of items to return (1-1000, default: 100)","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100,"description":"Number of items to return (1-1000, default: 100)"}},{"in":"query","name":"types","description":"Comma-separated list of job types to filter (e.g., \"flux,k1,externalImage\")","schema":{"type":"string","description":"Comma-separated list of job types to filter (e.g., \"flux,k1,externalImage\")"}},{"in":"query","name":"status","description":"Filter by job status","schema":{"type":"string","enum":["backlogged","queued","scheduled","processing","sampling","intermediate-complete","completed","failed","cancelled"],"description":"Filter by job status"}}],"responses":{"200":{"description":"List of jobs","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["backlogged","queued","scheduled","processing","sampling","intermediate-complete","completed","failed","cancelled"]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"result":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string","format":"uri"}},"style_id":{"type":"string"}}}},"required":["job_id","status","created_at"]}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/jobs/{id}":{"get":{"tags":["General"],"summary":"Get a job by ID","parameters":[{"in":"path","name":"id","description":"A unique identifier for a job","schema":{"type":"string","description":"A unique identifier for a job","example":"4d0e5f97-9721-4422-b88c-73a9032d7de1"},"required":true}],"responses":{"200":{"description":"The most up-to-date state of the job. You can check when the job is completed by checking the `status` field. For completed loraTraining jobs, the result will include a `style_id` field.","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["backlogged","queued","scheduled","processing","sampling","intermediate-complete","completed","failed","cancelled"]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"result":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string","format":"uri"}},"style_id":{"type":"string"}}}},"required":["job_id","status","created_at"]}}}},"404":{"description":"The job was not found or the client is not authorized to see it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"tags":["General"],"summary":"Delete a job by ID","parameters":[{"in":"path","name":"id","description":"A unique identifier for a job","schema":{"type":"string","description":"A unique identifier for a job","example":"4d0e5f97-9721-4422-b88c-73a9032d7de1"},"required":true}],"responses":{"200":{"description":"The job was deleted successfully"},"404":{"description":"The job was not found or the client is not authorized to delete it","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/assets":{"post":{"tags":["Assets"],"summary":"Upload an asset","description":"Upload a new asset (image, video, audio, or 3D model). Accepts multipart/form-data with a file and optional description. Maximum file size: 75MB.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"The file to upload (JPEG, PNG, WebP, HEIC, MP4, MOV, WebM, GLB, WAV, MP3). Maximum size: 75MB.","format":"binary"},"description":{"type":"string","description":"Optional description for the asset"}},"required":["file"]}}}},"responses":{"200":{"description":"Asset uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"image_url":{"type":"string","format":"uri"},"uploaded_at":{"type":"string","format":"date-time"},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"size_bytes":{"type":["number","null"]},"mime_type":{"type":["string","null"]},"description":{"type":"string"},"metadata":{}},"required":["id","image_url","uploaded_at","width","height","size_bytes","mime_type"]}}}},"400":{"description":"Invalid file type or size","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"get":{"tags":["Assets"],"summary":"List assets","description":"List assets with pagination.","parameters":[{"in":"query","name":"limit","description":"Number of items to return (1-1000, default: 100)","schema":{"type":"integer","minimum":1,"maximum":1000,"description":"Number of items to return (1-1000, default: 100)"}},{"in":"query","name":"cursor","description":"Cursor for pagination","schema":{"type":"string","format":"date-time","description":"Cursor for pagination"}}],"responses":{"200":{"description":"List of assets","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"image_url":{"type":"string","format":"uri"},"uploaded_at":{"type":"string","format":"date-time"},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"size_bytes":{"type":["number","null"]},"mime_type":{"type":["string","null"]},"description":{"type":"string"},"metadata":{}},"required":["id","image_url","uploaded_at","width","height","size_bytes","mime_type"]}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/assets/{id}":{"get":{"tags":["Assets"],"summary":"Get an asset","description":"Get a single asset by ID","parameters":[{"in":"path","name":"id","description":"Asset ID","schema":{"type":"string","format":"uuid","description":"Asset ID"},"required":true}],"responses":{"200":{"description":"Asset details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"image_url":{"type":"string","format":"uri"},"uploaded_at":{"type":"string","format":"date-time"},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"size_bytes":{"type":["number","null"]},"mime_type":{"type":["string","null"]},"description":{"type":"string"},"metadata":{}},"required":["id","image_url","uploaded_at","width","height","size_bytes","mime_type"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"delete":{"tags":["Assets"],"summary":"Delete an asset","description":"Delete an asset.","parameters":[{"in":"path","name":"id","description":"Asset ID","schema":{"type":"string","format":"uuid","description":"Asset ID"},"required":true}],"responses":{"200":{"description":"Asset deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/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).\n\n**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`.\n| Model | Compute Units/Step |\n|-------|-------------------|\n| **qwen** | ~8.3 |\n| **wan22** | ~5.3 |\n| **flux_schnell** | ~3.4 |\n| **wan** | ~3.4 |\n| **flux_dev** | ~3.0 |\n| **z-image** | ~2.4 |","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."}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"model":{"type":"string","enum":["flux_dev","flux_schnell","wan","wan22"],"default":"flux_dev"},"type":{"type":"string","enum":["Style","Object","Character","Default"],"default":"Default"},"name":{"type":"string"},"urls":{"type":"array","items":{"type":"string","format":"uri"}},"trigger_word":{"type":"string"},"learning_rate":{"type":"number"},"max_train_steps":{"type":"integer","minimum":1,"maximum":2000},"batch_size":{"type":"integer","minimum":1}},"required":["name","urls"]},{"type":"object","properties":{"model":{"type":"string","enum":["qwen","z-image"]},"type":{"type":"string","enum":["Style","Object","Character"],"default":"Style"},"name":{"type":"string"},"urls":{"type":"array","items":{"type":"string","format":"uri"}},"trigger_word":{"type":"string"},"max_train_steps":{"type":"integer","minimum":1,"maximum":2000}},"required":["model","name","urls"]}]}}}},"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"},"status":{"type":"string","enum":["backlogged","queued","scheduled","processing","sampling","intermediate-complete","completed","failed","cancelled"]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"null"},"result":{"type":"null"}},"required":["job_id","status","created_at","completed_at","result"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Maximum number of concurrent jobs reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/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":{"type":"boolean","default":false}},{"in":"query","name":"user","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}},{"in":"query","name":"filter","schema":{"type":"string","enum":["all","user","community","krea","shared","unapproved","editor","gallery","public"],"default":"all"}}],"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":{"type":["string","null"],"description":"Name of the style"},"urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Portrait-oriented preview URLs"},"public":{"type":"boolean","description":"Whether the style is publicly visible"},"cover_url":{"type":["string","null"],"format":"uri","description":"Cover image URL"},"prompt":{"type":"string","description":"Suggested prompt for using this style"},"models":{"type":"array","items":{"type":"string"},"description":"Compatible model names (e.g., flux_dev, wan)"},"owner":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"avatar_url":{"type":["string","null"],"format":"uri"}},"required":["id","name"],"description":"Style creator info (null for Krea-official styles)"},"like_count":{"type":"number","description":"Number of likes"},"created_at":{"type":"string","description":"Creation timestamp"}},"required":["id","title","urls","public","prompt","owner","like_count","created_at"],"description":"Style response schema"}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/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","description":"A unique identifier for a style","schema":{"type":"string","description":"A unique identifier for a style","example":"a816d79d-55c9-43ee-81c3-8330ffe79e6c"},"required":true}],"responses":{"200":{"description":"Style details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the style"},"title":{"type":["string","null"],"description":"Name of the style"},"urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Portrait-oriented preview URLs"},"public":{"type":"boolean","description":"Whether the style is publicly visible"},"cover_url":{"type":["string","null"],"format":"uri","description":"Cover image URL"},"prompt":{"type":"string","description":"Suggested prompt for using this style"},"models":{"type":"array","items":{"type":"string"},"description":"Compatible model names (e.g., flux_dev, wan)"},"owner":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"avatar_url":{"type":["string","null"],"format":"uri"}},"required":["id","name"],"description":"Style creator info (null for Krea-official styles)"},"like_count":{"type":"number","description":"Number of likes"},"created_at":{"type":"string","description":"Creation timestamp"}},"required":["id","title","urls","public","prompt","owner","like_count","created_at"],"description":"Style response schema"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Style not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"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","description":"A unique identifier for a style","schema":{"type":"string","description":"A unique identifier for a style","example":"a816d79d-55c9-43ee-81c3-8330ffe79e6c"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"public":{"type":["boolean","null"]},"urls":{"type":"array","items":{"type":"string","format":"uri"}},"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":{"type":["string","null"],"description":"Name of the style"},"urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Portrait-oriented preview URLs"},"public":{"type":"boolean","description":"Whether the style is publicly visible"},"cover_url":{"type":["string","null"],"format":"uri","description":"Cover image URL"},"prompt":{"type":"string","description":"Suggested prompt for using this style"},"models":{"type":"array","items":{"type":"string"},"description":"Compatible model names (e.g., flux_dev, wan)"},"owner":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"avatar_url":{"type":["string","null"],"format":"uri"}},"required":["id","name"],"description":"Style creator info (null for Krea-official styles)"},"like_count":{"type":"number","description":"Number of likes"},"created_at":{"type":"string","description":"Creation timestamp"}},"required":["id","title","urls","public","prompt","owner","like_count","created_at"],"description":"Style response schema"}}}},"400":{"description":"No valid fields to update","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Style not found or you are not the owner","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/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","description":"A unique identifier for a style","schema":{"type":"string","description":"A unique identifier for a style","example":"a816d79d-55c9-43ee-81c3-8330ffe79e6c"},"required":true}],"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"],"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"],"description":"Response containing a shareable link for a style"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Style not found or you are not the owner","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/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","description":"A unique identifier for a style","schema":{"type":"string","description":"A unique identifier for a style","example":"a816d79d-55c9-43ee-81c3-8330ffe79e6c"},"required":true}],"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":{"type":["string","null"],"description":"Workspace name"},"is_default":{"type":"boolean","description":"Whether this is the default workspace"}},"required":["id","name","is_default"],"description":"The workspace the style was shared with"}},"required":["success","style_id","workspace"],"description":"Response after sharing a style within a workspace"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"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"]}}}},"404":{"description":"Style not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}},"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","description":"A unique identifier for a style","schema":{"type":"string","description":"A unique identifier for a style","example":"a816d79d-55c9-43ee-81c3-8330ffe79e6c"},"required":true}],"responses":{"200":{"description":"Style removed from workspace successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"403":{"description":"You do not own this style","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Style not found or not shared with this workspace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/node-apps/{id}":{"get":{"tags":["Node Apps"],"summary":"Get a node app by version ID","description":"Get a single node app by version ID. Returns the node app details including input/output schemas.","parameters":[{"in":"path","name":"id","description":"Node app version ID","schema":{"type":"string","description":"Node app version ID"},"required":true}],"responses":{"200":{"description":"Node app details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the node app"},"author_id":{"type":"string","description":"ID of the node app author"},"workspace_id":{"type":"string","description":"ID of the workspace that owns the node app"},"name":{"type":"string","description":"Name of the node app"},"slug":{"type":"string","description":"URL-friendly identifier for the node app"},"description":{"type":"string","description":"Description of the node app"},"scope":{"type":"string","description":"Visibility scope: \"public\", \"user\", or \"workspace\""},"created_at":{"type":"string","description":"Creation timestamp"},"updated_at":{"type":"string","description":"Last update timestamp"},"last_version_id":{"type":"string","description":"ID of the latest version of the node app"},"version":{"type":"number","description":"Selected node app version number"},"version_created_at":{"type":["string","null"],"description":"Creation timestamp of the latest version"},"username":{"type":"string","description":"Username of the node app creator"},"example_outputs":{"type":["array","null"],"items":{"type":"string"},"description":"Example output URLs"},"input_openapi_schema":{"type":["object","null"],"properties":{"type":{"type":"string","const":"object"},"properties":{"type":"object","additionalProperties":{"type":"object","additionalProperties":true}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"description":"OpenAPI 3.1 JSON Schema for input parameters"},"output_openapi_schema":{"type":["object","null"],"properties":{"type":{"type":"string","const":"object"},"properties":{"type":"object","additionalProperties":{"type":"object","additionalProperties":true}},"required":{"type":"array","items":{"type":"string"}}},"required":["type","properties"],"description":"OpenAPI 3.1 JSON Schema for output values"},"input_key_mapping":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Maps OpenAPI input keys to internal keys for execution"},"output_key_mapping":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Maps internal output keys (nodeId-handleId) to API keys"}},"required":["id","author_id","workspace_id","name","slug","description","scope","created_at","updated_at","last_version_id","version","version_created_at","username","example_outputs","input_openapi_schema","output_openapi_schema","input_key_mapping","output_key_mapping"],"description":"Node app response schema"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Node app not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/node-apps/{id}/execute":{"post":{"tags":["Node Apps"],"summary":"Execute a node app","description":"Execute a node app by version ID. The request body should contain the input data as a JSON object matching the node app's input schema. Returns a job that can be tracked using /jobs/{id}.","parameters":[{"in":"path","name":"id","description":"Node app version ID","schema":{"type":"string","description":"Node app version ID"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{},"description":"Input data for the node app execution, matching the node app's input schema"}}}},"responses":{"200":{"description":"Execution job created successfully. The job will be in a processing state until completed. Use /jobs/{id} to check progress.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["backlogged","queued","scheduled","processing","sampling","intermediate-complete","completed","failed","cancelled"]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"result":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"string","format":"uri"}},"style_id":{"type":"string"}}}},"required":["job_id","status","created_at"]}}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"402":{"description":"You have run out of credits.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Node app version not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"You have reached the maximum number of concurrent jobs.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/generate/image/bfl/flux-1-dev":{"post":{"tags":["Image"],"description":"Fast model. Best for LoRAs.\n| Compute Units | Average Completion Time |\n|---------------|-------------------------|\n| ~3 | ~7 seconds |\n> **Deprecated request fields:**\n>\n> - `imageUrl` -> `image_url` until 2026-06-19\n> - `presetStyles` -> `styles` until 2026-06-19\n> - `styleImages` -> `style_images` until 2026-06-19\n> - `imageStyleRefs` -> `image_style_references` until 2026-06-19\n>\n> Deprecated fields are accepted for compatibility only and are not shown in the request schema.\n","summary":"Flux","x-krea-deprecated-field-aliases":[{"from":"imageUrl","to":"image_url","sunset_date":"2026-06-19","reason":"Public API request fields are moving to snake_case.","migration_url":"https://docs.krea.ai/developers/deprecations#public-api-snake-case-fields"},{"from":"presetStyles","to":"styles","sunset_date":"2026-06-19","reason":"Public API request fields are moving to snake_case.","migration_url":"https://docs.krea.ai/developers/deprecations#public-api-snake-case-fields"},{"from":"styleImages","to":"style_images","sunset_date":"2026-06-19","reason":"Public API request fields are moving to snake_case.","migration_url":"https://docs.krea.ai/developers/deprecations#public-api-snake-case-fields"},{"from":"imageStyleRefs","to":"image_style_references","sunset_date":"2026-06-19","reason":"Public API request fields are moving to snake_case.","migration_url":"https://docs.krea.ai/developers/deprecations#public-api-snake-case-fields"}],"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."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":1800},"strength":{"type":"number","default":1},"seed":{"type":"number","default":3317551338},"steps":{"type":"integer","minimum":1,"maximum":100,"default":25},"width":{"type":"number","minimum":512,"maximum":2368,"default":1024},"height":{"type":"number","minimum":512,"maximum":2368,"default":1024},"guidance_scale_flux":{"type":"number","minimum":0,"maximum":24,"default":3},"image_url":{"type":["string","null"],"format":"uri"},"styles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"strength":{"type":"number","minimum":-2,"maximum":2}},"required":["id","strength"]},"description":"Styles (typically LoRAs) to use for the generation"},"style_images":{"type":"array","items":{"type":"object","properties":{"strength":{"type":"number","minimum":-2,"maximum":2},"url":{"type":"string","format":"uri"}},"required":["strength"]},"description":"Image prompts to use for the generation"},"image_style_references":{"type":"array","items":{"type":"object","properties":{"strength":{"type":"number","minimum":-2,"maximum":2},"url":{"type":"string","format":"uri"}},"required":["strength"]},"descript

# --- truncated at 32 KB (242 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/krea-ai/refs/heads/main/openapi/krea-api-openapi.json