rankion.ai

Image Generation & Gallery

Generate AI images for articles, manage gallery & trash, edit existing images.

The Image Gallery is the central store for all AI-generated images of a team. Every image created in chat or in the article editor lands permanently under /images — with filters, tags, favorites, soft delete, and 30-day trash. The edit modal can produce variants (image-to-image via OpenAI gpt-image-2) that hang as children on the original. Public share links make individual images shareable without login.

What it can do

  • GeneratePOST /v1/generate/image creates a new image for a prompt. Async, the result appears in the gallery.
  • Gallery & trashGET /v1/images with filters (q, model, from, to, favorite, tags[], sort, page). GET /v1/images/trash lists soft-deleted, 30-day retention, then automatic hard-delete.
  • Edit (soft edit)POST /v1/images/{id}/edit starts a variant async. Response 202 with {job_id, edit_session_id}, frontend polls /v1/images/{id} and sees the new variant in variants[].
  • MetadataPATCH /v1/images/{id} for title and tags[], POST /v1/images/{id}/favorite toggles the star.
  • Bulk operations — bulk delete/restore (max 200), bulk export as ZIP (max 500, async via /v1/images/exports/{job_id}).
  • Public share — idempotent 40-char token, public URL without login with noindex,nofollow, optional expiry, and view counter. Audit trail is preserved after revoke.
  • Open in chatPOST /v1/images/{id}/open-in-chat creates an AiChatSession with gallery_image_id; the agent can keep working with the image as a source.

When to use

  • You need hero images, OG images, or inline visuals for your articles and want to archive them reusably.
  • You want to nudge an existing AI visualization (color, detail, style) instead of regenerating from scratch.
  • You want to share an image without a platform login with clients / editors.
  • You want to bulk-export images — e.g. for a WordPress sync or an external DAM.

Workflow

  1. GeneratePOST /v1/generate/image with {prompt, model?}. The image lands in the gallery.
  2. Browse & filterGET /v1/images?tags[]=hero&sort=newest lists matching images.
  3. EditPOST /v1/images/{id}/edit with prompt → variant hangs on the parent. Frontend polls /v1/images/{id} until variants[] is populated.
  4. Clean upDELETE /v1/images/{id} moves to trash (30-day restore window). DELETE /v1/images/{id}/forever (only from trash) deletes permanently.
  5. Share or process furtherPOST /v1/images/{id}/share creates a public link, POST /v1/images/{id}/open-in-chat opens a chat session with the image as context.

API

Method Endpoint Description Credits
POST /v1/generate/image Generate a new image 5
GET /v1/images List with filter & pagination 0
GET /v1/images/trash Soft-deleted images 0
GET /v1/images/{id} Detail incl. variants[] and parent 0
POST /v1/images/{id}/edit Async edit (gpt-image-2), 202 + {job_id, edit_session_id} 10
PATCH /v1/images/{id} Update title, tags[] 0
POST /v1/images/{id}/favorite Toggle is_favorite 0
DELETE /v1/images/{id} Soft delete 0
POST /v1/images/{id}/restore Restore from trash 0
DELETE /v1/images/{id}/forever Hard delete (only from trash) 0
POST /v1/images/bulk/delete · bulk/restore Bulk operations, {ids:[]} max 200 0
POST /v1/images/bulk/export Async ZIP, max 500 IDs 0
GET /v1/images/exports/{job_id} Export status + download_url 0
POST /v1/images/{id}/open-in-chat Creates AiChatSession with the image 0
POST/PATCH/DELETE /v1/images/{id}/share Manage public share 0

Credits & Limits

  • Generate: 5 credits.
  • Edit: 10 credits (same tariff as Generate; OpenAI backend cost is higher on the edit endpoint).
  • Bulk caps: delete/restore max 200 IDs, export max 500 IDs per request.
  • Trash auto-prune: 30 days, then hard-delete via cron.
  • PNG required for edits: JPEG/WEBP are converted server-side to PNG ≤4MB.
  • Team scoped: cross-team → 404.

Related modules

  • AI Content Editor — images from the gallery can be inserted directly into articles.
  • Agentic Chat — generated images appear immediately in the gallery; Open in Chat opens a new edit session.
  • Rankion OS — images can be referenced and shared in OS folders.
Letzte Aktualisierung: May 1, 2026

Cookies: We use necessary cookies for functionality and optional ones for improvements. Details

Necessary
Active
Analytics
Marketing