curl --request POST \ --url https://api.omnirelay.ai/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-image-2", "prompt": "A red bicycle on a white background"}'
import requests
url = "https://api.omnirelay.ai/v1/images/generations"
payload = {
"model": "gpt-image-2",
"prompt": "A red bicycle on a white background"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'gpt-image-2', prompt: 'A red bicycle on a white background'})
};
fetch('https://api.omnirelay.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested size: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or auto size is billed as 2K. Quality does not change the price. n images are reserved before the call and only the images returned are charged. Images are returned as b64_json only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.
POST
/
v1
/
images
/
generations
Create images
curl --request POST \ --url https://api.omnirelay.ai/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "gpt-image-2", "prompt": "A red bicycle on a white background"}'
import requests
url = "https://api.omnirelay.ai/v1/images/generations"
payload = {
"model": "gpt-image-2",
"prompt": "A red bicycle on a white background"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'gpt-image-2', prompt: 'A red bicycle on a white background'})
};
fetch('https://api.omnirelay.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
Tags for this call as comma-separated key=value pairs, for example client=acme,env=prod. Merged with the API key's default tags; the tags body field wins on the same key. X-OmniRelay-Tags is the same header under its former name and stays accepted.
Send enabled to receive a gateway_metadata block describing what the gateway decided. Any other value, or no header, leaves the response unchanged. X-OmniRelay-Metadata is the same header under its former name and stays accepted.
Available options:
enabled
Body
application/json
Other fields (background, output_format, output_compression, moderation, user) are passed to the model, which accepts or refuses them.
Present only when the request sent X-Gateway-Metadata: enabled. Returned under both gateway_metadata and its former name omnirelay_metadata, with the same content. On a stream it rides the first chunk.
Present only when the request sent X-Gateway-Metadata: enabled. Returned under both gateway_metadata and its former name omnirelay_metadata, with the same content. On a stream it rides the first chunk.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OmniRelay Documentation","description":"One OpenAI-compatible API for every model: keys, routing, usage and billing in one gateway.","colors":{"primary":"#3155f5","light":"#7d95ff","dark":"#3155f5"},"logo":{"light":"https://mintcdn.com/mirvos/m9J_0EZqJ57fDiaC/logo.svg?fit=max\u0026auto=format\u0026n=m9J_0EZqJ57fDiaC\u0026q=85\u0026s=ca602e0318071154028ed8989c7110cc","dark":"https://mintcdn.com/mirvos/m9J_0EZqJ57fDiaC/logo.svg?fit=max\u0026auto=format\u0026n=m9J_0EZqJ57fDiaC\u0026q=85\u0026s=ca602e0318071154028ed8989c7110cc","href":"https://omnirelay.ai"},"favicon":"https://mintcdn.com/mirvos/m9J_0EZqJ57fDiaC/favicon.svg?fit=max\u0026auto=format\u0026n=m9J_0EZqJ57fDiaC\u0026q=85\u0026s=87700ecee580e455626d4376f120e405","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript"]}},"appearance":{"default":"system"},"navbar":{"links":[{"href":"https://omnirelay.ai","label":"Website"},{"href":"https://omnirelay.instatus.com","label":"Status"}],"primary":{"type":"button","label":"Open Console","href":"https://omnirelay.ai/login"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","href":""},{"language":"cn","navbar":{"links":[{"href":"https://omnirelay.ai","label":"官网"},{"href":"https://omnirelay.instatus.com","label":"服务状态"}],"primary":{"type":"button","label":"打开控制台","href":"https://omnirelay.ai/login"}},"href":"cn"},{"language":"es","navbar":{"links":[{"href":"https://omnirelay.ai","label":"Sitio web"},{"href":"https://omnirelay.instatus.com","label":"Estado"}],"primary":{"type":"button","label":"Abrir consola","href":"https://omnirelay.ai/login"}},"href":"es/user-manual"},{"language":"fr","navbar":{"links":[{"href":"https://omnirelay.ai","label":"Site web"},{"href":"https://omnirelay.instatus.com","label":"État du service"}],"primary":{"type":"button","label":"Ouvrir la console","href":"https://omnirelay.ai/login"}},"href":"fr/user-manual"},{"language":"de","navbar":{"links":[{"href":"https://omnirelay.ai","label":"Website"},{"href":"https://omnirelay.instatus.com","label":"Dienststatus"}],"primary":{"type":"button","label":"Konsole öffnen","href":"https://omnirelay.ai/login"}},"href":"de/user-manual"},{"language":"pt-BR","navbar":{"links":[{"href":"https://omnirelay.ai","label":"Site"},{"href":"https://omnirelay.instatus.com","label":"Status"}],"primary":{"type":"button","label":"Abrir console","href":"https://omnirelay.ai/login"}},"href":"pt-BR/user-manual"},{"language":"jp","navbar":{"links":[{"href":"https://omnirelay.ai","label":"ウェブサイト"},{"href":"https://omnirelay.instatus.com","label":"サービス状況"}],"primary":{"type":"button","label":"コンソールを開く","href":"https://omnirelay.ai/login"}},"href":"jp/user-manual"},{"language":"ko","navbar":{"links":[{"href":"https://omnirelay.ai","label":"웹사이트"},{"href":"https://omnirelay.instatus.com","label":"서비스 상태"}],"primary":{"type":"button","label":"콘솔 열기","href":"https://omnirelay.ai/login"}},"href":"ko/user-manual"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mirvos","hasAudioNarration":false,"actualSubdomain":"mirvos","customDomains":["omnirelay.ai"],"gitSource":{"type":"github","owner":"mirvos-ai","repo":"omnirelay-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6aea0b3298ee2cfbfea93cfe","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"cn","tag":"V1 文档","count":24},{"language":"en","tag":"V1 Documentation","count":24},{"language":"cn","tag":"V1 API 参考","count":18},{"language":"en","tag":"V1 API Reference","count":18},{"language":"cn","tag":"管理 API","count":9},{"language":"en","tag":"Management","count":9},{"language":"cn","tag":"通用","count":8},{"language":"en","tag":"General","count":8},{"language":"cn","tag":"LLM","count":4},{"language":"cn","tag":"视频","count":4},{"language":"en","tag":"LLMs","count":4},{"language":"en","tag":"Videos","count":4},{"language":"cn","tag":"图片","count":3},{"language":"cn","tag":"概览","count":3},{"language":"cn","tag":"快速开始","count":3},{"language":"de","tag":"V1-Dokumentation","count":3},{"language":"es","tag":"Documentación V1","count":3},{"language":"fr","tag":"Documentation V1","count":3},{"language":"en","tag":"Images","count":3},{"language":"en","tag":"Overview","count":3},{"language":"en","tag":"Quick Start","count":3},{"language":"jp","tag":"V1 ドキュメント","count":3},{"language":"ko","tag":"V1 문서","count":3},{"language":"pt-BR","tag":"Documentação V1","count":3},{"language":"de","tag":"Allgemein","count":2},{"language":"es","tag":"General","count":2},{"language":"fr","tag":"Général","count":2},{"language":"jp","tag":"一般","count":2},{"language":"ko","tag":"일반","count":2},{"language":"pt-BR","tag":"Geral","count":2},{"language":"cn","tag":"用户手册","count":1},{"language":"de","tag":"Benutzerhandbuch","count":1},{"language":"es","tag":"Manual de usuario","count":1},{"language":"fr","tag":"Guide utilisateur","count":1},{"language":"en","tag":"User manual","count":1},{"language":"jp","tag":"ユーザーマニュアル","count":1},{"language":"ko","tag":"사용자 매뉴얼","count":1},{"language":"pt-BR","tag":"Manual do usuário","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/images/create-images","slug":"/api-reference/images/create-images","pageMetadata":{"title":"Create images","description":"Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested `size`: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or `auto` size is billed as 2K. Quality does not change the price. `n` images are reserved before the call and only the images returned are charged. Images are returned as `b64_json` only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/images/generations","href":"/api-reference/images/create-images","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested \", _jsx(_components.code, {\n children: \"size\"\n }), \": longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or \", _jsx(_components.code, {\n children: \"auto\"\n }), \" size is billed as 2K. Quality does not change the price. \", _jsx(_components.code, {\n children: \"n\"\n }), \" images are reserved before the call and only the images returned are charged. Images are returned as \", _jsx(_components.code, {\n children: \"b64_json\"\n }), \" only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create images","description":"Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested `size`: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or `auto` size is billed as 2K. Quality does not change the price. `n` images are reserved before the call and only the images returned are charged. Images are returned as `b64_json` only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/images/generations","href":"/api-reference/images/create-images","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Images"],"summary":"Create images","description":"Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested `size`: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or `auto` size is billed as 2K. Quality does not change the price. `n` images are reserved before the call and only the images returned are charged. Images are returned as `b64_json` only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.","operationId":"createImage","parameters":["a221abd0-c5f8-47fe-a37d-dc7f8b661f23","5d5356b6-f987-43eb-93ef-37407dac4abf"],"requestBody":"d467a705-5201-458e-98d5-58df67ae41e3","responses":{"200":"29ac3c4e-d26d-4c0e-a7f1-324ef3222215","400":"2a42bb39-fa6c-4c3c-834a-0b048785771e","401":"d3d461a6-ad6c-43a2-a163-1993433ca6e7","402":"35b3e1d4-f4fe-4977-bcf1-0c24a5f3bcf1","403":"e94fd01b-ee81-4bc3-a2e7-f94a25f5fc2c","404":"75b86cc0-29e9-4fec-845e-4d18b689741b","413":"fc878fb4-8c38-4256-bcb7-9cdafd705d9b","429":"23b63360-b51e-45fb-a4e2-3e1ac2ed5302","502":"6e822ec3-5cdc-467f-97c5-fa2f73fdd9bf","503":"775eda7b-500d-4f4e-a686-7b2071b5387d","504":"caddb78c-be62-4928-ba2d-c27898628c8f"},"method":"post","type":"path","servers":["8343319b-fc64-466b-b314-1aa49367d633"],"security":["0cfd7c8d-004d-4e0d-96de-988610dc14a3"],"path":"/v1/images/generations","baseUrlOptions":["https://api.omnirelay.ai"],"title":"Create images","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"a221abd0-c5f8-47fe-a37d-dc7f8b661f23":{"name":"X-Gateway-Tags","in":"header","required":false,"description":"Tags for this call as comma-separated `key=value` pairs, for example `client=acme,env=prod`. Merged with the API key's default tags; the `tags` body field wins on the same key. `X-OmniRelay-Tags` is the same header under its former name and stays accepted.","schema":{"type":"string","isRequired":false,"description":"Tags for this call as comma-separated `key=value` pairs, for example `client=acme,env=prod`. Merged with the API key's default tags; the `tags` body field wins on the same key. `X-OmniRelay-Tags` is the same header under its former name and stays accepted.","uniqueKey":"","typeLabel":"string"},"example":"client=acme,env=prod"},"5d5356b6-f987-43eb-93ef-37407dac4abf":{"name":"X-Gateway-Metadata","in":"header","required":false,"description":"Send `enabled` to receive a `gateway_metadata` block describing what the gateway decided. Any other value, or no header, leaves the response unchanged. `X-OmniRelay-Metadata` is the same header under its former name and stays accepted.","schema":{"type":"string","enum":["enabled"],"isRequired":false,"description":"Send `enabled` to receive a `gateway_metadata` block describing what the gateway decided. Any other value, or no header, leaves the response unchanged. `X-OmniRelay-Metadata` is the same header under its former name and stays accepted.","uniqueKey":"","typeLabel":"enum\u003cstring>"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"description":"Other fields (`background`, `output_format`, `output_compression`, `moderation`, `user`) are passed to the model, which accepts or refuses them.","properties":{"model":{"type":"string","description":"Image model ID, for example `gpt-image-2`.","example":"gpt-image-2","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"prompt":{"type":"string","maxLength":32000,"description":"Text description of the image, up to 32000 characters.","isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"n":{"type":"integer","minimum":1,"maximum":4,"default":1,"description":"Number of images, 1 to the model limit (4). n images are reserved; only the images returned are charged.","uniqueKey":"n","typeLabel":"integer"},"size":{"type":"string","default":"auto","example":"1024x1024","description":"`WIDTHxHEIGHT` or `auto`. Decides the price tier: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; `auto` or omitted is 2K.","uniqueKey":"size","typeLabel":"string"},"quality":{"type":"string","description":"Passed to the model, for example `low`, `medium`, `high` or `auto`. Does not change the price.","uniqueKey":"quality","typeLabel":"string"},"response_format":{"type":"string","enum":["b64_json"],"description":"Only `b64_json` is supported.","uniqueKey":"response_format","typeLabel":"enum\u003cstring>"},"tags":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"tags.additionalProperties","typeLabel":"string"},"description":"Optional OmniRelay tags object, removed before the call.","uniqueKey":"tags","typeLabel":"object"}},"additionalProperties":true,"uniqueKey":"","typeLabel":"object"},"example":{"model":"gpt-image-2","prompt":"A red bicycle on a white background","size":"1024x1024","quality":"low"},"examples":{"Example":{"title":"Example","value":{"model":"gpt-image-2","prompt":"A red bicycle on a white background","size":"1024x1024","quality":"low"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"29ac3c4e-d26d-4c0e-a7f1-324ef3222215":{"description":"Images with settled usage and cost.","headers":{"X-Request-ID":{"description":"OmniRelay request ID for diagnostics. It is separate from the provider trace, header and response IDs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["created","data","model","cost_microusd"],"properties":{"created":{"type":"integer","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"data":{"type":"array","description":"Generated images.","items":{"type":"object","required":["b64_json"],"properties":{"b64_json":{"type":"string","description":"Base64-encoded image.","isRequired":true,"uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string"},"revised_prompt":{"type":"string","uniqueKey":"data.items.[INDEX].revised_prompt","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"data","typeLabel":"object[]"},"cost_microusd":{"type":"integer","description":"Charged amount in micro-USD after your discount.","isRequired":true,"uniqueKey":"cost_microusd","typeLabel":"integer"},"background":{"type":"string","uniqueKey":"background","typeLabel":"string"},"output_format":{"type":"string","uniqueKey":"output_format","typeLabel":"string"},"quality":{"type":"string","uniqueKey":"quality","typeLabel":"string"},"size":{"type":"string","uniqueKey":"size","typeLabel":"string"},"usage":{"type":"object","description":"Token counts reported by the model, for information; images are billed per image, not per token.","additionalProperties":true,"uniqueKey":"usage","typeLabel":"object"},"omnirelay_metadata":{"type":"object","description":"Present only when the request sent `X-Gateway-Metadata: enabled`. Returned under both `gateway_metadata` and its former name `omnirelay_metadata`, with the same content. On a stream it rides the first chunk.","properties":{"request_id":{"type":"string","description":"The request ID, as in `X-Request-ID`.","uniqueKey":"omnirelay_metadata.request_id","typeLabel":"string"},"requested":{"type":"string","description":"The model ID you sent.","uniqueKey":"omnirelay_metadata.requested","typeLabel":"string"},"model":{"type":"string","description":"The model that served the call.","uniqueKey":"omnirelay_metadata.model","typeLabel":"string"},"provider":{"type":"string","description":"The provider of that model.","uniqueKey":"omnirelay_metadata.provider","typeLabel":"string"},"mode":{"type":"string","enum":["live"],"description":"live: a real provider was called.","uniqueKey":"omnirelay_metadata.mode","typeLabel":"enum\u003cstring>"},"strategy":{"type":"string","enum":["direct"],"description":"How the model was resolved. Every model has one channel today, so this is always `direct`.","uniqueKey":"omnirelay_metadata.strategy","typeLabel":"enum\u003cstring>"},"attempt":{"type":"integer","description":"1-based position of the attempt that served. Always 1 until fallback exists.","uniqueKey":"omnirelay_metadata.attempt","typeLabel":"integer"},"attempts":{"type":"array","description":"Every attempt made, in order.","items":{"type":"object","properties":{"provider":{"type":"string","uniqueKey":"omnirelay_metadata.attempts.items.[INDEX].provider","typeLabel":"string"},"model":{"type":"string","uniqueKey":"omnirelay_metadata.attempts.items.[INDEX].model","typeLabel":"string"},"mode":{"type":"string","uniqueKey":"omnirelay_metadata.attempts.items.[INDEX].mode","typeLabel":"string"}},"uniqueKey":"omnirelay_metadata.attempts.items.[INDEX]","typeLabel":"object"},"uniqueKey":"omnirelay_metadata.attempts","typeLabel":"object[]"},"tags":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"omnirelay_metadata.tags.additionalProperties","typeLabel":"string"},"description":"The tags recorded for this call, or `{}`.","uniqueKey":"omnirelay_metadata.tags","typeLabel":"object"},"deprecated_header":{"type":"string","description":"Present when the request sent an old-style header (`X-OmniRelay-Tags` or `X-OmniRelay-Metadata`) together with its new name carrying a different value: names the old header that was ignored.","uniqueKey":"omnirelay_metadata.deprecated_header","typeLabel":"string"}},"uniqueKey":"omnirelay_metadata","typeLabel":"object"},"gateway_metadata":{"type":"object","description":"Present only when the request sent `X-Gateway-Metadata: enabled`. Returned under both `gateway_metadata` and its former name `omnirelay_metadata`, with the same content. On a stream it rides the first chunk.","properties":{"request_id":{"type":"string","description":"The request ID, as in `X-Request-ID`.","uniqueKey":"gateway_metadata.request_id","typeLabel":"string"},"requested":{"type":"string","description":"The model ID you sent.","uniqueKey":"gateway_metadata.requested","typeLabel":"string"},"model":{"type":"string","description":"The model that served the call.","uniqueKey":"gateway_metadata.model","typeLabel":"string"},"provider":{"type":"string","description":"The provider of that model.","uniqueKey":"gateway_metadata.provider","typeLabel":"string"},"mode":{"type":"string","enum":["live"],"description":"live: a real provider was called.","uniqueKey":"gateway_metadata.mode","typeLabel":"enum\u003cstring>"},"strategy":{"type":"string","enum":["direct"],"description":"How the model was resolved. Every model has one channel today, so this is always `direct`.","uniqueKey":"gateway_metadata.strategy","typeLabel":"enum\u003cstring>"},"attempt":{"type":"integer","description":"1-based position of the attempt that served. Always 1 until fallback exists.","uniqueKey":"gateway_metadata.attempt","typeLabel":"integer"},"attempts":{"type":"array","description":"Every attempt made, in order.","items":{"type":"object","properties":{"provider":{"type":"string","uniqueKey":"gateway_metadata.attempts.items.[INDEX].provider","typeLabel":"string"},"model":{"type":"string","uniqueKey":"gateway_metadata.attempts.items.[INDEX].model","typeLabel":"string"},"mode":{"type":"string","uniqueKey":"gateway_metadata.attempts.items.[INDEX].mode","typeLabel":"string"}},"uniqueKey":"gateway_metadata.attempts.items.[INDEX]","typeLabel":"object"},"uniqueKey":"gateway_metadata.attempts","typeLabel":"object[]"},"tags":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"gateway_metadata.tags.additionalProperties","typeLabel":"string"},"description":"The tags recorded for this call, or `{}`.","uniqueKey":"gateway_metadata.tags","typeLabel":"object"},"deprecated_header":{"type":"string","description":"Present when the request sent an old-style header (`X-OmniRelay-Tags` or `X-OmniRelay-Metadata`) together with its new name carrying a different value: names the old header that was ignored.","uniqueKey":"gateway_metadata.deprecated_header","typeLabel":"string"}},"uniqueKey":"gateway_metadata","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"created":123,"model":"\u003cstring>","data":[{"b64_json":"\u003cstring>","revised_prompt":"\u003cstring>"}],"cost_microusd":123,"background":"\u003cstring>","output_format":"\u003cstring>","quality":"\u003cstring>","size":"\u003cstring>","usage":{},"omnirelay_metadata":{"request_id":"\u003cstring>","requested":"\u003cstring>","model":"\u003cstring>","provider":"\u003cstring>","mode":"live","strategy":"direct","attempt":123,"attempts":[{"provider":"\u003cstring>","model":"\u003cstring>","mode":"\u003cstring>"}],"tags":{},"deprecated_header":"\u003cstring>"},"gateway_metadata":{"request_id":"\u003cstring>","requested":"\u003cstring>","model":"\u003cstring>","provider":"\u003cstring>","mode":"live","strategy":"direct","attempt":123,"attempts":[{"provider":"\u003cstring>","model":"\u003cstring>","mode":"\u003cstring>"}],"tags":{},"deprecated_header":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"2a42bb39-fa6c-4c3c-834a-0b048785771e":{"description":"Invalid JSON, form or parameters (`response_format` other than `b64_json`, `stream`, an unknown `size`, `n` above the model limit), or a parameter the model refused. Nothing is charged.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"unsupported_parameter"},"request_id":"2f6c1d0e9a"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"unsupported_parameter"},"request_id":"2f6c1d0e9a"}}},"exampleType":"examples"}},"exampleType":"examples"},"d3d461a6-ad6c-43a2-a163-1993433ca6e7":{"description":"`unauthorized`: the API key is missing, revoked, or invalid.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"unauthorized"}},"examples":{"Example":{"title":"Example","value":{"error":{"code":"unauthorized"}}}},"exampleType":"examples"}},"exampleType":"examples"},"35b3e1d4-f4fe-4977-bcf1-0c24a5f3bcf1":{"description":"inference_budget_or_access_denied: wallet, key or platform budget cannot cover n images at the requested tier; member_budget_exceeded: member cap exceeded. Rejected before dispatch.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"inference_budget_or_access_denied"},"request_id":"2f6c1d0e9a"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"inference_budget_or_access_denied"},"request_id":"2f6c1d0e9a"}}},"exampleType":"examples"}},"exampleType":"examples"},"e94fd01b-ee81-4bc3-a2e7-f94a25f5fc2c":{"description":"`model_not_allowed`: the API key is limited to other models; `ip_not_allowed`. Nothing is charged.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"model_not_allowed"},"request_id":"2f6c1d0e9a"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"model_not_allowed"},"request_id":"2f6c1d0e9a"}}},"exampleType":"examples"}},"exampleType":"examples"},"75b86cc0-29e9-4fec-845e-4d18b689741b":{"description":"`model_unavailable`: the model is not an image model available to this workspace.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"model_unavailable"},"request_id":"2f6c1d0e9a"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"model_unavailable"},"request_id":"2f6c1d0e9a"}}},"exampleType":"examples"}},"exampleType":"examples"},"fc878fb4-8c38-4256-bcb7-9cdafd705d9b":{"description":"payload_too_large: the request body exceeds 20 MiB.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"payload_too_large"},"request_id":"2f6c1d0e9a"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"payload_too_large"},"request_id":"2f6c1d0e9a"}}},"exampleType":"examples"}},"exampleType":"examples"},"23b63360-b51e-45fb-a4e2-3e1ac2ed5302":{"description":"Rate or concurrency limit. Nothing is charged; retry after Retry-After seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"rate_limited"},"request_id":"2f6c1d0e9a"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"rate_limited"},"request_id":"2f6c1d0e9a"}}},"exampleType":"examples"}},"exampleType":"examples"},"6e822ec3-5cdc-467f-97c5-fa2f73fdd9bf":{"description":"`upstream_rejected`: the provider refused the call; nothing is charged. `image_call_held`: a dropped connection, a provider server error or an answer that could not be verified; the call is held for review and charged only if the provider produced the images.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"image_call_held"},"request_id":"2f6c1d0e9a"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"image_call_held"},"request_id":"2f6c1d0e9a"}}},"exampleType":"examples"}},"exampleType":"examples"},"775eda7b-500d-4f4e-a686-7b2071b5387d":{"description":"Live access is not ready or paused. Nothing is sent or charged.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"live_provider_unavailable"},"request_id":"2f6c1d0e9a"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"live_provider_unavailable"},"request_id":"2f6c1d0e9a"}}},"exampleType":"examples"}},"exampleType":"examples"},"caddb78c-be62-4928-ba2d-c27898628c8f":{"description":"`image_call_held`: the call did not finish in time. It is held for review and charged only if the provider produced the images.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","type"],"properties":{"code":{"type":"string","example":"model_unavailable","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"The model does not exist or is disabled.","description":"Short English description for logs and SDK exceptions. Its wording can change; branch on code.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","example":"not_found_error","description":"Error family by HTTP status: invalid_request_error, authentication_error, insufficient_quota, permission_error, not_found_error, conflict_error, rate_limit_error, service_unavailable or api_error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"type":"string","maxLength":200,"description":"Rejected request field path when identifiable; never a parameter value. Responses uses native field names.","uniqueKey":"error.param","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"Present on chat completion, Responses and embeddings errors.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":"image_call_held"},"request_id":"2f6c1d0e9a"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"image_call_held"},"request_id":"2f6c1d0e9a"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"0cfd7c8d-004d-4e0d-96de-988610dc14a3":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key created in the OmniRelay console. The owner can view it again in the console after confirming their identity.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"8343319b-fc64-466b-b314-1aa49367d633":{"url":"https://api.omnirelay.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An API key created in the OmniRelay console. The owner can view it again in the console after confirming their identity.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An API key created in the OmniRelay console. The owner can view it again in the console after confirming their identity.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"mirvos","siteName":"OmniRelay Documentation","title":"Create images - OmniRelay Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/images/create-images","matchLevel":0},"cn":{"href":"/cn/api-reference/images/create-images","matchLevel":1},"es":{"href":"/es/user-manual","matchLevel":4},"fr":{"href":"/fr/user-manual","matchLevel":4},"de":{"href":"/de/user-manual","matchLevel":4},"pt-BR":{"href":"/pt-BR/user-manual","matchLevel":4},"jp":{"href":"/jp/user-manual","matchLevel":4},"ko":{"href":"/ko/user-manual","matchLevel":4}}},"lastModified":"2026-11-02T19:46:13.813Z","originalFileLocation":"api-reference/images/create-images.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested size: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or auto size is billed as 2K. Quality does not change the price. n images are reserved before the call and only the images returned are charged. Images are returned as b64_json only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OmniRelay Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create images - OmniRelay Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested size: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or auto size is billed as 2K. Quality does not change the price. n images are reserved before the call and only the images returned are charged. Images are returned as b64_json only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OmniRelay Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://omnirelay.ai/docs/api-reference/images/create-images\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mirvos.mintlify.site/docs/_mintlify/api/og/v2?division=Images\u0026amp;title=Create+images\u0026amp;description=Generates+images+from+a+text+prompt+with+an+image+model+%28capabilities.image_generation%3Dtrue%29.+Billed+per+image+returned+at+the+tier+of+the+requested+%60size%60%3A+lon\u0026amp;theme=43c50d0778dfe81e3173fcea\u0026amp;signature=fe0057b05ac2898fa7893a0a536366a6c4561b25af0dadd52cc4c6ac7c86e770\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create images - OmniRelay Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested size: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or auto size is billed as 2K. Quality does not change the price. n images are reserved before the call and only the images returned are charged. Images are returned as b64_json only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mirvos.mintlify.site/docs/_mintlify/api/og/v2?division=Images\u0026amp;title=Create+images\u0026amp;description=Generates+images+from+a+text+prompt+with+an+image+model+%28capabilities.image_generation%3Dtrue%29.+Billed+per+image+returned+at+the+tier+of+the+requested+%60size%60%3A+lon\u0026amp;theme=43c50d0778dfe81e3173fcea\u0026amp;signature=fe0057b05ac2898fa7893a0a536366a6c4561b25af0dadd52cc4c6ac7c86e770\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/mirvos/6nifCMTl7rKBlB9L/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OmniRelay Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3155f5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://omnirelay.ai/docs/api-reference/images/create-images\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/images/create-images.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://omnirelay.ai/docs/api-reference/images/create-images\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://omnirelay.ai/docs/cn/api-reference/images/create-images\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://omnirelay.ai/docs/api-reference/images/create-images\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://omnirelay.ai/#organization\",\"name\":\"OmniRelay Documentation\",\"url\":\"https://omnirelay.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mirvos/m9J_0EZqJ57fDiaC/logo.svg?fit=max\u0026auto=format\u0026n=m9J_0EZqJ57fDiaC\u0026q=85\u0026s=ca602e0318071154028ed8989c7110cc\"}},{\"@type\":\"WebSite\",\"@id\":\"https://omnirelay.ai/docs#website\",\"name\":\"OmniRelay Documentation\",\"url\":\"https://omnirelay.ai/docs\",\"publisher\":{\"@id\":\"https://omnirelay.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://omnirelay.ai/docs/api-reference/images/create-images#webpage\",\"url\":\"https://omnirelay.ai/docs/api-reference/images/create-images\",\"name\":\"Create images\",\"description\":\"Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested size: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or auto size is billed as 2K. Quality does not change the price. n images are reserved before the call and only the images returned are charged. Images are returned as b64_json only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.\",\"dateModified\":\"2026-11-02T19:46:13.813Z\",\"isPartOf\":{\"@id\":\"https://omnirelay.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://omnirelay.ai/docs/api-reference/images/create-images#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://omnirelay.ai/docs/api-reference/images/create-images#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"OmniRelay Documentation\",\"item\":\"https://omnirelay.ai/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create images\",\"item\":\"https://omnirelay.ai/docs/api-reference/images/create-images\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://omnirelay.ai/docs/api-reference/images/create-images#apireference\",\"headline\":\"Create images\",\"name\":\"Create images\",\"description\":\"Generates images from a text prompt with an image model (capabilities.image_generation=true). Billed per image returned at the tier of the requested size: longest side up to 1024 px is 1K, up to 2048 px is 2K, up to 4096 px is 4K; an omitted or auto size is billed as 2K. Quality does not change the price. n images are reserved before the call and only the images returned are charged. Images are returned as b64_json only. A call that takes longer than about 25 seconds answers 200 at once and sends spaces until the JSON body follows; that body may then be an error object.\",\"url\":\"https://omnirelay.ai/docs/api-reference/images/create-images\",\"mainEntityOfPage\":{\"@id\":\"https://omnirelay.ai/docs/api-reference/images/create-images#webpage\"},\"dateModified\":\"2026-11-02T19:46:13.813Z\",\"publisher\":{\"@id\":\"https://omnirelay.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://omnirelay.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OmniRelay Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OmniRelay Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/images/create-images.md","siteName":"OmniRelay Documentation","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"V1 Documentation","pages":[{"title":"V1 Documentation","href":""}]},{"tab":"V1 API Reference","groups":[{"group":"Service","pages":[{"title":"Health check","deprecated":null,"version":null,"openapi":"/openapi.json get /health","href":"/api-reference/service/health-check"}]},{"group":"Models","pages":[{"title":"List models","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/models","href":"/api-reference/models/list-models"}]},{"group":"Chat","pages":[{"title":"Create chat completion","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/completions","href":"/api-reference/chat/create-chat-completion"}]},{"group":"Management","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/manage/keys","href":"/api-reference/management/list-api-keys"},{"title":"Create API key","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/manage/keys","href":"/api-reference/management/create-api-key"},{"title":"List key budgets","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/manage/keys/budgets","href":"/api-reference/management/list-key-budgets"},{"title":"Revoke API key","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/manage/keys/{id}","href":"/api-reference/management/revoke-api-key"},{"title":"Update API key","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/manage/keys/{id}","href":"/api-reference/management/update-api-key"},{"title":"Rotate API key","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/manage/keys/{id}/rotate","href":"/api-reference/management/rotate-api-key"},{"title":"Update key budget","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/manage/keys/{id}/budget","href":"/api-reference/management/update-key-budget"},{"title":"Read usage summary","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/manage/usage","href":"/api-reference/management/read-usage-summary"},{"title":"List request records","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/manage/requests","href":"/api-reference/management/list-request-records"}]},{"group":"Responses","pages":[{"title":"Create responses","deprecated":null,"version":null,"sidebarTitle":"Create responses","openapi":"/openapi.json post /v1/responses","href":"/api-reference/responses/create-response"}]},{"group":"Embeddings","pages":[{"title":"Create embeddings","description":"Input-only embeddings for models with capabilities.embeddings=true. No embedding model is currently enabled. A reviewed model, dimensions, aggregate input bound and input price are required before activation. Float vectors only; batch size and adjustable dimensions depend on the model.","deprecated":null,"version":null,"sidebarTitle":"Create embeddings","openapi":"/openapi.json post /v1/embeddings","href":"/api-reference/embeddings/create-embeddings"}]},{"group":"Images","pages":[{"title":"Create images","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/images/generations","href":"/api-reference/images/create-images"},{"title":"Edit images","description":"Edits or extends one or more uploaded images (multipart/form-data, fields `image` or `image[]`, optional `mask`). Billing, size tiers, `n`, `b64_json` output and the long-call behaviour are the same as Create images. The whole request may be up to 20 MiB.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/images/edits","href":"/api-reference/images/edit-images"}]},{"group":"Videos","pages":[{"title":"Create video task","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v3/contents/generations/tasks","href":"/api-reference/videos/create-video-task"},{"title":"Get video task","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v3/contents/generations/tasks/{id}","href":"/api-reference/videos/get-video-task"}]}]}]},{"language":"cn","navbar":{"links":[{"href":"https://omnirelay.ai","label":"官网"},{"href":"https://omnirelay.instatus.com","label":"服务状态"}],"primary":{"type":"button","label":"打开控制台","href":"https://omnirelay.ai/login"}},"pages":[{"title":"cn","href":"/cn/api-reference/images/create-images"}]},{"language":"es","navbar":{"links":[{"href":"https://omnirelay.ai","label":"Sitio web"},{"href":"https://omnirelay.instatus.com","label":"Estado"}],"primary":{"type":"button","label":"Abrir consola","href":"https://omnirelay.ai/login"}},"pages":[{"title":"es","href":"/es/user-manual"}]},{"language":"fr","navbar":{"links":[{"href":"https://omnirelay.ai","label":"Site web"},{"href":"https://omnirelay.instatus.com","label":"État du service"}],"primary":{"type":"button","label":"Ouvrir la console","href":"https://omnirelay.ai/login"}},"pages":[{"title":"fr","href":"/fr/user-manual"}]},{"language":"de","navbar":{"links":[{"href":"https://omnirelay.ai","label":"Website"},{"href":"https://omnirelay.instatus.com","label":"Dienststatus"}],"primary":{"type":"button","label":"Konsole öffnen","href":"https://omnirelay.ai/login"}},"pages":[{"title":"de","href":"/de/user-manual"}]},{"language":"pt-BR","navbar":{"links":[{"href":"https://omnirelay.ai","label":"Site"},{"href":"https://omnirelay.instatus.com","label":"Status"}],"primary":{"type":"button","label":"Abrir console","href":"https://omnirelay.ai/login"}},"pages":[{"title":"pt-BR","href":"/pt-BR/user-manual"}]},{"language":"jp","navbar":{"links":[{"href":"https://omnirelay.ai","label":"ウェブサイト"},{"href":"https://omnirelay.instatus.com","label":"サービス状況"}],"primary":{"type":"button","label":"コンソールを開く","href":"https://omnirelay.ai/login"}},"pages":[{"title":"jp","href":"/jp/user-manual"}]},{"language":"ko","navbar":{"links":[{"href":"https://omnirelay.ai","label":"웹사이트"},{"href":"https://omnirelay.instatus.com","label":"서비스 상태"}],"primary":{"type":"button","label":"콘솔 열기","href":"https://omnirelay.ai/login"}},"pages":[{"title":"ko","href":"/ko/user-manual"}]}]},"basePath":"","title":"Create images - OmniRelay Documentation","buildId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","deploymentId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CASS2Vpq.js","utils-4k9fyWRu.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-UU-UueZb.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BgJ0LOYq.js","snippetPresets-CMgzlMR-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BzEJegkK.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CZuQIZdk.js","shallow-Bw5arfMA.js","getApiPlaygroundDisplay-Ds834aVN.js","CodeSnippet-CKzmjw9L.js","CodeSnippets-BRpgomdp.js","Page-DvEUoD2H.js","getPastedJson-B0N-Tn76.js","icon-DASMs9nC.js","MethodPill-BA6DBLqx.js","DuplicateIcon-BMT5qfbJ.js","createIcon-CNfwVWPx.js","DynamicMarkdown-JYyBNlrJ.js","SectionHeading-BbZnmz8a.js","axios-vUo_bRtp.js","Markdown-LUU0YLpA.js","clsx-Di4ek5Ae.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-VEVWQCR4.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CPszyu99.js"]}