NVIDIA NIM Image Generation API

Visual generative AI endpoints for text-to-image, image-to-image, and image editing using models such as Black Forest Labs FLUX.1, Stable Diffusion XL, Shutterstock-trained models, and NVIDIA-curated Edify Image. Returns base64-encoded PNG/JPEG artifacts.

NVIDIA NIM Image Generation API is one of 10 APIs that NVIDIA NIM publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 1 machine-runnable capability that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko.

Tagged areas include AI, Artificial Intelligence, Image Generation, and Visual. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, and 1 Naftiko capability spec.

OpenAPI Specification

nvidia-nim-image-generation-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: NVIDIA NIM Image Generation API
  description: >
    Visual generative AI endpoints. Text-to-image, image-to-image, and image
    editing using models such as Black Forest Labs FLUX.1, Stable Diffusion XL,
    Shutterstock-trained Edify Image, and NVIDIA Edify 3D — exposed by per-model
    NIM containers with a uniform JSON contract that returns base64-encoded
    PNG or JPEG artifacts.
  version: '2026-05-25'
  contact:
    name: NVIDIA Developer Support
    url: https://forums.developer.nvidia.com/c/ai-data-science/nemo-llm-service/
  license:
    name: NVIDIA AI Enterprise License
    url: https://www.nvidia.com/en-us/data-center/products/ai-enterprise/
servers:
  - url: https://integrate.api.nvidia.com
    description: NVIDIA-hosted NIM endpoint
  - url: http://localhost:8000
    description: Self-hosted NIM container default
security:
  - BearerAuth: []
tags:
  - name: Images
    description: Text-to-image and image-to-image generation
paths:
  /v1/genai/{publisher}/{model}:
    post:
      summary: Generate An Image
      description: Generate or edit an image with a NIM-hosted visual generative model. The exact request schema varies by model family.
      operationId: generateImage
      tags:
        - Images
      parameters:
        - name: publisher
          in: path
          required: true
          schema:
            type: string
          description: Model publisher (e.g. `black-forest-labs`, `stabilityai`, `shutterstock`, `nvidia`).
        - name: model
          in: path
          required: true
          schema:
            type: string
          description: Model slug (e.g. `flux.1-schnell`, `sdxl-turbo`, `edify-image`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
      responses:
        '200':
          description: Generated image artifacts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: Invalid request.
        '401':
          description: Missing or invalid API key.
        '429':
          description: Rate limit exceeded.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: nvapi-...
  schemas:
    ImageGenerationRequest:
      type: object
      required: [prompt]
      properties:
        prompt:
          type: string
        negative_prompt:
          type: string
        cfg_scale:
          type: number
          default: 5
        sampler:
          type: string
        seed:
          type: integer
        steps:
          type: integer
          default: 50
        width:
          type: integer
        height:
          type: integer
        mode:
          type: string
          enum: [text-to-image, image-to-image, inpaint]
          default: text-to-image
        image:
          type: string
          description: Optional base64-encoded source image for image-to-image / inpaint.
        mask:
          type: string
          description: Optional base64-encoded inpainting mask.
    ImageGenerationResponse:
      type: object
      properties:
        artifacts:
          type: array
          items:
            type: object
            properties:
              base64:
                type: string
                description: Base64-encoded image bytes (PNG or JPEG).
              finishReason:
                type: string
              seed:
                type: integer