WP Manifestindependent plugin directory
manifest / ai / ai-provider-for-1min-ai

AI Provider for 1min.ai

Adds 1min.ai (multi-model text, image & video) as a provider for the WordPress AI Client. Independent, unofficial.

by Adam Greenwell · github.com/adamgreenwell/ai-provider-for-1min-ai · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/adamgreenwell/ai-provider-for-1min-ai/archive/refs/heads/main.zip

Readme

AI Provider for 1min.ai

Registers 1min.ai as a provider for the WordPress AI Client (the PHP AI Client bundled in WordPress 7.0, or the AI plugin on 6.9). Once active and configured, any feature built on the AI Client — the AI plugin's content tools, the featured-image generator, third-party plugins like Rank Math — can generate text and images through 1min.ai.

Independent, unofficial integration. Not affiliated with, endorsed by, or sponsored by 1min.ai. "1min.ai" is used only to describe compatibility.


The core nuance: one connector, many models

Most AI Client providers map to a single vendor (OpenAI, Anthropic, Google). 1min.ai is a multi-model gateway — a single account and API key front models from many vendors. So this one connector exposes a heterogeneous catalog:

Surface Models exposed through the single 1min.ai connector
Text OpenAI GPT (4o, 4.1, 5, o-series), Google Gemini 2.5, DeepSeek, Mistral, Meta Llama 3
Image FLUX.1 [schnell], Stable Diffusion XL, Recraft
Video Hailuo (MiniMax) text-to-video

What this means in the WordPress AI layer:

  • Each underlying model is a selectable model under the one 1min.ai provider. The AI Client's normal machinery — capability matching, model preference lists, and per-feature developer overrides (Settings → AI) — chooses among them exactly as it would choose between separate providers.
  • Availability is plan-gated by 1min.ai, not by WordPress. 1min's full public roster is larger than what any given plan exposes to the API, and it varies by plan. The connector therefore ships a curated catalog of ids confirmed reachable via the API, rather than 1min's entire marketing list. (For example, some plans do not expose Claude to API access at all.)
  • The catalog is filterable — see Extending — so a site on a different plan can add or remove ids without editing the plugin.

There is no /models discovery endpoint upstream, which is why the catalog is hardcoded (and cached; see Caching).


Text generation surface

Capabilities advertised: text generation + chat history. Vision-capable models (gpt-4o, gpt-4o-mini, gpt-4-turbo) additionally accept image input.

Nuances specific to 1min.ai:

  • Flat-prompt API. 1min's chat endpoint takes a single prompt string, not a structured messages[] array. The connector serializes the conversation (system instruction + User: / Assistant: turns) into one prompt. Chat history is carried in that string; there is no server-side conversation state per request.
  • Vision input is supported for vision-capable models: image parts are uploaded to 1min's asset endpoint and attached to the prompt.
  • Deliberately not advertised (1min's flat-prompt API can't express them): function calling / tool use, structured-JSON (schema-constrained) output, and streaming. They are intentionally left off the capability list so that tool-using or streaming consumers degrade gracefully (pick another provider) instead of failing mid-request.
  • Token usage is reported back from 1min's response metadata.

Image generation surface

A single capability (imageGeneration) covers two modes, distinguished automatically by whether the prompt includes a reference image:

Mode Trigger Models 1min feature
Text-to-image no reference image black-forest-labs/flux-schnell, stable-diffusion-xl-1024-v1-0 IMAGE_GENERATOR
Image-to-image / refinement reference image present recraft IMAGE_VARIATOR

Nuances:

  • Modality-driven routing (no ifs in selection). The refinement model advertises inputModalities: [text, image] (image required); the text-to-image models advertise [text]. The AI Client derives an image-input requirement from a reference-image prompt part and matches only the refinement model; a plain prompt matches only the text-to-image models. The capability metadata is the router.
  • One image per request. 1min returns only a single fetchable (signed) image URL per request regardless of how many it generates, so the connector produces one image and does not advertise candidateCount.
  • Inline output. Generated images are downloaded and returned inline (base64), so they survive 1min's signed-URL expiry (~7 days) and its GET-only / HEAD-unfriendly signing. The connector advertises outputFileType: inline, which consumers such as the AI plugin's featured-image feature require (they call as_output_file_type(inline)); without it the model is filtered out and image generation fails with unsupported_model.
  • Per-model parameters are handled internally — e.g. Stable Diffusion XL is sent cfg_scale/steps plus a fresh random seed each call (the documented default seed of 0 would otherwise reproduce the same image).

Video generation surface

Capability: video generation (text-to-video), via the hailuo (MiniMax) model. No other AI Client provider connector offers video — this is the connector's distinguishing capability.

  • Synchronous, but slow. 1min's text-to-video request blocks until the clip is rendered (~60–120s) and returns it directly, so the connector implements the synchronous VideoGenerationModelInterface with an extended request timeout — no async job polling.
  • Returned as a remote URL, not inline. Video files are far too large to base64 into an in-memory result, so the model returns the signed video URL and the consumer sideloads it (GET-only, expires in ~7 days).
  • Driving it needs a consumer. The core ai plugin has no built-in video feature, so a small companion plugin — 1min.ai Video Generator — registers a 1min-ai/generate-video Abilities API ability that takes a prompt, generates the clip, and saves it to the Media Library. It's invokable via REST, WP-CLI, and MCP. (Kept separate so this plugin stays a pure provider.)

Installation

There is no build step and no runtime Composer dependency — the autoloader is hand-rolled and the AI Client is provided by WordPress core (7.0+) or the ai plugin. Get the files in place by any method below, then configure a key.

Prerequisites: WordPress 7.0+ (or 6.9 with the AI plugin), and a 1min.ai account with API access.

Option 1 — Upload a ZIP in wp-admin (easiest)

  1. On the repository page, click Code → Download ZIP (or download a release asset).
  2. In WordPress: Plugins → Add New → Upload Plugin, choose the ZIP, Install Now.
  3. Activate AI Provider for 1min.ai.

Option 2 — FTP / SFTP

  1. Download and unzip the repository.
  2. Rename the extracted folder to ai-provider-for-1min-ai (GitHub's auto-ZIP unzips to ai-provider-for-1min-ai-main).
  3. Upload that folder into wp-content/plugins/ on your server.
  4. Activate the plugin from Plugins in wp-admin.

Option 3 — git clone

cd wp-content/plugins
git clone https://github.com/adamgreenwell/ai-provider-for-1min-ai.git

Then activate the plugin. (composer install is only needed for the development tooling — PHPCS — not to run the plugin.)

Option 4 — WP-CLI

wp plugin install https://github.com/adamgreenwell/ai-provider-for-1min-ai/archive/refs/heads/main.zip --activate

This installs into a folder named ai-provider-for-1min-ai-main. Rename it to ai-provider-for-1min-ai (or install from a release ZIP, which is named correctly) so the slug matches.


Configuration

  1. Ensure the WordPress AI Client is available (WordPress 7.0+, or the AI plugin on 6.9).
  2. Activate this plugin.
  3. Provide your 1min.ai API key via Settings → Connectors → 1min.ai (stored in the database), or define the constant in wp-config.php:
    define( '1MIN_AI_API_KEY', 'your-key-here' );

    An environment variable of the same name also works. The key is sent to 1min.ai as an API-KEY request header.


Caching

The model catalog is cached for 24 hours, keyed by the AI Client version and provider class (not by catalog content). After updating the plugin or changing the catalog, flush caches for the new metadata to take effect:

wp cache flush && wp transient delete --all

(or use the admin "Clear Caches" action). Otherwise stale metadata can cause a just-fixed model to keep reporting unsupported_model.


Extending

Adjust the catalog for your plan without editing the plugin:

add_filter( '1min_ai_models', function ( array $models ) {
    // $models is a map of model-id => WordPress\AiClient\...\ModelMetadata.
    // Add ids your plan supports, or unset ones it doesn't.
    return $models;
} );

To make 1min.ai the preferred image provider when other image providers are also connected, either set a developer model override (Settings → AI) or use the AI plugin's wpai_preferred_image_models filter — 1min otherwise acts as a fallback once a preferred provider is unavailable.


Requirements & limitations

  • Requires the WordPress AI Client (WP 7.0 core, or the ai plugin) and a 1min.ai account with API access.
  • Available models depend on your 1min.ai plan.
  • No streaming, function calling, or schema-constrained JSON output (upstream API limitations).
  • Image generation yields one image per request.

Read the full README on GitHub →