=== AI Provider for GenMagic ===
Contributors:      genmagic
Tags:              ai, ai image generation, connector, llm, image generator
Requires at least: 7.0
Tested up to:      7.1
Requires PHP:      7.4
Stable tag:        1.0.0
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Connect the WordPress AI Client to GenMagic: 450+ text and image models (GPT, Claude, Gemini, Nano Banana, FLUX, GPT Image) with one API key.

== Description ==

This plugin adds GenMagic as a provider for the AI features built into WordPress (the WordPress AI Client and the plugins that use it). With one GenMagic API key, your site can use:

* **Text generation** with 360+ language models, including GPT, Claude, Gemini, Llama, Qwen, DeepSeek and Mistral models, through GenMagic's chat completions API
* **Image generation** with 60+ image models, including Nano Banana, GPT Image, FLUX, Recraft, Seedream and Qwen Image, in square, landscape and portrait formats

Models are discovered from GenMagic automatically, so new models appear without a plugin update. Everything is billed to one pay-as-you-go GenMagic balance; there is no subscription, and new verified accounts get free starter credit. Model prices are listed at [genmagic.co/models](https://genmagic.co/models).

**Setup**

1. Install and activate the plugin.
2. Create a free GenMagic account and an API key at [genmagic.co/get-api-key](https://genmagic.co/get-api-key?utm_source=wordpress&utm_medium=readme).
3. Open **Settings > Connectors**, find **GenMagic** and paste the key. You can also set it with the `GENMAGIC_API_KEY` constant in `wp-config.php` or the `GENMAGIC_API_KEY` environment variable.

WordPress checks the key by listing GenMagic's models, and any plugin that uses the WordPress AI Client can then pick GenMagic models for text or images.

**Requirements**

* WordPress 7.0 or newer (the WordPress AI Client is part of core)
* A GenMagic API key

== External services ==

This plugin connects to the GenMagic API (https://genmagic.co/api/v1), operated by GenMagic, to list the available models and to generate text and images. It only sends requests when WordPress or a plugin using the WordPress AI Client asks for a model list or a generation, and only after a site administrator has entered a GenMagic API key.

* **Listing models:** a request to https://genmagic.co/api/v1/models with your API key, when WordPress checks the key and when it needs the model list.
* **Generating text:** the prompt, any system instruction, earlier messages in the conversation and any images included in the prompt, sent to https://genmagic.co/api/v1/chat/completions.
* **Generating images:** the image prompt and the requested size and number of images, sent to https://genmagic.co/api/v1/images/generations.

GenMagic runs each request on the chosen model's provider (for example Google, OpenAI, Anthropic or Black Forest Labs) and charges the cost to your GenMagic balance. GenMagic's [terms of service](https://genmagic.co/legal/terms) and [privacy policy](https://genmagic.co/legal/privacy) apply.

== Frequently Asked Questions ==

= Is GenMagic free? =

Creating an account is free and new verified accounts get starter credit. After that you pay per result from a prepaid balance; each model's price is listed before you use it.

= Which models can I use? =

Every text and image model in GenMagic's catalog. The list updates itself as GenMagic adds models.

= Can it make videos, speech or music? =

GenMagic makes all of these, but the WordPress AI Client currently uses this provider for text and images. Video, speech and music are available in the GenMagic studio, its API, and its n8n, Zapier and MCP integrations.

= Where is my API key stored? =

In the site's options (the WordPress Connectors setting), or in a constant or environment variable if you prefer to keep it out of the database.

== Changelog ==

= 1.0.0 =
* First release: text generation and image generation with every GenMagic model, model discovery, key check on the Connectors screen.
