Guías

    GPT Image 2 en Kubeez: guía completa (web, API REST y MCP)

    Cómo ejecutar GPT Image 2 en Kubeez—id gpt-image-2, texto a imagen y edición con referencias (hasta 16), créditos, sondeo y cuándo elegir GPT Image 2 frente a otras familias.

    22 de abril de 20266 min de lecturaPor Kubeez
    GPT Image 2 en Kubeez: guía completa (web, API REST y MCP)

    GPT Image 2 on Kubeez: API, App, and MCP (Complete Guide)

    GPT Image 2 is OpenAI’s next-generation class of image generation: strong prompt adherence, photoreal and illustrative styles, and support for text-to-image and image-to-image with up to 16 reference images. On Kubeez, you can run it the same way you use other flagship models: in the web app, over the REST API, or through the Kubeez Model Context Protocol (MCP) server—one credit balance, one account, and no separate vendor API keys for the creative stack.

    GPT Image 2 text-to-image on Kubeez: editorial product still life (gpt-image-2)

    #What “GPT Image 2” means on Kubeez

    Kubeez wires provider-class image models behind a unified job system: you pick a model_id, send a prompt (and optional reference image URLs), and receive permanent HTTPS URLs on Kubeez’s CDN when the job finishes.

    For GPT Image 2:

    TopicOn Kubeez
    Public model_idgpt-image-2 (listed in get_models / GET /v1/models)
    ModesText-to-image; image-to-image with 1–16 source_media_urls
    Prompt lengthUp to ~20,000 characters (see get_modelscapabilities.prompt_max_chars)
    Aspect ratioNot exposed as a parameter for this model—the provider drives output dimensions; describe the scene in the prompt, not pixel boxes
    Typical costFlat per finished image (credits per generation—check get_models for your org’s current value)
    Estimated waitOrder of tens of seconds for a first poll (varies; use estimated_time_seconds from get_models)

    This is different from GPT Image 1.5 on Kubeez (gpt-1.5-image-medium / gpt-1.5-image-high), which exposes fixed aspect sets (e.g. 1:1, 2:3, 3:2) and a quality axis. If you need explicit 16:9/9:16 control, pick another family (e.g. Nano Banana 2, Imagen 4); if you want OpenAI-style reasoning in the image model and long prompts, GPT Image 2 is the right fit.

    Concept art: API and MCP paths converging on AI (GPT Image 2 on Kubeez, MCP)

    #Where you can run GPT Image 2

    #1. Web app (Media / Images)

    1. Open Media generation (or your locale equivalent).
    2. Select GPT Image 2 in the model list.
    3. Text only → text-to-image. Attach images (or paste from uploads) → the app switches to the edit path and passes references—same behavior the API encodes with source_media_urls.

    The UI enforces the same limits and credits as the API; the difference is you get previews, history, and upload helpers without writing JSON.

    #2. REST API (servers, scripts, CI)

    Kubeez’s public REST base is https://api.kubeez.com/v1 (see interactive docs at the same host’s /docs and the site’s REST API overview).

    Minimum flow for GPT Image 2:

    1. Authenticate with X-API-Key: sk_live_… (or Authorization: Bearer—see your key type).
    2. Discover models (recommended): GET /v1/models?model_type=image and confirm gpt-image-2 appears with scopes you need.
    3. Start a job: POST /v1/generate/media with:
      • model: "gpt-image-2"
      • prompt: your text
      • generation_type: "text-to-image" or "image-to-image"
      • For edits: source_media_urls: array of https URLs the backend can fetch (upload first via POST /v1/upload/media if files are only on disk).
    4. Poll GET /v1/generate/media/{id} until status is completed and outputs contain CDN URLs—not vendor temp links. (MCP: use get_generation_status instead of long-lived REST streams.)

    Scopes: generate:media on the API key. For balance and job listing, the matching read scopes on your key (see your project’s API Keys and docs).

    Why teams pick REST: long-lived keys in a secret manager, idempotent server workers, and tight integration with your own DAM or CMS.

    #3. MCP (Cursor, ChatGPT-style hosts, agents)

    Kubeez hosts an MCP server at:

    https://mcp.kubeez.com/mcp

    Typical tool sequence for GPT Image 2:

    1. get_models with model_type: "image" — confirm gpt-image-2 and read usage_notes / cost_per_generation.
    2. (Optional) get_balance before large batches.
    3. generate_media with model: "gpt-image-2" and prompt (add source_media_urls for image-to-image).
    4. Wait roughly estimated_time_seconds, then get_generation_status on the returned generation_id every ~5 seconds until completed or failed.

    Scopes: the MCP key or OAuth connection must include generate:media (and read:generations to poll, read:balance if you call get_balance).

    Local / private files: the MCP (and API) cannot read the user’s disk. For reference images, use get_upload_url → user uploads in browser → get_upload_session → pass URLs to source_media_urls—documented in the Kubeez MCP tool descriptions and MCP overview.

    Why teams pick MCP: the assistant plans steps, rewrites prompts, and runs tools in a loop—ideal for “three variants, same brief” or “check balance, then generate.”

    GPT Image 2 on Kubeez: infographic-style summary (app, REST API, MCP) — same model id everywhere

    #Request shape: what to send (and what to skip)

    • Model id — always use the string returned by get_models (gpt-image-2 on Kubeez).
    • Do not rely on aspect_ratio for GPT Image 2: capabilities show an empty aspect_ratio_options list. Prefer describing composition (“wide banner feel”, “tall mobile poster”) in natural language, or use another model if you need strict 16:9/9:16 at the API.
    • Image-to-image — set generation_type to image-to-image when you pass references, or let the platform infer from source_media_urls (REST/MCP may auto-adjust—still pass URLs in the shape your client expects).
    • Long briefs — product legal copy, shot lists, and multi-paragraph art direction are allowed within the prompt_max_chars budget; trim only if you exceed the cap.

    #Pricing and comparison (practical, not a price list)

    • GPT Image 2 is billed as a flat cost per output image on Kubeez (see cost_per_generation in get_models / GET /v1/models). It is not duration-based.
    • For rigid aspect ratios and marketing crops, you may want Nano Banana 2 or Seedream alongside GPT Image 2 in your toolkit; for open-ended OpenAI-style stills and heavy prompting, GPT Image 2 is the natural choice.

    #Operations: polling, rate limits, and failures

    • Polling: do not hammer status every second. Use estimated_time_seconds for a sensible first delay, then ~5s intervals until complete.
    • Failures: on failed, read error_message on the generation record; credits are handled according to Kubeez’s standard refund rules for that job type (see account and support docs if you hit edge cases).
    • CDN: completed jobs return Kubeez CDN URLs suitable for long-lived links in production (not time-limited vendor URLs).

    #Security and content policy

    • Use API keys and MCP connections the same way you would any production secret: rotate, scope minimally, and never commit keys to git.
    • Generated content is still subject to platform and provider policies; for brand work, add human review for copyright, likeness, and campaign compliance.

    Bottom line: GPT Image 2 on Kubeez is a single model_id (gpt-image-2) across the app, REST API, and MCP. Call get_models first, run text-to-image or image-to-image with up to 16 references, poll until CDN-ready URLs appear, and keep one credit wallet for every integration path you use.

    Ver también