Skip to content

imagenai/imagen-ai

v1.0.0MIT

Imagen AI agent plugin: the imagen CLI skill for automated photo editing, culling, and post-production via the Imagen API.

Imagen AI SDK

Official SDKs and command-line tools for integrating Imagen AI photo editing into applications, automation workflows, and backend services.

Imagen applies your trained editing style β€” an AI Profile β€” to whole batches of photos: upload RAW or JPEG images, apply a profile, monitor the editing job, and download Lightroom-compatible XMP sidecars or exported JPEGs. Your original files are never modified.

CI PyPI npm Go Reference License: MIT

Choose your interface

InterfaceInstallBest for
Pythonpip install imagen-ai-sdkScripts, automation, and Python services
Node.js / TypeScriptnpm install imagen-ai-sdkJavaScript and TypeScript applications
Gogo get github.com/imagenai/imagen-ai-sdk/sdks/goCompiled backend services
CLIinstall scriptShell scripts, CI, and agent workflows

All four target the same API and the shared workflow contract.

Prerequisites

  • An Imagen account with API access. Sign up at imagen-ai.com, then request an API key via support.imagen-ai.com.

  • An API key, supplied to the SDK/CLI via the IMAGEN_API_KEY environment variable (the SDKs also accept it directly in code).

  • A supported runtime for your chosen interface:

    InterfaceRuntime
    PythonPython β‰₯ 3.7
    Node.js / TypeScriptNode.js β‰₯ 18
    GoGo β‰₯ 1.22
    CLInone β€” self-contained binary
  • Input files: RAW (.dng, .nef, .cr2, .arw, …) or JPEG (.jpg, .jpeg). A single project must be all RAW or all JPEG β€” never mixed, and the profile must match the file type.

Authentication

export IMAGEN_API_KEY="your-api-key"

Quick start

The smallest end-to-end run in Python β€” quick_edit creates a project, uploads, edits, and downloads in one call:

import asyncio
from imagen_sdk import quick_edit, EditOptions

async def main():
    result = await quick_edit(
        api_key="your-api-key",
        profile_key=5700,                       # your AI Profile, from the Imagen app
        image_paths=["photo1.nef", "photo2.dng"],
        edit_options=EditOptions(crop=True, straighten=True),
        download=True,                          # add export=True to also render JPEGs
    )
    print(f"Done β€” {len(result.downloaded_files)} edited photos")

asyncio.run(main())

For step-by-step control (progress callbacks, manual create/upload/edit/download) and the Node, Go, and CLI equivalents, see each interface's guide under Documentation.

How it works

Create project
      ↓
Upload photos        (RAW or JPEG β€” one type per project)
      ↓
Start AI editing     (apply an AI Profile)
      ↓
Wait for completion
      ↓
Download XMP sidecars   β€” or export to JPEG
  • Editing produces XMP sidecars β€” Lightroom/Photoshop-compatible edit instructions. Your original images are never modified.
  • Export is optional β€” render the edited images to delivery-ready JPEGs.
  • Image-to-Image (I2I) projects are a separate family with their own upload and completion model (no status polling β€” results arrive via callback or by polling for download links).

Full behavioral details are in the workflow guide.

Common workflows

Each is documented language-neutrally in docs/WORKFLOWS.md:

  • Standard AI editing (Workflow A) β€” apply a profile, download XMP sidecars.
  • Export to JPEG (Workflow B) β€” render edited images to final JPEGs.
  • AI Enhancement & Copilot (Workflow C) β€” per-image quick tools and natural-language edits, then finalize (upscaled deliverables).
  • Image-to-Image / I2I (Workflow D) β€” a distinct project family with its own upload routing and completion flow.
  • Project management (Workflow E) β€” list, fetch, and paginate projects.

Command-line interface

Reach for the imagen CLI when you want photo editing from a shell, a CI pipeline, or an AI agent rather than embedding an SDK. It needs no runtime (self-contained binary), supports --json on every command, and uses stable exit codes (0 success, 2 auth/config, 1 other error).

curl -fsSL https://raw.githubusercontent.com/imagenai/imagen-ai-sdk/master/sdks/python/packaging/install.sh | sh
imagen edit ./raws --profile 5700 --type wedding --crop

Full reference: docs/CLI.md. AI agents can self-install the CLI skill with imagen skill --claude --install or imagen skill --codex --install (see skills/imagen-cli/SKILL.md).

Documentation

Repository structure

sdks/python/   Python SDK (PyPI) β€” also builds the `imagen` CLI
sdks/node/     Node / TypeScript SDK (npm)
sdks/go/       Go SDK (go get; no central registry)
docs/          WORKFLOWS.md, CLI.md, RELEASING.md
spec/          OpenAPI contract (openapi.yaml)

Each SDK versions and releases independently (Python and Node to their registries, Go via a sdks/go/vX.Y.Z tag). They target the same API and shared workflow contract, so newer capabilities may land in one language before another β€” check each SDK's own README for its current feature set. Release mechanics are in docs/RELEASING.md.

Support and contributing

License

MIT β€” see LICENSE. Also declared in each SDK's package metadata (sdks/python/pyproject.toml, sdks/node/package.json).