Obiguard allows you to make text-to-image requests using the OpenAI-compatible API signature.
Python SDK
OpenAI Python
cURL
from obiguard import Obiguardclient = Obiguard( provider='openai', base_url='https://gateway.obiguard.ai/v1', obiguard_api_key='ak***', # Your Obiguard access key here)response = client.images.generate( prompt="A beautiful sunset over the mountains", n=1, size="1024x1024")
from openai import OpenAIfrom obiguard import createHeadersclient = OpenAI( base_url='https://gateway.obiguard.ai/v1', api_key='sk-***', # Your OpenAI API key here default_headers=createHeaders( provider="openai", api_key="ak***", # Your Obiguard access key here ))response = client.images.generate( prompt="A beautiful sunset over the mountains", n=1, size="1024x1024")
curl "https://gateway.obiguard.ai/v1/images/generations" \-H "Content-Type: application/json" \-H "x-obiguard-api-key: $OBIGUARD_API_KEY" \-d '{ "model": "dall-e-3", "prompt": "Lucy in the sky with diamonds"}'
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Obiguard","colors":{"primary":"#FF0000","light":"#FF0000","dark":"#000000"},"logo":{"light":"https://mintcdn.com/obiguard/6-cQ3lB4v5Qo2tS-/logo/brand-obiguard-light.png?fit=max\u0026auto=format\u0026n=6-cQ3lB4v5Qo2tS-\u0026q=85\u0026s=7f26932acafd8568c72a25c5458ff7b9","dark":"https://mintcdn.com/obiguard/6-cQ3lB4v5Qo2tS-/logo/brand-obiguard-dark.png?fit=max\u0026auto=format\u0026n=6-cQ3lB4v5Qo2tS-\u0026q=85\u0026s=a8a778ee9d037ca897664a320f65c222"},"favicon":{"light":"https://mintcdn.com/obiguard/1Nx7oPvMompXEA4c/images/favicon-light.svg?fit=max\u0026auto=format\u0026n=1Nx7oPvMompXEA4c\u0026q=85\u0026s=1c526122a05adaacc78acf0dfa8c396f","dark":"https://mintcdn.com/obiguard/1Nx7oPvMompXEA4c/images/favicon-dark.svg?fit=max\u0026auto=format\u0026n=1Nx7oPvMompXEA4c\u0026q=85\u0026s=7bacca52a1837f6a712b5196d1a40229"},"navbar":{"links":[{"href":"mailto:support@obiguard.com","label":"Support"},{"href":"https://app.obiguard.ai","label":"Go to Dashboard"}],"primary":{"type":"button","label":"Back to Obiguard.AI","href":"https://obiguard.ai"}},"footer":{"socials":{"x":"https://x.com/ObiguardAI","github":"https://github.com/obiguard","linkedin":"https://linkedin.com/company/obiguard"}},"integrations":{"ga4":{"measurementId":"G-7SDXP83MGF"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"obiguard","hasAudioNarration":false,"actualSubdomain":"obiguard","customDomains":["docs.obiguard.ai"],"gitSource":{"type":"github","owner":"obiguard","repo":"obiguard-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae352a8096333fd0dad261d","clientVersion":"0.0.4117","searchFilterCounts":[{"language":"default","tag":"Integrations","count":51},{"language":"default","tag":"LLMs","count":39},{"language":"default","tag":"Documentation","count":24},{"language":"default","tag":"More","count":21},{"language":"default","tag":"Features","count":19},{"language":"default","tag":"Inference API","count":17},{"language":"default","tag":"AI Gateway","count":11},{"language":"default","tag":"Agents","count":7},{"language":"default","tag":"Multimodal Capabilities","count":6},{"language":"default","tag":"White Papers","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"gateway/multimodal-capabilities/image-generation","slug":"/gateway/multimodal-capabilities/image-generation","pageMetadata":{"title":"Image Generation","description":"Obiguard AI gateway enables image generation features provided by various foundational model vendors.","href":"/gateway/multimodal-capabilities/image-generation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Obiguard AI gateway enables image generation features provided by various foundational model vendors.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`A typical scenario is text-to-image generation, where a user provides a prompt that the image model interprets to produce an image.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`You can find the vision models `,_jsx(_components.a,{href:`vision`,children:`guide here`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`text-to-image-generation`,children:`Text-to-Image Generation`}),`\n`,_jsx(_components.p,{children:`Obiguard allows you to make text-to-image requests using the OpenAI-compatible API signature.`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Python SDK`,id:`python-sdk`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` obiguard `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Obiguard`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client = Obiguard(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` provider=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'openai'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` base_url=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://gateway.obiguard.ai/v1'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` obiguard_api_key=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ak***'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Your Obiguard access key here`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response = client.images.generate(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prompt=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A beautiful sunset over the mountains\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` n=1,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` size=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1024x1024\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})}),_jsx(Tab,{title:`OpenAI Python`,id:`openai-python`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` obiguard `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` createHeaders`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client = OpenAI(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` base_url=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://gateway.obiguard.ai/v1'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` api_key=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'sk-***'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Your OpenAI API key here`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` default_headers=createHeaders(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` provider=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` api_key=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ak***\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Your Obiguard access key here`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response = client.images.generate(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prompt=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A beautiful sunset over the mountains\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` n=1,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` size=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1024x1024\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})}),_jsx(Tab,{title:`cURL`,id:`curl`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`curl \"https://gateway.obiguard.ai/v1/images/generations\" \\\\`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`-H \"Content-Type: application/json\" \\\\`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`-H \"x-obiguard-api-key: $OBIGUARD_API_KEY\" \\\\`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`-d '{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"model\": \"dall-e-3\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"prompt\": \"Lucy in the sky with diamonds\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`}'`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Image Generation","description":"Obiguard AI gateway enables image generation features provided by various foundational model vendors.","href":"/gateway/multimodal-capabilities/image-generation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Text-to-Image Generation","slug":"text-to-image-generation","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"obiguard","siteName":"Obiguard","title":"Image Generation - Obiguard","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T14:05:50.111Z","originalFileLocation":"gateway/multimodal-capabilities/image-generation.mdx"},"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=\"Obiguard AI gateway enables image generation features provided by various foundational model vendors.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Obiguard\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_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=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Image Generation - Obiguard\">\u003cmeta data-mint-head property=\"og:description\" content=\"Obiguard AI gateway enables image generation features provided by various foundational model vendors.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Obiguard\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://obiguard.mintlify.site/_mintlify/api/og/v2?division=Multimodal+Capabilities\u0026amp;title=Image+Generation\u0026amp;description=Obiguard+AI+gateway+enables+image+generation+features+provided+by+various+foundational+model+vendors.\u0026amp;theme=17af59e946014cd64216eecb\u0026amp;signature=136dac982045a718674d99ba438f3b2b94bf0c9e6bc4195a5771ffd03817b7fa\">\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=\"Image Generation - Obiguard\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Obiguard AI gateway enables image generation features provided by various foundational model vendors.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://obiguard.mintlify.site/_mintlify/api/og/v2?division=Multimodal+Capabilities\u0026amp;title=Image+Generation\u0026amp;description=Obiguard+AI+gateway+enables+image+generation+features+provided+by+various+foundational+model+vendors.\u0026amp;theme=17af59e946014cd64216eecb\u0026amp;signature=136dac982045a718674d99ba438f3b2b94bf0c9e6bc4195a5771ffd03817b7fa\">\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=\"/mintlify-assets/_mintlify/favicons/obiguard/M77CZY2YRN4sv4Z3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Obiguard\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF0000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/gateway/multimodal-capabilities/image-generation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.obiguard.ai/#organization\",\"name\":\"Obiguard\",\"url\":\"https://docs.obiguard.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/obiguard/6-cQ3lB4v5Qo2tS-/logo/brand-obiguard-light.png?fit=max\u0026auto=format\u0026n=6-cQ3lB4v5Qo2tS-\u0026q=85\u0026s=7f26932acafd8568c72a25c5458ff7b9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.obiguard.ai#website\",\"name\":\"Obiguard\",\"url\":\"https://docs.obiguard.ai\",\"publisher\":{\"@id\":\"https://docs.obiguard.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation#webpage\",\"url\":\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation\",\"name\":\"Image Generation\",\"description\":\"Obiguard AI gateway enables image generation features provided by various foundational model vendors.\",\"dateModified\":\"2026-10-29T14:05:50.111Z\",\"isPartOf\":{\"@id\":\"https://docs.obiguard.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Features\",\"item\":\"https://docs.obiguard.ai/projects\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI Gateway\",\"item\":\"https://docs.obiguard.ai/gateway/AI-gateway\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Image Generation\",\"item\":\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation#article\",\"headline\":\"Image Generation\",\"name\":\"Image Generation\",\"description\":\"Obiguard AI gateway enables image generation features provided by various foundational model vendors.\",\"url\":\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.obiguard.ai/gateway/multimodal-capabilities/image-generation#webpage\"},\"dateModified\":\"2026-10-29T14:05:50.111Z\",\"publisher\":{\"@id\":\"https://docs.obiguard.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.obiguard.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Obiguard\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Obiguard\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/gateway/multimodal-capabilities/image-generation.md","siteName":"Obiguard","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Introduction","pages":[{"title":"What is Obiguard?","href":"/what-is-obiguard"},{"title":"Making Your First Request","href":"/making-your-first-request"},{"title":"Obiguard Features","href":"/features-overview"}]},{"group":"Features","pages":[{"title":"Projects","href":"/projects"},{"group":"Guardrails","pages":[{"title":"Guardrail Policies","href":"/guardrail-AI/guardrail-policies"},{"title":"Guardrail Validators","href":"/guardrail-AI/guardrail-validators"}]},{"title":"Access Keys","href":"/access-keys"},{"group":"Observability","pages":[{"title":"Observability","href":"/observability/overview"},{"title":"Logs","href":"/observability/logs"},{"title":"Tracing","href":"/observability/tracing"},{"title":"Analytics","href":"/observability/analytics"}]},{"group":"AI Gateway","pages":[{"title":"AI Gateway","href":"/gateway/AI-gateway"},{"title":"Universal API","href":"/gateway/universal-api"},{"title":"Realtime API","href":"/gateway/realtime-api"},{"title":"Remote MCP","href":"/gateway/remote-mcp"},{"title":"Strict OpenAI Compliance","description":"Obiguard ensures that all responses strictly adhere to the [OpenAI specification](https://platform.openai.com/docs/api-reference/chat/create) by default.","href":"/gateway/strict-open-ai-compliance"},{"group":"Multimodal Capabilities","pages":[{"title":"Image Generation","href":"/gateway/multimodal-capabilities/image-generation"},{"title":"Function Calling","description":"Obiguard’s AI Gateway enables function calling, allowing you to define functions in API requests. Supported models can respond with either plain text or a function name and its parameters.","href":"/gateway/multimodal-capabilities/function-calling"},{"title":"Vision","href":"/gateway/multimodal-capabilities/vision"},{"title":"Text-to-Speech","href":"/gateway/multimodal-capabilities/text-to-speech"},{"title":"Speech-to-Text","href":"/gateway/multimodal-capabilities/speech-to-text"},{"title":"Thinking Mode","href":"/gateway/multimodal-capabilities/thinking-mode"}]}]}]},{"group":"Support","pages":[{"title":"Contact Us","href":"/support/contact-us"},{"title":"Common Errors and Resolutions","href":"/support/common-errors-and-resolutions"}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/ecosystem"}]},{"tab":"Inference API","pages":[{"title":"Inference API","href":"/api-reference/inference-api/introduction"}]},{"tab":"White Papers","pages":[{"title":"White Papers","href":"/white-papers/our-white-paper"}]}]},"basePath":"","title":"Image Generation - Obiguard","buildId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","deploymentId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","dynamics":[],"chunks":[]}