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

# Generate



## OpenAPI

````yaml https://api.tokenfactory.nebius.com/openapi.json post /v1/images/generations
openapi: 3.1.0
info:
  title: Nebius OpenAI-compatible inference API
  version: 20260506-297d05704
servers:
  - url: https://api.tokenfactory.nebius.com
security: []
paths:
  /v1/images/generations:
    post:
      tags:
        - inference
      summary: Generate
      operationId: generate_v1_images_generations_post
      parameters:
        - name: ai_project_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: current project ID
            title: Ai Project Id
          description: current project ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommonImageGenerationRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CommonImageGenerationRequest:
      properties:
        model:
          type: string
          title: Model
          description: ID of the model to use.
          examples:
            - black-forest-labs/flux-schnell
        loras:
          anyOf:
            - items:
                $ref: '#/components/schemas/LoRA'
              type: array
              maxItems: 10
              minItems: 1
            - type: 'null'
          title: Loras
          description: List of publicly accessible LoRAs compatible with the selected model
          examples:
            - scale: 1
              url: >-
                https://civitai.com/api/download/models/244808?type=Model&format=SafeTensor
        prompt:
          type: string
          maxLength: 2000
          minLength: 1
          title: Prompt
          description: A text description of the desired image(s).
        width:
          type: integer
          maximum: 2048
          minimum: 64
          title: Width
          description: The width of the generated image(s) in pixels.
          default: 512
        height:
          type: integer
          maximum: 2048
          minimum: 64
          title: Height
          description: The height of the generated image(s) in pixels.
          default: 512
        num_inference_steps:
          anyOf:
            - type: integer
              maximum: 80
              minimum: 1
            - type: 'null'
          title: Num Inference Steps
          description: >-
            Number of denoising steps in the diffusion process. Higher values
            generally result in higher quality images but take longer to
            generate.
        seed:
          type: integer
          minimum: -1
          title: Seed
          description: Random seed for image generation. Use -1 for a random seed.
          default: -1
        guidance_scale:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Guidance Scale
          description: >-
            Guidance scale for the model. Higher values make the image adhere
            more closely to the prompt.
        negative_prompt:
          type: string
          maxLength: 2000
          minLength: 0
          title: Negative Prompt
          description: A text description of the non-desired image(s).
          default: ''
        response_extension:
          allOf:
            - $ref: '#/components/schemas/ResponseExtension'
          description: The format of the output image(s).
          default: webp
        response_format:
          allOf:
            - $ref: '#/components/schemas/app__repository__models__ResponseFormat'
          description: The way output image will be returned.
          default: url
      type: object
      required:
        - model
        - prompt
      title: CommonImageGenerationRequest
    ImageGenerationResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ImageObject'
          type: array
          title: Data
        id:
          type: string
          title: Id
      type: object
      required:
        - data
        - id
      title: ImageGenerationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LoRA:
      properties:
        url:
          type: string
          maxLength: 1000
          minLength: 1
          title: Url
          description: LoRA .safetensors URL
        scale:
          type: number
          maximum: 1000
          minimum: 0
          title: Scale
          description: Scale of LoRA weights
      type: object
      required:
        - url
        - scale
      title: LoRA
    ResponseExtension:
      type: string
      enum:
        - webp
        - jpg
        - png
      title: ResponseExtension
    app__repository__models__ResponseFormat:
      type: string
      enum:
        - b64_json
        - url
      title: ResponseFormat
    ImageObject:
      properties:
        b64_json:
          anyOf:
            - type: string
            - type: 'null'
          title: B64 Json
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
      type: object
      title: ImageObject
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````