Add GPT Image 1.5 model and cost mapping

This commit is contained in:
jelveh
2025-12-16 15:55:33 -08:00
parent a3bcc488de
commit 49ab36d8be
2 changed files with 30 additions and 1 deletions

View File

@@ -19,6 +19,17 @@ export const OPENAI_IMAGE_COST_MAP = {
'openai:dall-e-2:512x512': toMicroCents(0.018), // $0.018
'openai:dall-e-2:256x256': toMicroCents(0.016), // $0.016
// gpt-image-1.5
'openai:gpt-image-1.5:low:1024x1024': toMicroCents(0.009),
'openai:gpt-image-1.5:low:1024x1536': toMicroCents(0.013),
'openai:gpt-image-1.5:low:1536x1024': toMicroCents(0.013),
'openai:gpt-image-1.5:medium:1024x1024': toMicroCents(0.034),
'openai:gpt-image-1.5:medium:1024x1536': toMicroCents(0.051),
'openai:gpt-image-1.5:medium:1536x1024': toMicroCents(0.05),
'openai:gpt-image-1.5:high:1024x1024': toMicroCents(0.133),
'openai:gpt-image-1.5:high:1024x1536': toMicroCents(0.20),
'openai:gpt-image-1.5:high:1536x1024': toMicroCents(0.199),
// gpt-image-1
'openai:gpt-image-1:low:1024x1024': toMicroCents(0.011),
'openai:gpt-image-1:low:1024x1536': toMicroCents(0.016),

View File

@@ -1,7 +1,25 @@
import { IImageModel } from '../types';
export const OPEN_AI_IMAGE_GENERATION_MODELS: IImageModel[] = [
{ id: 'gpt-image-1.5',
name: 'GPT Image 1.5',
version: '1.5',
costs_currency: 'usd-cents',
index_cost_key: 'low:1024x1024',
costs: {
'low:1024x1024': 0.9,
'low:1024x1536': 1.3,
'low:1536x1024': 1.3,
'medium:1024x1024': 3.4,
'medium:1024x1536': 5.1,
'medium:1536x1024': 5,
'high:1024x1024': 13.3,
'high:1024x1536': 20,
'high:1536x1024': 19.9,
},
allowedQualityLevels: ['low', 'medium', 'high'],
allowedRatios: [{ w: 1024, h: 1024 }, { w: 1024, h: 1536 }, { w: 1536, h: 1024 }],
},
{ id: 'gpt-image-1-mini',
name: 'GPT Image 1 Mini',
version: '1.0',