curl --request POST \ --url https://secureai.hiperai.ai/api/external/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form 'prompt=A beautiful sunset over the ocean with mountains in the background, digital art style' \ --form image=@example-file \ --form smltp_policy=internal \ --form response_format=url \ --form size=1024x1024 \ --form n=1
import requests
url = "https://secureai.hiperai.ai/api/external/images/generations"
files = { "image": ("example-file", open("example-file", "rb")) }
payload = {
"prompt": "A beautiful sunset over the ocean with mountains in the background, digital art style",
"smltp_policy": "internal",
"response_format": "url",
"size": "1024x1024",
"n": "1"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)
const form = new FormData();
form.append('prompt', 'A beautiful sunset over the ocean with mountains in the background, digital art style');
form.append('image', '<string>');
form.append('smltp_policy', 'internal');
form.append('response_format', 'url');
form.append('size', '1024x1024');
form.append('n', '1');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://secureai.hiperai.ai/api/external/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{ "success": true, "id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3", "object": "image.generation", "created": 1705312200, "data": [ { "url": "http://localhost:5173/uploads/secureai_image_api_68c5c6d2d57c85b102eb05e2_90d3756f_0.png", "revised_prompt": "A beautiful sunset over the ocean with mountains in the background, digital art style" } ], "metadata": { "model": "google/gemini-2.5-flash-image-preview", "provider": "Google", "total_images": 1, "is_image_to_image": false, "text_response": null, "smltp_trace_id": "trx-220eca66-5e3a-4a72-886b-e6ba8cde18a6", "smltp_bundle_id": "jti-bb850e61-fbfe-412a-8b0d-d180d4a36d22", "smltp_policy": "internal" }}
{
"success": false,
"error": "Invalid prompt",
"message": "Prompt is required and must be a non-empty string",
"request_id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3"
}
{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}
{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}
{
"success": false,
"error": "File too large",
"message": "Maximum image size is 10MB",
"request_id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3"
}
{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}
{
"success": false,
"error": "Service unavailable",
"message": "Image generation service is not configured",
"request_id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3"
}
Modelos y Generación AI
Generación de Imágenes
Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image.
All requests and responses are processed through SMLTP for security and compliance.
This endpoint supports:
Text-to-Image: Generate images from text descriptions
Image-to-Image: Transform or edit existing images (upload an image file)
All prompts and responses are automatically processed through SMLTP for audit logging and compliance.
POST
/
images
/
generations
Generate or Edit Images
curl --request POST \ --url https://secureai.hiperai.ai/api/external/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form 'prompt=A beautiful sunset over the ocean with mountains in the background, digital art style' \ --form image=@example-file \ --form smltp_policy=internal \ --form response_format=url \ --form size=1024x1024 \ --form n=1
import requests
url = "https://secureai.hiperai.ai/api/external/images/generations"
files = { "image": ("example-file", open("example-file", "rb")) }
payload = {
"prompt": "A beautiful sunset over the ocean with mountains in the background, digital art style",
"smltp_policy": "internal",
"response_format": "url",
"size": "1024x1024",
"n": "1"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)
const form = new FormData();
form.append('prompt', 'A beautiful sunset over the ocean with mountains in the background, digital art style');
form.append('image', '<string>');
form.append('smltp_policy', 'internal');
form.append('response_format', 'url');
form.append('size', '1024x1024');
form.append('n', '1');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://secureai.hiperai.ai/api/external/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{ "success": true, "id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3", "object": "image.generation", "created": 1705312200, "data": [ { "url": "http://localhost:5173/uploads/secureai_image_api_68c5c6d2d57c85b102eb05e2_90d3756f_0.png", "revised_prompt": "A beautiful sunset over the ocean with mountains in the background, digital art style" } ], "metadata": { "model": "google/gemini-2.5-flash-image-preview", "provider": "Google", "total_images": 1, "is_image_to_image": false, "text_response": null, "smltp_trace_id": "trx-220eca66-5e3a-4a72-886b-e6ba8cde18a6", "smltp_bundle_id": "jti-bb850e61-fbfe-412a-8b0d-d180d4a36d22", "smltp_policy": "internal" }}
{
"success": false,
"error": "Invalid prompt",
"message": "Prompt is required and must be a non-empty string",
"request_id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3"
}
{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}
{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}
{
"success": false,
"error": "File too large",
"message": "Maximum image size is 10MB",
"request_id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3"
}
{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}
{
"success": false,
"error": "Service unavailable",
"message": "Image generation service is not configured",
"request_id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3"
}
curl -X POST "https://{customer.name}.hiperai.ai/api/external/images/generations" \ -H "Authorization: Bearer sk-your-api-key-here" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A beautiful sunset over the ocean with mountains in the background, digital art style", "smltp_policy": "internal", "response_format": "url", "n": 1 }'
{ "success": false, "error": "Invalid prompt", "message": "Prompt is required and must be a non-empty string", "request_id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3"}
{ "success": false, "error": "Service unavailable", "message": "Image generation service is not configured", "request_id": "90d3756f-41c3-4f86-a18d-e257bfbc33a3"}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SecureAI","colors":{"primary":"#0066FF","light":"#0066FF","dark":"#0066FF"},"logo":{"light":"https://mintcdn.com/hiper-ai/OxdQRluHRfLLri8S/img/hiper_ai_official.png?fit=max\u0026auto=format\u0026n=OxdQRluHRfLLri8S\u0026q=85\u0026s=497afb0927d9949816a66f9bb841682b","dark":"https://mintcdn.com/hiper-ai/OxdQRluHRfLLri8S/img/logo-darkmode.png?fit=max\u0026auto=format\u0026n=OxdQRluHRfLLri8S\u0026q=85\u0026s=dd347e4a4b72c2737dbc17a8851c85d6"},"favicon":"https://mintcdn.com/hiper-ai/OxdQRluHRfLLri8S/img/HiperAI-logo-dark.png?fit=max\u0026auto=format\u0026n=OxdQRluHRfLLri8S\u0026q=85\u0026s=aed824f70d135b0e4d35c8a4b7eaac43","api":{"openapi":"openapi.yaml","playground":{"display":"interactive"},"examples":{"languages":["bash","python","javascript"]}},"navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Support"}]},"footer":{"socials":{"x":"https://twitter.com/hiperai","github":"https://github.com/hiperai","linkedin":"https://linkedin.com/company/hiperai"}},"integrations":{"ga4":{"measurementId":"G-XXXXXXXXXX"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"languages":[{"language":"es","default":true,"navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Soporte"}]},"href":"intro"},{"language":"en","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Support"}]},"href":"en/intro"},{"language":"zh","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"技术支持"}]},"href":"zh/intro"},{"language":"pt","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Suporte"}]},"href":"pt/intro"},{"language":"ja","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"サポート"}]},"href":"ja/intro"},{"language":"fr","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Support"}]},"href":"fr/intro"},{"language":"de","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Support"}]},"href":"de/intro"},{"language":"ko","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"고객지원"}]},"href":"ko/intro"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hiper-ai","hasAudioNarration":false,"actualSubdomain":"hiper-ai","customDomains":["docs.hiperai.com"],"gitSource":{"type":"github","owner":"hiper-ai","repo":"secureai-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ad6b4b017d9e3869f145d89","collectionId":"386a397d-7605-4379-a3a6-356107733de6","liveDeploymentHistoryId":"6ad6b4b017d9e3869f145d89","schemaVersion":"v3"},"feedback":{"thumbs":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad6b4b017d9e3869f145d89","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"es","tag":"Referencia API","count":40},{"language":"de","tag":"API-Referenz","count":40},{"language":"en","tag":"API Reference","count":40},{"language":"fr","tag":"Référence API","count":40},{"language":"ja","tag":"API リファレンス","count":40},{"language":"ko","tag":"API 레퍼런스","count":40},{"language":"pt","tag":"Referência da API","count":40},{"language":"zh","tag":"API 参考","count":40},{"language":"es","tag":"Documentación","count":28},{"language":"de","tag":"Dokumentation","count":28},{"language":"en","tag":"Documentation","count":28},{"language":"fr","tag":"Documentation","count":28},{"language":"ja","tag":"ドキュメント","count":28},{"language":"ko","tag":"문서","count":28},{"language":"pt","tag":"Documentação","count":28},{"language":"zh","tag":"文档","count":28},{"language":"es","tag":"Integraciones","count":20},{"language":"en","tag":"Integrations","count":20},{"language":"de","tag":"Integrationen","count":17},{"language":"fr","tag":"Intégrations","count":17},{"language":"ja","tag":"連携","count":17},{"language":"ko","tag":"연동","count":17},{"language":"pt","tag":"Integrações","count":17},{"language":"zh","tag":"集成","count":17},{"language":"es","tag":"Modelos y Generación AI","count":9},{"language":"de","tag":"Modelle \u0026 KI-Generierung","count":9},{"language":"en","tag":"Models \u0026 AI Generation","count":9},{"language":"fr","tag":"Modèles \u0026 Génération IA","count":9},{"language":"ja","tag":"モデル \u0026 AI 生成","count":9},{"language":"ko","tag":"모델 및 AI 생성","count":9},{"language":"pt","tag":"Modelos \u0026 Geração de IA","count":9},{"language":"zh","tag":"模型与 AI 生成","count":9},{"language":"es","tag":"Seguridad, Guardrails y Auditoría","count":8},{"language":"es","tag":"Usuarios y Acceso (IAM)","count":8},{"language":"de","tag":"Sicherheit, Guardrails \u0026 Auditierung","count":8},{"language":"de","tag":"Benutzer \u0026 Zugriff (IAM)","count":8},{"language":"en","tag":"Security, Guardrails \u0026 Auditing","count":8},{"language":"en","tag":"Users \u0026 Access (IAM)","count":8},{"language":"fr","tag":"Sécurité, Guardrails \u0026 Audit","count":8},{"language":"fr","tag":"Utilisateurs \u0026 Accès (IAM)","count":8},{"language":"ja","tag":"セキュリティ、ガードレール \u0026 監査","count":8},{"language":"ja","tag":"ユーザー \u0026 アクセス (IAM)","count":8},{"language":"ko","tag":"보안, 가드레일 및 감사","count":8},{"language":"ko","tag":"사용자 및 접근 (IAM)","count":8},{"language":"pt","tag":"Segurança, Guardrails \u0026 Auditoria","count":8},{"language":"pt","tag":"Usuários \u0026 Acesso (IAM)","count":8},{"language":"zh","tag":"安全、护栏与审计","count":8},{"language":"zh","tag":"用户与访问 (IAM)","count":8},{"language":"es","tag":"Endpoint Agent","count":7},{"language":"de","tag":"Endpoint Agent","count":7},{"language":"en","tag":"Endpoint Agent","count":7},{"language":"fr","tag":"Agent Endpoint","count":7},{"language":"ja","tag":"エンドポイントエージェント","count":7},{"language":"ko","tag":"엔드포인트 에이전트","count":7},{"language":"pt","tag":"Endpoint Agent","count":7},{"language":"zh","tag":"终端代理 (Endpoint Agent)","count":7},{"language":"es","tag":"Facturación, Cuotas y Webhooks","count":6},{"language":"es","tag":"Knowledge Base y RAG","count":6},{"language":"es","tag":"Cloud, NHI y gestión","count":6},{"language":"de","tag":"Abrechnung, Kontingente \u0026 Webhooks","count":6},{"language":"de","tag":"Knowledge Base \u0026 RAG","count":6},{"language":"en","tag":"Billing, Quotas \u0026 Webhooks","count":6},{"language":"en","tag":"Knowledge Base \u0026 RAG","count":6},{"language":"en","tag":"Cloud, NHI \u0026 Management","count":6},{"language":"fr","tag":"Facturation, Quotas \u0026 Webhooks","count":6},{"language":"fr","tag":"Base de Connaissances \u0026 RAG","count":6},{"language":"ja","tag":"請求、クォータ \u0026 Webhook","count":6},{"language":"ja","tag":"ナレッジベース \u0026 RAG","count":6},{"language":"ko","tag":"청구, 할당량 및 웹훅","count":6},{"language":"ko","tag":"지식 베이스 및 RAG","count":6},{"language":"pt","tag":"Faturamento, Cotas \u0026 Webhooks","count":6},{"language":"pt","tag":"Knowledge Base \u0026 RAG","count":6},{"language":"zh","tag":"计费、配额与 Webhook","count":6},{"language":"zh","tag":"知识库与 RAG","count":6},{"language":"de","tag":"Erste Schritte","count":5},{"language":"fr","tag":"Premiers Pas","count":5},{"language":"ja","tag":"はじめに","count":5},{"language":"ko","tag":"시작하기","count":5},{"language":"pt","tag":"Primeiros Passos","count":5},{"language":"zh","tag":"起步入门","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"llms-txt-v2","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":"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":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".dark img[src$=\"/img/icons/openai.svg\"],.dark img[src$=\"/img/icons/anthropic.svg\"],.dark img[src$=\"/img/icons/splunk.svg\"]{filter:invert(1)}"}],"page":{"pagePath":"api/images/generations","slug":"/api/images/generations","pageMetadata":{"sidebar_position":1,"title":"Generación de Imágenes","openapi":"POST /images/generations","sidebar_label":"Generar Imágenes","description":"Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image.\nAll requests and responses are processed through SMLTP for security and compliance.\n\nThis endpoint supports:\n- **Text-to-Image**: Generate images from text descriptions\n- **Image-to-Image**: Transform or edit existing images (upload an image file)\n\nAll prompts and responses are automatically processed through SMLTP for audit logging and compliance.\n","href":"/api/images/generations"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image.\\nAll requests and responses are processed through SMLTP for security and compliance.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"This endpoint supports:\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Text-to-Image\"\n }), \": Generate images from text descriptions\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Image-to-Image\"\n }), \": Transform or edit existing images (upload an image file)\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"All prompts and responses are automatically processed through SMLTP for audit logging and compliance.\"\n })]\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={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`generar-imágenes`,children:`Generar imágenes`}),`\n`,_jsx(_components.p,{children:`Genere nuevas imágenes a partir de mensajes de texto o transforme imágenes existentes utilizando Google Gemini 2.5 Flash Image.`}),`\n`,_jsx(Heading,{level:`2`,id:`endpoint`,children:`Endpoint`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,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:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST /images/generations`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`descripción`,children:`Descripción`}),`\n`,_jsx(_components.p,{children:`Genere nuevas imágenes a partir de descripciones de texto o transforme imágenes existentes. Este endpoint admite:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Texto a imagen`}),`: genera imágenes a partir de descripciones de texto`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Imagen a imagen`}),`: transforma o edita imágenes existentes (carga un archivo de imagen)`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Todas las indicaciones y respuestas se procesan automáticamente a través de SMLTP para el registro de auditoría y el cumplimiento.`}),`\n`,_jsx(Heading,{level:`2`,id:`autenticación`,children:`Autenticación`}),`\n`,_jsx(_components.p,{children:`Requerido: Clave API`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` sk-your-api-key-here`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`cuerpo-de-solicitud`,children:`Cuerpo de solicitud`}),`\n`,_jsxs(_components.p,{children:[`Este endpoint acepta los formatos `,_jsx(_components.code,{children:`multipart/form-data`}),` (para carga de archivos) y `,_jsx(_components.code,{children:`application/json`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`parámetros`,children:`Parámetros`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parámetro`}),_jsx(_components.th,{children:`Tipo`}),_jsx(_components.th,{children:`Requerido`}),_jsx(_components.th,{children:`Descripción`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`Sí`}),_jsx(_components.td,{children:`Mensaje de texto que describe la imagen a generar o cómo transformar la imagen cargada (1-4000 caracteres)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`image`})}),_jsx(_components.td,{children:`binario`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Archivo de imagen para generación de imagen a imagen (JPEG, PNG, WEBP o GIF, máximo 10 MB)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`smltp_policy`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Política de seguridad SMLTP (predeterminada: “interna”)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`response_format`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Formato de respuesta: “url” o “b64_json” (predeterminado: “url”)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`size`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Tamaño de imagen (predeterminado: “1024x1024”)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`n`})}),_jsx(_components.td,{children:`entero`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Número de imágenes a generar (1-4, predeterminado: 1)`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`ejemplos-de-solicitudes`,children:`Ejemplos de solicitudes`}),`\n`,_jsx(Heading,{level:`3`,id:`texto-a-imagen-json`,children:`Texto a imagen (JSON)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://{customer.name}.hiperai.ai/api/external/images/generations\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk-your-api-key-here\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"A beautiful sunset over the ocean with mountains in the background, digital art style\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"smltp_policy\": \"internal\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"response_format\": \"url\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"n\": 1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`imagen-a-imagen-datos-de-formulario-de-varias-partes`,children:`Imagen a imagen (datos de formulario de varias partes)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://{customer.name}.hiperai.ai/api/external/images/generations\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk-your-api-key-here\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt=Add dramatic sunset colors to the sky\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"image=@/path/to/image.jpg\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"smltp_policy=internal\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"response_format=url\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`javascript/node-js`,children:`JavaScript/Node.js`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`35`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`35`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Text-to-Image`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://{customer.name}.hiperai.ai/api/external/images/generations'`}),_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\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_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\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Bearer sk-your-api-key-here'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_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\":`#9CDCFE`},children:` prompt:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'A beautiful sunset over the ocean with mountains in the background, digital art style'`}),_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\":`#9CDCFE`},children:` smltp_policy:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'internal'`}),_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\":`#9CDCFE`},children:` response_format:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'url'`}),_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\":`#9CDCFE`},children:` n:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_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\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Generated image URL:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_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:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Image-to-Image`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` formData`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` FormData`}),_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\":`#9CDCFE`},children:`formData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'prompt'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Add dramatic sunset colors to the sky'`}),_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\":`#9CDCFE`},children:`formData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'image'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fileInput`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`files`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_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\":`#9CDCFE`},children:`formData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'smltp_policy'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'internal'`}),_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\":`#9CDCFE`},children:`formData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'response_format'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'url'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response2`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://{customer.name}.hiperai.ai/api/external/images/generations'`}),_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\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_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\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Bearer sk-your-api-key-here'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` formData`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data2`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_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\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Edited image URL:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`pitón`,children:`Pitón`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`30`,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:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Text-to-Image`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`url `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{customer.name}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`.hiperai.ai/api/external/images/generations\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer sk-your-api-key-here\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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:`data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A beautiful sunset over the ocean with mountains in the background, digital art style\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"smltp_policy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"internal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"response_format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(url, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Generated image URL:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'data'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'url'`}),_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:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Image-to-Image`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'image.jpg'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'rb'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` f:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` files `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'image'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: f}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'prompt'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Add dramatic sunset colors to the sky'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'smltp_policy'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'internal'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'response_format'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'url'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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:` response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(url, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer sk-your-api-key-here'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`files`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`files, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Edited image URL:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'data'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'url'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`respuesta`,children:`Respuesta`}),`\n`,_jsx(Heading,{level:`3`,id:`respuesta-exitosa-200`,children:`Respuesta exitosa (200)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"90d3756f-41c3-4f86-a18d-e257bfbc33a3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image.generation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1705312200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"http://localhost:5173/uploads/secureai_image_api_68c5c6d2d57c85b102eb05e2_90d3756f_0.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"revised_prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A beautiful sunset over the ocean with mountains in the background, digital art style\"`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"google/gemini-2.5-flash-image-preview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Google\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_image_to_image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text_response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"smltp_trace_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"trx-220eca66-5e3a-4a72-886b-e6ba8cde18a6\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"smltp_bundle_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"jti-bb850e61-fbfe-412a-8b0d-d180d4a36d22\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"smltp_policy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"internal\"`})]}),`\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`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`campos-de-respuesta`,children:`Campos de respuesta`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Campo`}),_jsx(_components.th,{children:`Tipo`}),_jsx(_components.th,{children:`Descripción`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`success`})}),_jsx(_components.td,{children:`booleano`}),_jsx(_components.td,{children:`Siempre es cierto para solicitudes exitosas`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`Identificador de solicitud único`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`object`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`Tipo de objeto: “imagen.generación”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created`})}),_jsx(_components.td,{children:`entero`}),_jsx(_components.td,{children:`Marca de tiempo Unix de cuando se crearon las imágenes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data`})}),_jsx(_components.td,{children:`matriz`}),_jsx(_components.td,{children:`Matriz de imágenes generadas`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`metadata`})}),_jsx(_components.td,{children:`objeto`}),_jsx(_components.td,{children:`Metadatos adicionales, incluido el seguimiento SMLTP`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`objeto-de-imagen`,children:`Objeto de imagen`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Campo`}),_jsx(_components.th,{children:`Tipo`}),_jsx(_components.th,{children:`Descripción`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`url`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`URL para acceder a la imagen generada (cuando el formato_respuesta es “url”)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`b64_json`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`Datos de imagen codificados en Base64 (cuando el formato_respuesta es “b64_json”)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`revised_prompt`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`El mensaje realmente utilizado para la generación (puede diferir de la entrada)`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`objeto-de-metadatos`,children:`Objeto de metadatos`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Campo`}),_jsx(_components.th,{children:`Tipo`}),_jsx(_components.th,{children:`Descripción`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`model`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`Modelo utilizado: “google/gemini-2.5-flash-image-preview”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`provider`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`Proveedor: “Google”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_images`})}),_jsx(_components.td,{children:`entero`}),_jsx(_components.td,{children:`Número total de imágenes generadas`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`is_image_to_image`})}),_jsx(_components.td,{children:`booleano`}),_jsx(_components.td,{children:`Si se trató de una generación de imagen a imagen`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text_response`})}),_jsx(_components.td,{children:`cadena|nulo`}),_jsx(_components.td,{children:`Respuesta de texto opcional del modelo`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`smltp_trace_id`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`ID de seguimiento SMLTP para seguimiento de auditoría`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`smltp_bundle_id`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`ID de paquete SMLTP para seguimiento de auditorías`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`smltp_policy`})}),_jsx(_components.td,{children:`cadena`}),_jsx(_components.td,{children:`Política SMLTP que se aplicó`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`respuestas-de-error`,children:`Respuestas de error`}),`\n`,_jsx(Heading,{level:`3`,id:`400-solicitud-incorrecta`,children:`400 Solicitud incorrecta`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Prompt is required and must be a non-empty string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"90d3756f-41c3-4f86-a18d-e257bfbc33a3\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`401-no-autorizado`,children:`401 No autorizado`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid API key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The provided API key is invalid or has been revoked\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`403-prohibido`,children:`403 Prohibido`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Access denied\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SMLTP policy not allowed\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`413-carga-útil-demasiado-grande`,children:`413 Carga útil demasiado grande`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"File too large\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Maximum image size is 10MB\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"90d3756f-41c3-4f86-a18d-e257bfbc33a3\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`500-error-interno-del-servidor`,children:`500 Error interno del servidor`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Internal server error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Image generation failed\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`servicio-503-no-disponible`,children:`Servicio 503 no disponible`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Service unavailable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Image generation service is not configured\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"90d3756f-41c3-4f86-a18d-e257bfbc33a3\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`notas`,children:`Notas`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Formatos de imagen admitidos para cargar: JPEG, PNG, WEBP, GIF`}),`\n`,_jsx(_components.li,{children:`Tamaño máximo de archivo: 10 MB por imagen`}),`\n`,_jsx(_components.li,{children:`Al cargar una imagen, el mensaje describe cómo transformarla`}),`\n`,_jsx(_components.li,{children:`Gemini normalmente genera de 1 a 4 imágenes por solicitud`}),`\n`,_jsx(_components.li,{children:`Todas las solicitudes se procesan a través de SMLTP por motivos de seguridad y cumplimiento.`}),`\n`,_jsxs(_components.li,{children:[`Utilice `,_jsx(_components.code,{children:`response_format: \"b64_json\"`}),` para recibir datos de imágenes codificados en base64 en lugar de URL`]}),`\n`]})]})}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":{"sidebar_position":1,"title":"Generación de Imágenes","openapi":"POST /images/generations","sidebar_label":"Generar Imágenes","description":"Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image.\nAll requests and responses are processed through SMLTP for security and compliance.\n\nThis endpoint supports:\n- **Text-to-Image**: Generate images from text descriptions\n- **Image-to-Image**: Transform or edit existing images (upload an image file)\n\nAll prompts and responses are automatically processed through SMLTP for audit logging and compliance.\n","href":"/api/images/generations"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Generar imágenes","slug":"generar-imágenes","depth":1,"children":[]},{"title":"Endpoint","slug":"endpoint","depth":2,"children":[]},{"title":"Descripción","slug":"descripción","depth":2,"children":[]},{"title":"Autenticación","slug":"autenticación","depth":2,"children":[]},{"title":"Cuerpo de solicitud","slug":"cuerpo-de-solicitud","depth":2,"children":[{"title":"Parámetros","slug":"parámetros","depth":3,"children":[]}]},{"title":"Ejemplos de solicitudes","slug":"ejemplos-de-solicitudes","depth":2,"children":[{"title":"Texto a imagen (JSON)","slug":"texto-a-imagen-json","depth":3,"children":[]},{"title":"Imagen a imagen (datos de formulario de varias partes)","slug":"imagen-a-imagen-datos-de-formulario-de-varias-partes","depth":3,"children":[]},{"title":"JavaScript/Node.js","slug":"javascript/node-js","depth":3,"children":[]},{"title":"Pitón","slug":"pitón","depth":3,"children":[]}]},{"title":"Respuesta","slug":"respuesta","depth":2,"children":[{"title":"Respuesta exitosa (200)","slug":"respuesta-exitosa-200","depth":3,"children":[]},{"title":"Campos de respuesta","slug":"campos-de-respuesta","depth":3,"children":[]},{"title":"Objeto de imagen","slug":"objeto-de-imagen","depth":3,"children":[]},{"title":"Objeto de metadatos","slug":"objeto-de-metadatos","depth":3,"children":[]}]},{"title":"Respuestas de error","slug":"respuestas-de-error","depth":2,"children":[{"title":"400 Solicitud incorrecta","slug":"400-solicitud-incorrecta","depth":3,"children":[]},{"title":"401 No autorizado","slug":"401-no-autorizado","depth":3,"children":[]},{"title":"403 Prohibido","slug":"403-prohibido","depth":3,"children":[]},{"title":"413 Carga útil demasiado grande","slug":"413-carga-útil-demasiado-grande","depth":3,"children":[]},{"title":"500 Error interno del servidor","slug":"500-error-interno-del-servidor","depth":3,"children":[]},{"title":"Servicio 503 no disponible","slug":"servicio-503-no-disponible","depth":3,"children":[]}]},{"title":"Notas","slug":"notas","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Generate or Edit Images","description":"Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image.\nAll requests and responses are processed through SMLTP for security and compliance.\n\nThis endpoint supports:\n- **Text-to-Image**: Generate images from text descriptions\n- **Image-to-Image**: Transform or edit existing images (upload an image file)\n\nAll prompts and responses are automatically processed through SMLTP for audit logging and compliance.\n","tags":["Images"],"security":["bcb0212b-10f3-47a7-bb9e-e70eed2cef65"],"requestBody":"03c7a187-1dbe-4a7f-ac5e-55ef184bbf96","responses":{"200":"85db2c5a-c0ab-44f5-9133-60ba421f0a63","400":"186cb7af-64b1-4563-92d1-e791f469dd59","401":"fa6eb677-bdc6-4643-90e0-5ef8deaffc79","403":"9d8cedc4-5210-4dc1-8b38-56138e30ba26","413":"b7814f39-f955-4eae-b051-9c4c8dd59bab","500":"85dab975-3861-41cd-a8c8-af37fc571b48","503":"faae3939-8ad7-4b63-9548-66f46924baa5"},"method":"post","type":"path","servers":["fbd72946-9886-4e81-9a8d-c4d03a0f013a","c25ed417-4e80-41d3-81a9-ad22193527d3"],"path":"/images/generations","baseUrlOptions":["https://secureai.hiperai.ai/api/external","http://localhost:3010/api/external"],"title":"Generate or Edit Images","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The text prompt describing the image to generate or how to transform the uploaded image","example":"A beautiful sunset over the ocean with mountains in the background, digital art style","minLength":1,"maxLength":4000,"isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"image":{"type":"string","format":"binary","description":"Optional image file for image-to-image generation (JPEG, PNG, WEBP, or GIF, max 10MB)","uniqueKey":"image","typeLabel":"file"},"smltp_policy":{"type":"string","description":"SMLTP security policy to apply (e.g., 'internal', 'public', 'confidential', 'hipaa', 'gdpr')","default":"internal","example":"internal","uniqueKey":"smltp_policy","typeLabel":"string"},"response_format":{"type":"string","description":"The format of the response images","enum":["url","b64_json"],"default":"url","example":"url","uniqueKey":"response_format","typeLabel":"enum\u003cstring>"},"size":{"type":"string","description":"The size of the generated images (for future use, currently uses default size)","default":"1024x1024","example":"1024x1024","uniqueKey":"size","typeLabel":"string"},"n":{"type":"integer","description":"Number of images to generate (Gemini typically generates 1-4 images)","minimum":1,"maximum":4,"default":1,"example":1,"uniqueKey":"n","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"prompt":"A beautiful sunset over the ocean with mountains in the background, digital art style","image":"\u003cstring>","smltp_policy":"internal","response_format":"url","size":"1024x1024","n":1}}},"exampleType":"generated"},"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The text prompt describing the image to generate","example":"A beautiful sunset over the ocean with mountains in the background, digital art style","minLength":1,"maxLength":4000,"isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"smltp_policy":{"type":"string","description":"SMLTP security policy to apply","default":"internal","example":"internal","uniqueKey":"smltp_policy","typeLabel":"string"},"response_format":{"type":"string","description":"The format of the response images","enum":["url","b64_json"],"default":"url","example":"url","uniqueKey":"response_format","typeLabel":"enum\u003cstring>"},"size":{"type":"string","description":"The size of the generated images (for future use)","default":"1024x1024","example":"1024x1024","uniqueKey":"size","typeLabel":"string"},"n":{"type":"integer","description":"Number of images to generate","minimum":1,"maximum":4,"default":1,"example":1,"uniqueKey":"n","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"example":{"prompt":"A beautiful sunset over the ocean with mountains in the background, digital art style","smltp_policy":"internal","response_format":"url","n":1},"examples":{"Example":{"title":"Example","value":{"prompt":"A beautiful sunset over the ocean with mountains in the background, digital art style","smltp_policy":"internal","response_format":"url","n":1}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"85db2c5a-c0ab-44f5-9133-60ba421f0a63":{"description":"Images generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true,"uniqueKey":"success","typeLabel":"boolean"},"id":{"type":"string","description":"Unique request identifier","example":"90d3756f-41c3-4f86-a18d-e257bfbc33a3","uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","example":"image.generation","uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","description":"Unix timestamp of when the images were created","example":1705312200,"uniqueKey":"created","typeLabel":"integer"},"data":{"type":"array","description":"Array of generated images","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL to access the generated image (when response_format is 'url')","example":"http://localhost:5173/uploads/secureai_image_api_68c5c6d2d57c85b102eb05e2_90d3756f_0.png","uniqueKey":"data.items.[INDEX].url","typeLabel":"string\u003curi>"},"b64_json":{"type":"string","description":"Base64-encoded image data (when response_format is 'b64_json')","example":"iVBORw0KGgoAAAANSUhEUgAA...","uniqueKey":"data.items.[INDEX].b64_json","typeLabel":"string"},"revised_prompt":{"type":"string","description":"The prompt that was actually used for generation (may differ from input)","example":"A beautiful sunset over the ocean with mountains in the background, digital art style","uniqueKey":"data.items.[INDEX].revised_prompt","typeLabel":"string"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data","typeLabel":"object[]"},"metadata":{"type":"object","properties":{"model":{"type":"string","example":"google/gemini-2.5-flash-image-preview","uniqueKey":"metadata.model","typeLabel":"string"},"provider":{"type":"string","example":"Google","uniqueKey":"metadata.provider","typeLabel":"string"},"total_images":{"type":"integer","example":1,"uniqueKey":"metadata.total_images","typeLabel":"integer"},"is_image_to_image":{"type":"boolean","description":"Whether this was an image-to-image generation","example":false,"uniqueKey":"metadata.is_image_to_image","typeLabel":"boolean"},"text_response":{"oneOf":[{"type":"string","description":"Optional text response from the model","example":null,"uniqueKey":"metadata.text_response.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional text response from the model","example":null,"uniqueKey":"metadata.text_response.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata.text_response","typeLabel":"string | null"},"smltp_trace_id":{"type":"string","description":"SMLTP trace ID for audit tracking","example":"trx-220eca66-5e3a-4a72-886b-e6ba8cde18a6","uniqueKey":"metadata.smltp_trace_id","typeLabel":"string"},"smltp_bundle_id":{"type":"string","description":"SMLTP bundle ID for audit tracking","example":"jti-bb850e61-fbfe-412a-8b0d-d180d4a36d22","uniqueKey":"metadata.smltp_bundle_id","typeLabel":"string"},"smltp_policy":{"type":"string","description":"SMLTP policy that was applied","example":"internal","uniqueKey":"metadata.smltp_policy","typeLabel":"string"}},"uniqueKey":"metadata","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"success":true,"id":"90d3756f-41c3-4f86-a18d-e257bfbc33a3","object":"image.generation","created":1705312200,"data":[{"url":"http://localhost:5173/uploads/secureai_image_api_68c5c6d2d57c85b102eb05e2_90d3756f_0.png","revised_prompt":"A beautiful sunset over the ocean with mountains in the background, digital art style"}],"metadata":{"model":"google/gemini-2.5-flash-image-preview","provider":"Google","total_images":1,"is_image_to_image":false,"text_response":null,"smltp_trace_id":"trx-220eca66-5e3a-4a72-886b-e6ba8cde18a6","smltp_bundle_id":"jti-bb850e61-fbfe-412a-8b0d-d180d4a36d22","smltp_policy":"internal"}},"examples":{"Example":{"title":"Example","value":{"success":true,"id":"90d3756f-41c3-4f86-a18d-e257bfbc33a3","object":"image.generation","created":1705312200,"data":[{"url":"http://localhost:5173/uploads/secureai_image_api_68c5c6d2d57c85b102eb05e2_90d3756f_0.png","revised_prompt":"A beautiful sunset over the ocean with mountains in the background, digital art style"}],"metadata":{"model":"google/gemini-2.5-flash-image-preview","provider":"Google","total_images":1,"is_image_to_image":false,"text_response":null,"smltp_trace_id":"trx-220eca66-5e3a-4a72-886b-e6ba8cde18a6","smltp_bundle_id":"jti-bb850e61-fbfe-412a-8b0d-d180d4a36d22","smltp_policy":"internal"}}}},"exampleType":"examples"}},"exampleType":"examples"},"186cb7af-64b1-4563-92d1-e791f469dd59":{"description":"Invalid request parameters (missing prompt, invalid image format, etc.)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Invalid API key","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","example":"The provided API key is invalid or has been revoked","uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","example":"req-abc123","description":"Request ID for tracking (if available)","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":"Invalid prompt","message":"Prompt is required and must be a non-empty string","request_id":"90d3756f-41c3-4f86-a18d-e257bfbc33a3"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Invalid prompt","message":"Prompt is required and must be a non-empty string","request_id":"90d3756f-41c3-4f86-a18d-e257bfbc33a3"}}},"exampleType":"examples"}},"exampleType":"examples"},"fa6eb677-bdc6-4643-90e0-5ef8deaffc79":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Invalid API key","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","example":"The provided API key is invalid or has been revoked","uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","example":"req-abc123","description":"Request ID for tracking (if available)","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Invalid API key","message":"The provided API key is invalid or has been revoked","request_id":"req-abc123"}}},"exampleType":"generated"}},"exampleType":"generated"},"9d8cedc4-5210-4dc1-8b38-56138e30ba26":{"description":"Access denied (SMLTP policy not allowed)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Invalid API key","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","example":"The provided API key is invalid or has been revoked","uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","example":"req-abc123","description":"Request ID for tracking (if available)","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Invalid API key","message":"The provided API key is invalid or has been revoked","request_id":"req-abc123"}}},"exampleType":"generated"}},"exampleType":"generated"},"b7814f39-f955-4eae-b051-9c4c8dd59bab":{"description":"Image file too large (maximum 10MB)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Invalid API key","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","example":"The provided API key is invalid or has been revoked","uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","example":"req-abc123","description":"Request ID for tracking (if available)","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":"File too large","message":"Maximum image size is 10MB","request_id":"90d3756f-41c3-4f86-a18d-e257bfbc33a3"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"File too large","message":"Maximum image size is 10MB","request_id":"90d3756f-41c3-4f86-a18d-e257bfbc33a3"}}},"exampleType":"examples"}},"exampleType":"examples"},"85dab975-3861-41cd-a8c8-af37fc571b48":{"description":"Internal server error or image generation failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Invalid API key","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","example":"The provided API key is invalid or has been revoked","uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","example":"req-abc123","description":"Request ID for tracking (if available)","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Invalid API key","message":"The provided API key is invalid or has been revoked","request_id":"req-abc123"}}},"exampleType":"generated"}},"exampleType":"generated"},"faae3939-8ad7-4b63-9548-66f46924baa5":{"description":"Image generation service unavailable (Gemini service not configured)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Invalid API key","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","example":"The provided API key is invalid or has been revoked","uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","example":"req-abc123","description":"Request ID for tracking (if available)","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":"Service unavailable","message":"Image generation service is not configured","request_id":"90d3756f-41c3-4f86-a18d-e257bfbc33a3"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Service unavailable","message":"Image generation service is not configured","request_id":"90d3756f-41c3-4f86-a18d-e257bfbc33a3"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"bcb0212b-10f3-47a7-bb9e-e70eed2cef65":{"ApiKeyAuth":{"type":"http","scheme":"bearer","description":"API key authentication using Bearer token format.\nExample: `Authorization: Bearer sk-your-api-key-here`\n","scopes":[]}}},"servers":{"fbd72946-9886-4e81-9a8d-c4d03a0f013a":{"url":"https://secureai.hiperai.ai/api/external","description":"Production server"},"c25ed417-4e80-41d3-81a9-ad22193527d3":{"url":"http://localhost:3010/api/external","description":"Development server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key authentication using Bearer token format.\nExample: `Authorization: Bearer sk-your-api-key-here`\n","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key authentication using Bearer token format.\nExample: `Authorization: Bearer sk-your-api-key-here`\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyAuth","name":"Authorization"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"hiper-ai","siteName":"SecureAI","title":"Generación de Imágenes - SecureAI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"es":{"href":"/api/images/generations","matchLevel":0},"en":{"href":"/en/api/images/generations","matchLevel":1},"zh":{"href":"/zh/api/images/generations","matchLevel":1},"pt":{"href":"/pt/api/images/generations","matchLevel":1},"ja":{"href":"/ja/api/images/generations","matchLevel":1},"fr":{"href":"/fr/api/images/generations","matchLevel":1},"de":{"href":"/de/api/images/generations","matchLevel":1},"ko":{"href":"/ko/api/images/generations","matchLevel":1}}},"lastModified":"2026-09-04T13:04:56.105Z","originalFileLocation":"api/images/generations.md","locale":"es"},"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=\"Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image. All requests and responses are processed through SMLTP for security and compliance. This endpoint supports: - Text-to-Image: Generate images from text descriptions - Image-to-Image: Transform or edit existing images (upload an image file) All prompts and responses are automatically processed through SMLTP for audit logging and compliance.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SecureAI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hiper-ai/bbh9RI4BzTPVkV_e/_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/hiper-ai/bbh9RI4BzTPVkV_e/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hiper-ai/bbh9RI4BzTPVkV_e/_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/hiper-ai/bbh9RI4BzTPVkV_e/_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/hiper-ai/bbh9RI4BzTPVkV_e/_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/hiper-ai/bbh9RI4BzTPVkV_e/_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/hiper-ai/bbh9RI4BzTPVkV_e/_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/hiper-ai/bbh9RI4BzTPVkV_e/_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/hiper-ai/bbh9RI4BzTPVkV_e/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generación de Imágenes - SecureAI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image. All requests and responses are processed through SMLTP for security and compliance. This endpoint supports: - Text-to-Image: Generate images from text descriptions - Image-to-Image: Transform or edit existing images (upload an image file) All prompts and responses are automatically processed through SMLTP for audit logging and compliance.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SecureAI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hiperai.com/api/images/generations\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hiper-ai.mintlify.site/_mintlify/api/og/v2?division=Modelos+y+Generaci%C3%B3n+AI\u0026amp;title=Generaci%C3%B3n+de+Im%C3%A1genes\u0026amp;description=Generate+new+images+from+text+prompts+or+transform+existing+images+using+Google+Gemini+2.5+Flash+Image.%0AAll+requests+and+responses+are+processed+through+SMLTP+f\u0026amp;theme=626ee05cbd72fa1d2e9fae2a\u0026amp;signature=9352d1a19b8777c5ace3a9704c144d60e38a118f7989241400b1dfcb16562651\">\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=\"Generación de Imágenes - SecureAI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image. All requests and responses are processed through SMLTP for security and compliance. This endpoint supports: - Text-to-Image: Generate images from text descriptions - Image-to-Image: Transform or edit existing images (upload an image file) All prompts and responses are automatically processed through SMLTP for audit logging and compliance.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hiper-ai.mintlify.site/_mintlify/api/og/v2?division=Modelos+y+Generaci%C3%B3n+AI\u0026amp;title=Generaci%C3%B3n+de+Im%C3%A1genes\u0026amp;description=Generate+new+images+from+text+prompts+or+transform+existing+images+using+Google+Gemini+2.5+Flash+Image.%0AAll+requests+and+responses+are+processed+through+SMLTP+f\u0026amp;theme=626ee05cbd72fa1d2e9fae2a\u0026amp;signature=9352d1a19b8777c5ace3a9704c144d60e38a118f7989241400b1dfcb16562651\">\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/hiper-ai/bbh9RI4BzTPVkV_e/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SecureAI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0066FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hiperai.com/api/images/generations\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/images/generations.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.hiperai.com/api/images/generations\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.hiperai.com/en/api/images/generations\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.hiperai.com/zh/api/images/generations\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt\" href=\"https://docs.hiperai.com/pt/api/images/generations\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.hiperai.com/ja/api/images/generations\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.hiperai.com/fr/api/images/generations\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://docs.hiperai.com/de/api/images/generations\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.hiperai.com/ko/api/images/generations\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.hiperai.com/api/images/generations\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hiperai.com/#organization\",\"name\":\"SecureAI\",\"url\":\"https://docs.hiperai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hiper-ai/OxdQRluHRfLLri8S/img/hiper_ai_official.png?fit=max\u0026auto=format\u0026n=OxdQRluHRfLLri8S\u0026q=85\u0026s=497afb0927d9949816a66f9bb841682b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hiperai.com#website\",\"name\":\"SecureAI\",\"url\":\"https://docs.hiperai.com\",\"publisher\":{\"@id\":\"https://docs.hiperai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hiperai.com/api/images/generations#webpage\",\"url\":\"https://docs.hiperai.com/api/images/generations\",\"name\":\"Generación de Imágenes\",\"description\":\"Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image. All requests and responses are processed through SMLTP for security and compliance. This endpoint supports: - Text-to-Image: Generate images from text descriptions - Image-to-Image: Transform or edit existing images (upload an image file) All prompts and responses are automatically processed through SMLTP for audit logging and compliance.\",\"dateModified\":\"2026-09-04T13:04:56.105Z\",\"isPartOf\":{\"@id\":\"https://docs.hiperai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hiperai.com/api/images/generations#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hiperai.com/api/images/generations#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Modelos y Generación AI\",\"item\":\"https://docs.hiperai.com/api/chat/completions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generación de Imágenes\",\"item\":\"https://docs.hiperai.com/api/images/generations\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hiperai.com/api/images/generations#apireference\",\"headline\":\"Generación de Imágenes\",\"name\":\"Generación de Imágenes\",\"description\":\"Generate new images from text prompts or transform existing images using Google Gemini 2.5 Flash Image. All requests and responses are processed through SMLTP for security and compliance. This endpoint supports: - Text-to-Image: Generate images from text descriptions - Image-to-Image: Transform or edit existing images (upload an image file) All prompts and responses are automatically processed through SMLTP for audit logging and compliance.\",\"url\":\"https://docs.hiperai.com/api/images/generations\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hiperai.com/api/images/generations#webpage\"},\"dateModified\":\"2026-09-04T13:04:56.105Z\",\"publisher\":{\"@id\":\"https://docs.hiperai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hiperai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SecureAI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"SecureAI","nav":{"global":null,"languages":[{"language":"es","default":true,"navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Soporte"}]},"tabs":[{"tab":"Documentación","pages":[{"title":"Documentación","href":"/intro"}]},{"tab":"Integraciones","pages":[{"title":"Integraciones","href":"/integrations/files/google-drive"}]},{"tab":"Referencia API","groups":[{"group":"Primeros Pasos y Configuración","pages":[{"title":"Referencia de la API Externa","href":"/api"},{"title":"Autenticación de la API","href":"/api/auth/overview"},{"title":"Health Check (Estado del Sistema)","openapi":"GET /health","href":"/api/system/health"}]},{"group":"Modelos y Generación AI","pages":[{"title":"Chat Completions","openapi":"POST /chat/completions","href":"/api/chat/completions"},{"title":"Compatibilidad con OpenAI","openapi":"POST /v1/chat/completions","href":"/api/chat/openai-compatible"},{"title":"Redundancia y Failover Automático","description":"Cadenas de conmutación por error de modelos definidas por la persona que llama para la API SecureAI Completions","href":"/api/redundancy"},{"title":"Generación de Imágenes","openapi":"POST /images/generations","href":"/api/images/generations"},{"title":"Edición de Imágenes","openapi":"POST /images/edits","description":"Edit existing images using Google Gemini 2.5 Flash Image with text instructions.\nAll requests and responses are processed through SMLTP for security and compliance.\n\nThis endpoint is specifically designed for **image-to-image editing** where:\n- An image file is **required** (unlike `/images/generations` where it's optional)\n- A text prompt describes how to edit or transform the image\n- The edited image is returned with the same quality and format options\n\nAll prompts and responses are automatically processed through SMLTP for audit logging and compliance.\n","href":"/api/images/edits"},{"title":"Sesión WebRTC Speech-to-Speech","openapi":"POST /speech/s2s/webrtc","href":"/api/speech/webrtc"},{"title":"Estado de Sesión Speech-to-Speech","openapi":"GET /speech/s2s/status","href":"/api/speech/status"},{"title":"Registrar Sesión Speech-to-Speech","openapi":"POST /speech/s2s/log-session","href":"/api/speech/log-session"},{"title":"Modelos Disponibles en la API","openapi":"GET /models","href":"/api/discovery/models"}]},{"group":"Knowledge Base y RAG","pages":[{"title":"Listar Índices RAG","openapi":"GET /indexes/all","href":"/api/indexes/list"},{"title":"Crear Índice RAG","openapi":"POST /indexes/all","href":"/api/indexes/create"},{"title":"Actualizar Índice RAG","openapi":"PUT /indexes/{indexId}","href":"/api/indexes/update"},{"title":"Búsqueda Semántica en Índice","openapi":"GET /indexes/{indexName}/search","href":"/api/indexes/search"},{"title":"Entrenar Índice con Documentos","openapi":"POST /indexes/{indexName}/train","href":"/api/indexes/train"},{"title":"Bases de Conocimiento Disponibles","openapi":"GET /indexes","href":"/api/discovery/indexes"}]},{"group":"Seguridad, Guardrails y Auditoría","pages":[{"title":"Verificación de Políticas","openapi":"POST /policy-check","href":"/api/policy-check"},{"title":"Prompt Shield API","href":"/api/threat-defense/prompt-shield"},{"title":"Políticas SMLTP","openapi":"GET /smltp-policies/all","href":"/api/smltp/policies"},{"title":"Políticas SMLTP Activas","openapi":"GET /smltp-policies/active","href":"/api/smltp/active"},{"title":"Crear Política SMLTP","openapi":"POST /smltp-policies/active","href":"/api/smltp/create"},{"title":"Recibos Criptográficos SMLTP","openapi":"GET /receipts/{bundleId}","href":"/api/receipts"},{"title":"Logs de Auditoría Criptográficos","openapi":"GET /audit-logs","href":"/api/smltp/audit-logs"},{"title":"Políticas de Seguridad Descubiertas","openapi":"GET /smltp-policies","href":"/api/discovery/smltp-policies"}]},{"group":"Usuarios y Acceso (IAM)","pages":[{"title":"Listar Usuarios","openapi":"GET /users","href":"/api/users/list"},{"title":"Crear Usuario","openapi":"POST /users","href":"/api/users/create"},{"title":"Actualizar Usuario","openapi":"PUT /users/{userId}","href":"/api/users/update"},{"title":"Listar Roles","openapi":"GET /roles","href":"/api/roles/list"},{"title":"Crear Rol","openapi":"POST /roles","href":"/api/roles/create"},{"title":"Listar Grupos","openapi":"GET /groups","href":"/api/groups/list"},{"title":"Crear Grupo","openapi":"POST /groups","href":"/api/groups/create"},{"title":"Actualizar Grupo","openapi":"PUT /groups/{groupId}","href":"/api/groups/update"}]},{"group":"Facturación, Cuotas y Webhooks","pages":[{"title":"Métricas de Uso y Consumo","openapi":"GET /usage","href":"/api/usage"},{"title":"Modos de Facturación y Claves API","href":"/api/billing-modes"},{"title":"Referencia Rápida de Facturación","href":"/api/billing-modes/quick-reference"},{"title":"Disponibilidad de Licencias","openapi":"GET /licenses/availability","href":"/api/billing-modes/licenses-availability"},{"title":"Webhooks de Eventos — Visión General","href":"/api/webhooks/overview"},{"title":"Catálogo de Eventos de Webhooks","href":"/api/webhooks/events"}]}]}]},{"language":"en","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Support"}]},"pages":[{"title":"en","href":"/en/api/images/generations"}]},{"language":"zh","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"技术支持"}]},"pages":[{"title":"zh","href":"/zh/api/images/generations"}]},{"language":"pt","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Suporte"}]},"pages":[{"title":"pt","href":"/pt/api/images/generations"}]},{"language":"ja","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"サポート"}]},"pages":[{"title":"ja","href":"/ja/api/images/generations"}]},{"language":"fr","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Support"}]},"pages":[{"title":"fr","href":"/fr/api/images/generations"}]},{"language":"de","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"Support"}]},"pages":[{"title":"de","href":"/de/api/images/generations"}]},{"language":"ko","navbar":{"links":[{"href":"https://hiperai.com/contacts","label":"고객지원"}]},"pages":[{"title":"ko","href":"/ko/api/images/generations"}]}]},"basePath":"","title":"Generación de Imágenes - SecureAI","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js","Markdown-D7Ofw1oz.js","clsx-eKJ4rcii.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CwjSCXIK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-9EK5IAXV.js"]}