GPT Image 2.5 से Figma: Codex और Astra
GPT Image 2.5 कॉन्सेप्ट को Codex, GPT-6 Astra और Computer Use से संपादन योग्य Figma लेयर्स में बदलें।
विषय-सूची

GPT Image 2.5 वेबसाइट का विज़ुअल कॉन्सेप्ट बना सकता है और Codex, GPT-6 Astra तथा Computer Use उसे Figma में फिर से बना सकते हैं। स्वीकार्य परिणाम अलग टेक्स्ट लेयर, बटन और कंटेनर है; पूरे फ्रेम पर फैली PNG नहीं।
यदि खाते में आवश्यक मॉडल और Computer Use पहले से उपलब्ध हैं, तो आधिकारिक सब्सक्रिप्शन वाला रास्ता लें। दूसरा रास्ता BetterToken API से Image 2.5 बनाना और Astra के लिए साफ API कॉन्फ़िगरेशन है। प्लगइन, ऐप अनुमति और Figma पहुँच अलग जांचें हैं। Hideki Kobayashi का उदाहरण लेखक का अनुभव है, हमारा एंड-टू-एंड परीक्षण या सटीक पुनर्निर्माण की गारंटी नहीं।
एक जांचने योग्य कॉन्सेप्ट बनाएं
पहले केवल एक डेस्कटॉप स्क्रीन बनाएं: नेविगेशन, शीर्षक, मुख्य बटन और कार्ड। सटीक कॉपी चित्र से अलग रखें ताकि वह Figma की टेक्स्ट लेयर बने। एक PNG बनाकर खोलें और पढ़ने योग्य होने की जांच करें; मांगा गया आकार वास्तविक आउटपुट का प्रमाण नहीं है।
Flare से पहला कॉन्सेप्ट शुरू करें और संपादन की सटीकता चाहिए तो Sunburst चुनें। BetterToken Workspace में सही image-model group वाला key चुनें; एक group की पहुँच Astra के लिए स्वतः पर्याप्त नहीं है। n=1 के साथ एक ही paid request, 300 सेकंड timeout और बिना स्वचालित retry चलाएं। timeout के बाद दोबारा भेजने से पहले history और charges जांचें।
Codex को अलग से सेट और जांचें
config.toml और auth.json का सुरक्षित backup लें, duplicate TOML tables के बिना settings merge करें और API key local रखें। API-key authentication Computer Use उपलब्ध होने का प्रमाण नहीं है। Codex restart करके छोटा संदेश भेजें, फिर अलग से देखें कि Computer Use Figma को देख रहा है।
अलग Figma file/page लें, स्वयं sign in करें और agent को password या key न दें। पहले उससे बिना बदलाव open file और visible layers बताने को कहें। build में केवल नामित नया page, native text, buttons, containers और auto layout मांगे; photos image fill रह सकते हैं।
संपादन योग्य परिणाम स्वीकारें
लंबा heading डालें, button को relabel और resize करें तथा main frame narrow करें। text overlap और layer names जांचें। यदि केवल PNG import हुआ है तो एक section native layers से फिर बनवाएं। 401 या model error पर API configuration और key access जांचें; app control न होने पर Computer Use permissions जांचें。
सटीक मान और संदर्भ
यदि CODEX_HOME सेट है, तो उसी directory का उपयोग करें; Windows में सामान्य स्थान %USERPROFILE%\\.codex है।
Image चरण के लिए gpt-image-2.5-flare या gpt-image-2.5-sunburst और Codex चरण के लिए gpt-6-astra चुनें। सार्वजनिक catalog snapshot 10 सितंबर 2026 का है: हर image call $0.05, पांच calls $0.25 और GPT group multiplier 0.68 है। Astra की प्रति दस लाख token दरें 272,000 tokens तक $6.80 / $34.00 / $0.68 / $8.50 और उससे ऊपर $13.60 / $51.00 / $1.36 / $17.00 हैं। यह snapshot है, निश्चित final bill नहीं। वर्तमान catalog, key की शर्तें, वास्तविक usage और जरूरी groups की access जांचें।
संदर्भ: https://bettertoken.ai/pricing · https://bettertoken.ai/api/pricing · https://bettertoken.ai/workspace · https://docs.bettertoken.ai/api-reference/images-generations · https://docs.bettertoken.ai/ai-tools/codex · https://openai.com/index/introducing-chatgpt-images-2-5/ · https://developers.openai.com/api/docs/models/gpt-image-2.5-flare · https://developers.openai.com/api/docs/models/gpt-image-2.5-sunburst · https://learn.chatgpt.com/docs/computer-use · https://help.figma.com/hc/en-us/articles/360040451373-Guide-to-auto-layout
कॉपी करने योग्य implementation samples
नीचे के samples जानबूझकर बिना बदलाव रखे गए हैं। key उजागर न करें, विफल paid request को अपने आप दोबारा न चलाएं और chat response को यह प्रमाण न मानें कि Computer Use Figma को नियंत्रित कर सकता है।
Create a flat desktop website design concept for a fictional interior
design studio called Northline. Show one screen, not a browser mockup.
Use an off-white background, dark green accents and a clean grid.
Include a navigation bar, a hero heading, one primary button and three
service cards. No perspective, device frame or decorative UI overlays.
Use these exact labels:
Navigation: Projects | Services | About
Heading: Spaces for everyday life
Button: Discuss a project
Cards: Homes | Workspaces | Consultation
Keep text readable and leave enough space between sections.
Создай и запусти в текущей папке Node.js-скрипт generate-design.mjs,
который получит одну концепцию веб-страницы через API BetterToken.
Используй HTTP API, не встроенный инструмент генерации изображений Codex.
Дизайн: один плоский экран сайта вымышленной интерьерной студии Northline,
без рамки браузера и перспективы. Фон молочно-белый, акценты тёмно-зелёные,
чёткая сетка. Навигация: Projects | Services | About.
Заголовок: Spaces for everyday life. Кнопка: Discuss a project.
Три карточки: Homes | Workspaces | Consultation.
POST https://www.bettertoken.ai/v1/images/generations
Content-Type: application/json
Authorization: Bearer <значение BETTERTOKEN_IMAGE_API_KEY>
Параметры: model="gpt-image-2.5-flare", size="1536x1024", n=1,
response_format="b64_json", output_format="png".
Сначала проверь Node.js и наличие переменной BETTERTOKEN_IMAGE_API_KEY,
не выводя её значение. Если ключ недоступен, объясни, как безопасно задать
его локально для процесса запуска; не проси присылать ключ в чат.
Не читай другие хранилища учётных данных и не меняй настройки Codex.
Используй встроенные средства Node.js, без установки зависимостей.
Не перезаписывай существующие файлы: при совпадении выбери новое имя.
Когда окружение готово, выполни ровно один платный запрос, n=1,
с тайм-аутом 300 секунд. Не повторяй запрос автоматически при ошибке
или тайм-ауте; сообщи статус и предложи проверить списания до повтора.
Не выводи ключ, заголовок Authorization или полный ответ с base64.
Декодируй data[0].b64_json и сохрани website-concept.png.
Проверь, что PNG открывается, покажи изображение и его фактические размеры,
укажи путь к скрипту и PNG. При неудаче не заявляй об успешной генерации.
На этом остановись: Figma пока не открывай и не изменяй.
import { writeFile } from "node:fs/promises";
const apiKey = process.env.BETTERTOKEN_IMAGE_API_KEY;
if (!apiKey) throw new Error("Set BETTERTOKEN_IMAGE_API_KEY locally");
const prompt = `Create a flat desktop website design concept for a fictional
interior design studio called Northline. Show one screen without a browser
or device frame. Use an off-white background, dark green accents and a
clean grid. Include navigation, a hero heading, one button and three cards.
Exact navigation: Projects | Services | About.
Exact heading: Spaces for everyday life.
Exact button: Discuss a project.
Exact card labels: Homes | Workspaces | Consultation.
Keep text readable and leave enough space between sections.`;
const response = await fetch("https://www.bettertoken.ai/v1/images/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gpt-image-2.5-flare",
prompt,
size: "1536x1024",
n: 1,
response_format: "b64_json",
output_format: "png",
}),
signal: AbortSignal.timeout(300000),
});
if (!response.ok) throw new Error(`Image request failed: HTTP ${response.status}`);
const result = await response.json();
const encoded = result.data?.[0]?.b64_json;
if (!encoded) throw new Error("Response has no data[0].b64_json");
const base64 = encoded.replace(/^data:[^;]+;base64,/, "");
await writeFile("website-concept.png", Buffer.from(base64, "base64"));
console.log("Saved website-concept.png");
model_provider = "bettertoken"
model = "gpt-6-astra"
cli_auth_credentials_store = "file"
[model_providers.bettertoken]
name = "BetterToken"
base_url = "https://www.bettertoken.ai/v1"
wire_api = "responses"
requires_openai_auth = true
supports_websockets = false
{
"auth_mode": "apikey",
"OPENAI_API_KEY": "YOUR_API_KEY"
}
Use Computer Use to rebuild the attached website-concept.png in the Figma
Design file I have opened for this task. Work only on a new page named
Northline concept. Do not modify other pages, share the file or publish it.
Create a desktop frame 1440 px wide. Use the image as a visual reference.
Rebuild navigation, heading, button and service cards with native Figma
layers. Do not use a full-page image as the finished design.
Use these exact texts:
Projects | Services | About
Spaces for everyday life
Discuss a project
Homes | Workspaces | Consultation
Use editable text and auto layout where content must resize. Make the
primary button reusable. Keep photos as image fills if needed; do not
pretend they have become editable vectors.
First build the navigation and hero, inspect them, then continue with the
three cards. Match the reference proportions, colours and spacing. If a
font is unavailable, report it and use an available substitute.
At the end, verify that the title can be edited, the button can be resized
and the frame can be narrowed without overlapping text. Report any
remaining differences and the page/frame names so I can inspect them.