> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchbean.com/llms.txt
> Use this file to discover all available pages before exploring further.

# openai_image_generate

> Run the openai_image_generate tool. Returns a clean, normalized JSON shape.



## OpenAPI

````yaml /openapi.json post /v1/openai_image_generate
openapi: 3.1.0
info:
  title: fetchbean API
  version: v1
  description: >-
    One key for web search, page reads, weather, social data, and raw provider
    access.
servers:
  - url: https://api.fetchbean.com
security:
  - apiKeyAuth: []
paths:
  /v1/openai_image_generate:
    post:
      tags:
        - Tools
      summary: openai_image_generate
      description: >-
        Run the openai_image_generate tool. Returns a clean, normalized JSON
        shape.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              additionalProperties: true
              type: object
              required:
                - prompt
              properties:
                prompt:
                  description: what to draw
                  type: string
                model:
                  description: default gpt-image-2
                  type: string
                quality:
                  description: low (default), medium, high
                  type: string
                size:
                  description: 1024x1024 (default), 1024x1536, 1536x1024
                  type: string
                'n':
                  minimum: 1
                  maximum: 10
                  type: integer
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            billable:
              type: boolean
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your fetchbean API key (fb_…). Keys are not accepted through
        Authorization.

````