Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Krea AI Provider

No security coverage Under active development

Part of the AI ecosystem · 343 projects

This project connects Drupal's AI module to the Krea API, offering a wide range of text-to-image and image-to-image generation capabilities. It supports various Krea models, handles asynchronous jobs, and includes features for managing styles and fine-tuning models to train custom LoRAs.

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.

Ask your assistant about Krea AI Provider

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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 weeks ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

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