Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

Submit an image generation task

Server:https://openapi.felo.ai
Client Libraries

Submit an image generation task

​

Returns HTTP 202 with a persistent task_id. Poll GET /api/v1/images/generations/{task_id}. Flat input or nested input is supported; nested input takes precedence. Callback fields are ignored. Capabilities and input parameters depend on the configured model and channel.

Headers
  • X-Request-Id
    Type: string

    Optional caller request ID echoed back for diagnostics.

  • X-Felo-Channel
    Type: string

    Ordered comma-separated public channel codes. Omit this header to use default; default must be used alone. In wallet mode, default scans the model's effective public channel order in reverse, skips unpublished or unavailable channels, and selects the first available channel's provider. It includes available endpoints from that provider with the same upstream model ID and service tier. Explicit channels are validated in client-specified order; only the first channel's provider group is submitted. No automatic fallback to other providers. Legacy provider headers cannot override channel routing.

Body·ImageGenerationRequest
required
application/json

Model-specific input follows the configured public model protocol.

  • model
    Type: string
    required
  • aspect_ratio
    Type: string

    Output aspect ratio. Supported values depend on the model and channel.

  • image_size
    Type: string enum

    Resolution tier for supported Gemini token-priced image models. Available tiers depend on the model and channel.

    values
    • 512
    • 1K
    • 2K
    • 4K
  • input
    Type: object

    Optional nested input; takes precedence over flat input.

    • input_references
      Type: array object[]

      Reference images by URL/data URI or uploaded Felo file_id. At most 100 Felo references and 50,000,000 bytes per request; model/channel limits may be lower. Keep files until completion.

      • image_url
        required
        • url
          Type: string
          min length:  
          1
          required
          • Type: string
        • file_id
          Type: string
          max length:  
          80

          Uploaded Felo file owned by the authenticated user.

      • type
        enum
        const:  
        image_url
        required
        values
        • image_url
    • service_tier
      Type: string | null

      Currently only default (standard) is supported. Omitted, null, aliases and unsupported strings fallback to default; other types return HTTP 400. Configured channels and prices remain unchanged. Text APIs send the provider's standard value; Decisions and generation APIs omit the upstream field.

    • propertyName
      Type: anything
  • input_references
    Type: array object[]

    Reference images by URL/data URI or uploaded Felo file_id. At most 100 Felo references and 50,000,000 bytes per request; model/channel limits may be lower. Keep files until completion.

    • image_url
      required
      • url
        Type: string
        min length:  
        1
        required
        • Type: string
      • file_id
        Type: string
        max length:  
        80

        Uploaded Felo file owned by the authenticated user.

    • type
      enum
      const:  
      image_url
      required
      values
      • image_url
  • n
    Type: integer

    Integer numbers.

  • prompt
    Type: string
  • quality
    Type: string

    Model-specific quality or resolution tier. For supported Gemini token-priced models, auto/low map to 1K, medium to 2K and high to 4K, subject to model capabilities. Explicit image_size or resolution takes precedence over these labels. Estimated reservations do not replace actual usage billing.

  • resolution
    Type: string

    Resolution tier; must agree with image_size when both are supplied.

  • service_tier
    Type: string | null

    Currently only default (standard) is supported. Omitted, null, aliases and unsupported strings fallback to default; other types return HTTP 400. Configured channels and prices remain unchanged. Text APIs send the provider's standard value; Decisions and generation APIs omit the upstream field.

  • size
    Type: string

    Model-specific size. For supported Gemini token-priced image models, pixel dimensions select the nearest supported aspect ratio only; ignored when aspect_ratio is supplied. Use image_size or resolution for the resolution tier.

  • propertyName
    Type: anything
Responses
  • 202
    Type: object · ImageGenerationAccepted

    Task accepted

    • kind
      enum
      const:  
      image
      required
      values
      • image
    • outputs
      Type: array string[]
      required

      Empty until the task succeeds.

    • status
      enum
      const:  
      queued
      required
      values
      • queued
    • task_id
      Type: string
      required

      Task id to use for polling.

    application/json
  • 400
    Type: object · GenerationError

    Invalid request (unknown model, mixed input modes, invalid fields)

    OpenAI-compatible error envelope.

    • error
      Type: object
      • message
        Type: string
        required
      • type
        Type: string enum
        required
        values
        • invalid_request_error
        • server_error
      • code
        Type: string
      • param
        Type: string nullable
    application/json
  • 401
    Type: object · GenerationError

    Invalid or missing Felo API key

    OpenAI-compatible error envelope.

    • error
      Type: object
      • message
        Type: string
        required
      • type
        Type: string enum
        required
        values
        • invalid_request_error
        • server_error
      • code
        Type: string
      • param
        Type: string nullable
    application/json
  • 402
    Type: object · GenerationError

    Insufficient balance / billing requirement not met

    OpenAI-compatible error envelope.

    • error
      Type: object
      • message
        Type: string
        required
      • type
        Type: string enum
        required
        values
        • invalid_request_error
        • server_error
      • code
        Type: string
      • param
        Type: string nullable
    application/json
  • 403
    Type: object · GenerationError

    Account not permitted (subscription required or user banned). Disabled models are also rejected before upstream calls. Existing accepted requests and tasks continue.

    OpenAI-compatible error envelope.

    • error
      Type: object
      • message
        Type: string
        required
      • type
        Type: string enum
        required
        values
        • invalid_request_error
        • server_error
      • code
        Type: string
      • param
        Type: string nullable
    application/json
  • 429
    Type: object · GenerationError

    Request or spending limit reached

    OpenAI-compatible error envelope.

    • error
      Type: object
      • message
        Type: string
        required
      • type
        Type: string enum
        required
        values
        • invalid_request_error
        • server_error
      • code
        Type: string
      • param
        Type: string nullable
    application/json
  • 502
    Type: object · GenerationError

    Upstream provider failed

    OpenAI-compatible error envelope.

    • error
      Type: object
      • message
        Type: string
        required
      • type
        Type: string enum
        required
        values
        • invalid_request_error
        • server_error
      • code
        Type: string
      • param
        Type: string nullable
    application/json
  • 503
    Type: object · GenerationError

    Generation service or billing service temporarily unavailable

    OpenAI-compatible error envelope.

    • error
      Type: object
      • message
        Type: string
        required
      • type
        Type: string enum
        required
        values
        • invalid_request_error
        • server_error
      • code
        Type: string
      • param
        Type: string nullable
    application/json
Request Example for post/api/v1/images/generations
curl https://openapi.felo.ai/api/v1/images/generations \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "model": "configured-image-model",
  "prompt": "a cat"
}'
{
  "task_id": "string",
  "status": "queued",
  "kind": "image",
  "outputs": [
    "string"
  ]
}
Submit an image generation task

Need help?