Skip to content
المشاريع

fujc683/gpt-image-2-6-api-examples

عرض على GitHub

حول

Six copy-paste curl requests for GPT Image 2.6.

التصميم والوسائط

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
٠
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

GPT Image 2.6

GPT Image 2.6 API Examples — six copy-paste requests

curl examples for GPT Image 2.6: text-to-image, variants, n>1, reference image, polling.

Awesome License: CC BY 4.0

👉 Try GPT Image 2.6 on APIMart

https://gola.apimart.ai/k-7u8Ndb

💰 Pricing · 🔑 Get an API key


Working examples

Each example below is a complete request you can paste into a terminal.

1. Text to image

curl -X POST https://api.apimart.ai/v1/images/generations \
  -H "Authorization: Bearer $APIMART_API_KEY" -H "Content-Type: application/json" \
  -d '{"model":"gpt-image-2.6-flare","prompt":"cinematic close-up of a marble statue","n":1,"size":"1024x1024"}'

2. Higher quality variant

-d '{"model":"gpt-image-2.6-sunburst","prompt":"...","n":1}'

3. Multiple images in one task

-d '{"model":"gpt-image-2.6-flare","prompt":"...","n":4}'

4. With a reference image

-d '{"model":"gpt-image-2.6-flare","prompt":"same product, studio lighting","reference_image":"https://.../in.jpg","n":1}'

5. Poll the result

curl https://api.apimart.ai/v1/tasks/$TASK_ID -H "Authorization: Bearer $APIMART_API_KEY"

6. Check what you were charged

curl -s https://api.apimart.ai/v1/tasks/$TASK_ID -H "Authorization: Bearer $APIMART_API_KEY" | jq '.data.cost'

Related

License

CC BY 4.0

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…