Skip to content
المشاريع

fujc683/gpt-image-2-6-openai-compatible

عرض على GitHub

حول

Drop-in OpenAI-compatible access to GPT Image 2.6.

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

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

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

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

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

README.md

الأصل

GPT Image 2.6

GPT Image 2.6 API Gateway — one key, many image models

Route GPT Image 2.6 and other image models through one OpenAI-compatible endpoint.

Awesome License: CC BY 4.0

👉 Try GPT Image 2.6 on APIMart

https://gola.apimart.ai/k-YfBtmb

💰 Pricing · 🔑 Get an API key


Why a gateway

Calling a single model directly means one key per vendor, one failure mode per vendor, and one bill per vendor. A gateway puts them behind one endpoint.

Direct calls Through APIMart gateway
Keys one per vendor one key
Model switch rewrite code change model string
Failure handling per-vendor unified retry + fallback
Billing scattered one balance, one invoice
Rate limits per vendor pooled

OpenAI-compatible endpoint

from openai import OpenAI

client = OpenAI(base_url="https://api.apimart.ai/v1", api_key="YOUR_KEY")

img = client.images.generate(
    model="gpt-image-2.6-flare",
    prompt="editorial studio portrait, hard key light, grey backdrop",
    n=1,
)
print(img.data[0].url)

The request shape is identical to OpenAI's images.generate, so existing code keeps working — only base_url and model change.

Multi-model routing

MODELS = {
    "default":  "gpt-image-2.6-flare",
    "quality":  "gpt-image-2.6-sunburst",
    "cheap":    "z-image-turbo",
    "fallback": "seedream-5-0-flash",
}

def generate(prompt, tier="default"):
    try:
        return call(MODELS[tier], prompt)
    except RateLimited:
        return call(MODELS["fallback"], prompt)

What to watch

  • Async by default — poll task_id, do not block on the HTTP call
  • Final cost is in data.cost, not the estimate shown at submit time
  • Same key across models — no need to rotate when switching vendors

Related

License

CC BY 4.0

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

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