Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Entity Usage 5.0.0 Major update available for module entity_usage (5.0.0). Release: Entity Usage 8.x-2.3 Minor update available for module entity_usage (8.x-2.3). Release: Modeler API 1.1.7 Minor update available for module modeler_api (1.1.7). Release: Excel Serialization 2.2.0 Minor update available for module xls_serialization (2.2.0). Release: Custom Field 4.0.12 Minor update available for module custom_field (4.0.12). Release: Custom Field 5.0.3 Minor update available for module custom_field (5.0.3). Release: GraphQL Compose 2.4.2 Minor update available for module graphql_compose (2.4.2). Release: Freja eID for Drupal 1.0.1 Minor update available for module freja_eid (1.0.1). Module Revived: Two-factor Authentication (TFA) 8.x-1.13 Module tfa updated after 10 months of inactivity (8.x-1.13). Usage Milestone: Easy Email Module easy_email crossed 10,000 active installs.

Krea AI Provider

No security coverage

Part of the AI ecosystem · 303 projects

View on drupal.org

Krea Provider connects the Drupal AI module to the Krea API for text to image and image to image generation. It exposes 25 text to image models and 31 image to image models (Krea 2, Flux, Nano Banana, Ideogram, ChatGPT Image, Grok, Seedream, Qwen, Z Image and others, plus Krea Enhance and Topaz upscalers), handles Krea's asynchronous jobs and asset uploads for you, and adds a styles manager and a fine-tuning plugin for training your own LoRAs.

Features

  • Provider plugin krea for the text_to_image and image_to_image operation types of the AI module. Any module that generates images through the AI module can use it.
  • Image to image capabilities: upscale, edit, inpaint, erase, search and replace, search and recolor, remove background, style guide, style transfer and sketch. The AI module's capability filtering picks a model that supports what you ask for.
  • Per model settings (aspect ratio, resolution, seed, guidance, number of images, scale factor and more) that appear in the AI module's model configuration and can be set from code with setConfiguration().
  • Asynchronous jobs are submitted, polled and downloaded transparently. Input images are uploaded as Krea assets first. Poll interval and maximum wait are configurable.
  • A settings page that validates the API key on save, lists the available models and shows a usage summary.
  • A usage page with local request counters, recent jobs from Krea and workspace usage for the last 30 days.
  • A styles page to list, edit, share and publish Krea styles (LoRAs), and to apply one to a generation through the Style (LoRA) ID setting.
  • The krea_lora plugin for the AI Fine-tuning module (ai_finetuner): train a style, character or object LoRA from 5 to 30 images on Flux, Krea 2, Qwen, Z Image or Wan, straight from Drupal content.
  • Optional zero data retention header for requests to Krea.
  • Written against the REST API directly. No vendor SDK.

Mock API for development

The ai_provider_krea_mock submodule implements every endpoint the provider uses inside your Drupal site, returns generated PNGs at the requested size and trains fake styles. Point the endpoint at it to run tests and demos without spending credits.

Agent skill included

The module ships .agents/skills/use-krea-provider, a skill for AI coding assistants covering setup, the mock, generating and upscaling images, and adding models to the registry.

Installation

  1. Install and enable: composer require drupal/ai_provider_krea, then drush en ai_provider_krea.
  2. Create an API key on krea.ai. The token has the form id:secret. Store it using the Key module.
  3. Go to Configuration > AI > Providers > Krea Authentication (/admin/config/ai/providers/krea) and select the key. Saving sends one request to Krea to validate it.
  4. Optionally set Krea as the default provider for text to image and image to image under Configuration > AI > Settings.

Try it from code

$provider = \Drupal::service('ai.provider')->createInstance('krea');

$provider->setConfiguration(['aspect_ratio' => '16:9']);

$images = $provider->textToImage('a red boat, watercolor', 'krea-2-medium')->getNormalized();

Every generation and every training run spends Krea credits. Use the mock submodule for automated tests and local development.

Requirements/Dependencies

  • AI (Artificial Intelligence) module.
  • Key module, for storing the API key.
  • A Krea account with API access.
  • The AI Fine-tuning module (ai_finetuner) only if you want to train LoRAs; the provider works without it.

AI disclosure

All code in this module was written with AI coding assistants under human supervision. The maintainer reviewed and tested every change before committing it and is responsible for the result.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2026
Latest release
4 hours ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0-beta1 Pre-release 10–11 Sep 16, 2026
1.0.x-dev Dev 10–11 Sep 16, 2026