RightNow AI Images API

The Images API from RightNow AI — 1 operation(s) for images.

OpenAPI Specification

rightnow-images-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: RunInfra Audio Images API
  description: OpenAI-compatible HTTP API for verified RunInfra inference deployments.
  version: '2026-04-24'
  contact:
    name: RunInfra support
    email: jaber@runinfra.ai
    url: https://runinfra.ai/contact
servers:
- url: https://api.runinfra.ai/v1
  description: Production
security:
- bearerAuth: []
tags:
- name: Images
paths:
  /images/generations:
    post:
      operationId: createImage
      summary: Generate image
      description: Generate images from verified image-generation deployments. OpenAI-compatible response shape. Native SDK clients send this request once even when an idempotency key is provided.
      tags:
      - Images
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
      responses:
        '200':
          description: Image generation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/Unavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
components:
  responses:
    BadGateway:
      description: Upstream serving backend transient failure
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit exceeded
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: Remaining requests in the window
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Endpoint stopped, provisioning, or at capacity
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Key scope mismatch or plan limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Model or deployment not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Idempotency conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    GatewayTimeout:
      description: Gateway timeout
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Malformed request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: Insufficient credits
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Unexpected gateway error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    ImageGenerationResponse:
      type: object
      required:
      - created
      - data
      properties:
        created:
          type: integer
        data:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              b64_json:
                type: string
              revised_prompt:
                type: string
        usage:
          $ref: '#/components/schemas/Usage'
    Error:
      type: object
      properties:
        error:
          type: object
          required:
          - message
          - type
          properties:
            message:
              type: string
            type:
              type: string
            param:
              type: string
              nullable: true
            code:
              type: string
              nullable: true
    Usage:
      type: object
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
    ImageGenerationRequest:
      type: object
      required:
      - model
      - prompt
      properties:
        model:
          type: string
          example: flux-schnell
        prompt:
          type: string
        n:
          type: integer
          default: 1
          minimum: 1
          maximum: 4
        size:
          type: string
          example: 1024x1024
        response_format:
          type: string
          enum:
          - url
          - b64_json
          default: b64_json
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: RunInfra API key. Generate at https://runinfra.ai/settings/api-keys