Logo: Gpt Image Api

Gpt Image Api

Communautéit
wilhelminavoss
gpt-image-api

Call the GPT Image 2 and GPT Image 2.5 (Flare, Sunburst) Images API correctly - /v1/images/generations and /v1/images/edits, pixel sizes and billing tiers, n, quality, url vs b64_json, JSON vs multipart references (up to 16), masks, timeouts, cost and error handling, with the OpenAI SDKs pointed at a compatible base URL. Use when writing, reviewing or debugging code that generates or edits images with gpt-image-2, gpt-image-2.5-flare or gpt-image-2.5-sunburst.

Iwwersiicht

Editeurwilhelminavoss
Repositorygpt-image-2-image-capabilities
Skill-Nummgpt-image-api
Stären
36
Forks
0
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    wilhelminavoss huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Gpt Image Api an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/wilhelminavoss/gpt-image-2-image-capabilities/tree/main/skills/gpt-image-api
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wilhelminavoss/gpt-image-2-image-capabilities.git /tmp/gpt-image-2-image-capabilities
mkdir -p .claude/skills
cp -r /tmp/gpt-image-2-image-capabilities/skills/gpt-image-api .claude/skills/gpt-image-api
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Gpt Image Api an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Gpt Image Api automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Gpt Image Api net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

GPT Image 2 / 2.5 API

These facts describe the OpenAI-compatible Images surface at https://argolink.io/v1 (checked 2026-10-07). Other compatible endpoints are similar but can differ in sizes, quality values and price; check theirs.

Endpoints

CallBodyUse
POST /v1/images/generationsJSONtext to image
POST /v1/images/editsJSON with images: [{"image_url": …}], or multipart with repeated image[] filesimage to image, reference edits, masked edits

Auth: Authorization: Bearer <key>. Both calls return only when every image is finished: set the client timeout to 600 seconds or more and do not retry on a short timeout, or you may pay twice.

Fields

FieldValuesNotes
modelgpt-image-2, gpt-image-2.5-flare, gpt-image-2.5-sunburstsame fields for all three
prompttextrequired; also state the aspect ratio in words
sizeWIDTHxHEIGHT, e.g. 1024x1024, 2048x1152, 3840x2160pixels only: never 1K, 4K or 16:9; there is no aspect_ratio field
qualityauto, low, medium, highthe values documented on this endpoint
n1–7each returned image is billed; use the length of data as the real count
response_formaturl or b64_jsonURLs are temporary: download them right away
images / image[]1–16 referencesJSON links (HTTPS or data URLs) or multipart files; one format per request
maskmask.image_url in JSON, a mask file in multipartapplies to the first reference

Recommended sizes (python scripts/gptimage.py sizes): 1:1 1024x1024 / 1440x1440 / 2160x2160; 16:9 1024x576 / 2048x1152 / 3840x2160; 9:16 576x1024 / 1152x2048 / 2160x3840; 3:4, 4:3, 2:3, 3:2, 21:9 and 5:2 also have a row. The returned image can differ from the requested pixels; check it when exact size matters.

Billing

Per returned image, by the returned image's longest edge: up to 1024 px is 1K ($0.015), 1025–2048 is 2K ($0.015), above 2048 is 4K ($0.02). Quality does not change the price here. 2560x1440 is a valid request but bills as 4K. python scripts/gptimage.py cost --size 3840x2160 -n 3 prints the arithmetic.

SDK usage

Pass the key and base URL explicitly so an OPENAI_API_KEY meant for OpenAI is never sent to another host.

python
import base64, os
from openai import OpenAI

client = OpenAI(api_key=os.environ["GPT_IMAGE_API_KEY"], base_url="https://argolink.io/v1", timeout=600)
result = client.images.generate(model="gpt-image-2", prompt="A lighthouse at dusk, 16:9 composition",
                                size="2048x1152", quality="high", n=1, response_format="b64_json")
open("lighthouse.png", "wb").write(base64.b64decode(result.data[0].b64_json))

with open("room.png", "rb") as room, open("sofa.png", "rb") as sofa:
    edited = client.images.edit(model="gpt-image-2.5-sunburst", image=[room, sofa],   # sent as image[] parts
                                prompt="Put the sofa from the second image into the room in the first image",
                                size="1728x1152", response_format="b64_json")
ts
import OpenAI, { toFile } from "openai";
import { readFile } from "node:fs/promises";

const client = new OpenAI({ apiKey: process.env.GPT_IMAGE_API_KEY, baseURL: "https://argolink.io/v1", timeout: 600_000 });
const result = await client.images.generate({ model: "gpt-image-2", prompt: "A lighthouse at dusk, 16:9 composition",
  size: "2048x1152", quality: "high", response_format: "b64_json" });
const edit = await client.images.edit({ model: "gpt-image-2", prompt: "Make it winter",
  image: [await toFile(await readFile("lighthouse.png"), "lighthouse.png", { type: "image/png" })] });

If your TypeScript version of the SDK types size as a fixed list, add // @ts-expect-error on that line: the SDK sends extra values unchanged.

Errors and what to do

SymptomLikely causeAction
401missing or wrong keyfix the key; don't retry
Rejected, message names size1K, 16:9 or a malformed valuesend pixels from the table
Rejected, message names the imagesmore than 16, or JSON and multipart mixedsplit or pick one format
429, or 503 with Retry-Afterrate limit or no free capacitywait as told, then retry
Client timeoutthe image was still renderingraise the timeout to 600 s; don't blindly resend
Square result for a wide requestratio missing from the promptadd "16:9 composition" to the prompt
data shorter than nfewer images returnedbill and handle what came back

Script

scripts/gptimage.py wraps the SDK: generate, edit (--image up to 16 times, --mask), sizes and cost. Run it with GPT_IMAGE_API_KEY set; GPT_IMAGE_BASE_URL points it at another compatible endpoint.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Gpt Image Api?

Call the GPT Image 2 and GPT Image 2.5 (Flare, Sunburst) Images API correctly - /v1/images/generations and /v1/images/edits, pixel sizes and billing tiers, n, quality, url vs b64_json, JSON vs multipart references (up to 16), masks, timeouts, cost and error handling, with the OpenAI SDKs pointed at a compatible base URL. Use when writing, reviewing or debugging code that generates or edits images with gpt-image-2, gpt-image-2.5-flare or gpt-image-2.5-sunburst.

Firwat Gpt Image Api op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Gpt Image Api besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Gpt Image Api an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/wilhelminavoss/gpt-image-2-image-capabilities/tree/main/skills/gpt-image-api an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Gpt Image Api benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Gpt Image Api benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Gpt Image Api domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Gpt Image Api gratis?

Jo. wilhelminavoss huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇