OpenAI Images
Buat dan edit gambar dengan GPT Image dan DALL·E (mask, gambar referensi), disimpan ke folder lokal (dibayar per panggilan)
Beta v0.1.0 Node.js 5 aksi
Tentang
Plugin Graphrt untuk OpenAI Images API. Buat gambar dari prompt dan edit gambar (dengan mask opsional, atau dari beberapa gambar referensi) dengan model GPT Image (gpt-image-2, gpt-image-1.5, gpt-image-1-mini, chatgpt-image-latest, model 2.5 dan 2.6) dan DALL·E. Gambar yang dibuat disimpan ke folder lokal. Dibuat dengan lapisan REST deklaratif.
Yang bisa dilakukan
- generate_image: prompt to 1–10 images, size, quality, background (transparent), output format and compression, moderation level. DALL·E 3 style and response_format for the legacy models.
- edit_image: edit one uploaded image, optionally only where a PNG mask is transparent. Without a mask and with a prompt such as "a variation of this image" it replaces the retired variations endpoint.
- edit_image_from_references: edit or combine up to 16 images given as URLs, data: URLs or uploaded file_ids (JSON form of the edits endpoint, GPT Image models only).
- list_models: the models your key can use (free).
- api_request: any other endpoint (GET only when called by an agent).
Aksi
Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.
- List models
openai-images.list_models - Generate image
openai-images.generate_image - Edit image
openai-images.edit_image - Edit image from references
openai-images.edit_image_from_references - OpenAI API request
openai-images.api_request
Pengaturan
Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.
-
OPENAI_API_KEYWajibAPI key from <https://platform.openai.com/api-keys> (a project key limits it to one project) -
OPENAI_IMAGES_OUTPUT_DIRFor filesAbsolute directory where generated images are saved. Unset: nothing is saved and the result keeps the raw b64_json (large) -
OPENAI_IMAGES_UPLOAD_DIRFor local uploadsAbsolute directory that edit_image may read local files from. Unset: only https URLs are accepted
Cara memakainya
Di Graphrt Desktop
- Buka Plugins dan cari OpenAI Images.
- Klik Install lalu setujui.
- Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
- Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Dengan CLI
terminal
$ graphrt plugin install openai-images workflow.yaml
- id: hero
type: openai-images.generate_image
prompt: "Flat illustration of a lighthouse at dawn, warm colours"
size: 1536x1024
quality: medium
output_format: webp
- id: tweak
type: openai-images.edit_image
image: "{{#hero.data.saved_files.0.path#}}" # needs OPENAI_IMAGES_UPLOAD_DIR to include the output dir
prompt: "Add a small sailboat on the left"