FriendliAI Dedicated.Image API
The Dedicated.Image API from FriendliAI — 2 operation(s) for dedicated.image.
The Dedicated.Image API from FriendliAI — 2 operation(s) for dedicated.image.
openapi: 3.1.0
info:
title: Friendli Suite API Reference Container.Audio Dedicated.Image API
description: This is an OpenAPI reference of Friendli Suite API.
termsOfService: https://friendli.ai/terms-of-service
contact:
name: FriendliAI Support Team
email: support@friendli.ai
version: 0.1.0
servers:
- url: https://api.friendli.ai
tags:
- name: Dedicated.Image
paths:
/dedicated/v1/images/generations:
post:
tags:
- Dedicated.Image
summary: Image generations
description: Generate an image from a text prompt.
operationId: dedicatedImagesGenerate
security:
- token: []
parameters:
- name: X-Friendli-Team
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: ID of team to run requests as (optional parameter).
title: X-Friendli-Team
description: ID of team to run requests as (optional parameter).
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DedicatedImageGenerationBody'
responses:
'200':
description: Successfully generated image(s).
content:
application/json:
schema:
$ref: '#/components/schemas/DedicatedImageGenerateSuccess'
examples:
Example:
value:
data:
- url: (url-to-generated-image)
seed: 123
response_format: url
'422':
description: Unprocessable Entity
x-speakeasy-name-override: generate
x-mint:
metadata:
title: Dedicated Image Generations
sidebarTitle: Image Generations
og:title: Dedicated Image Generations
description: Generate an image from a text prompt.
og:description: Generate an image from a text prompt.
href: /openapi/dedicated/inference/image-generations
content: 'Generate an image from a text prompt.
To request successfully, it is mandatory to enter a **Personal API Key** (e.g. flp_XXX) value in the **Bearer Token** field.
Refer to the [authentication section](/openapi/introduction#authentication) on our introduction page to learn how to acquire this variable and [visit here](https://friendli.ai/suite/~/setting/keys) to generate your API Key.'
/dedicated/v1/images/edits:
post:
tags:
- Dedicated.Image
summary: Image edits
description: Edit an image based on a text prompt.
operationId: dedicatedImagesEdit
security:
- token: []
parameters:
- name: X-Friendli-Team
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: ID of team to run requests as (optional parameter).
title: X-Friendli-Team
description: ID of team to run requests as (optional parameter).
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DedicatedImageEditBody'
responses:
'200':
description: Successfully edited image(s).
content:
application/json:
schema:
$ref: '#/components/schemas/DedicatedImageEditSuccess'
examples:
Example:
value:
data:
- url: (url-to-edited-image)
seed: 789
response_format: url
'422':
description: Unprocessable Entity
x-speakeasy-name-override: edit
x-mint:
metadata:
title: Dedicated Image Edits
sidebarTitle: Image Edits
og:title: Dedicated Image Edits
description: Edit an image based on a text prompt.
og:description: Edit an image based on a text prompt.
href: /openapi/dedicated/inference/image-edits
content: 'Edit an image based on a text prompt.
To request successfully, it is mandatory to enter a **Personal API Key** (e.g. flp_XXX) value in the **Bearer Token** field.
Refer to the [authentication section](/openapi/introduction#authentication) on our introduction page to learn how to acquire this variable and [visit here](https://friendli.ai/suite/~/setting/keys) to generate your API Key.'
components:
schemas:
UrlImageItem:
properties:
seed:
type: integer
title: Seed
description: The seed used during image generation.
response_format:
type: string
enum:
- url
- raw
- png
- jpeg
- jpg
title: Response Format
description: The format of the generated image. One of `url(default)`, `raw`, `png`, `jpeg`, and `jpg`.
url:
type: string
title: Url
description: The URL of the generated image.
type: object
required:
- seed
- response_format
- url
title: UrlImageItem
ImageInput:
properties:
image:
type: string
title: Image
description: An input image, provided either as a URL or a base64-encoded string. Maximum supported image size is 50 MiB.
examples:
- https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png
- data:image/png;base64,...
type: object
required:
- image
title: ImageInput
DedicatedImageGenerationBody:
properties:
model:
type: string
title: Model
description: ID of target endpoint. If you want to send request to specific adapter, use the format "YOUR_ENDPOINT_ID:YOUR_ADAPTER_ROUTE". Otherwise, you can just use "YOUR_ENDPOINT_ID" alone.
examples:
- (endpoint-id)
prompt:
type: string
title: Prompt
description: A text description of the desired image(s).
num_inference_steps:
type: integer
title: Num Inference Steps
description: 'The number of inference steps to use during image generation. Defaults to 20. Supported range: [1, 50].'
default: 20
guidance_scale:
anyOf:
- type: number
- type: 'null'
title: Guidance Scale
description: Adjusts the alignment of the generated image with the input prompt. Higher values (e.g., 8-10) make the output more faithful to the prompt, while lower values (e.g., 1-5) encourage more creative freedom. This parameter may be irrelevant for certain models, such as `FLUX.Schnell`.
seed:
anyOf:
- type: integer
- type: 'null'
title: Seed
description: The seed to use for image generation.
response_format:
anyOf:
- type: string
enum:
- url
- raw
- png
- jpeg
- jpg
- type: 'null'
title: Response Format
description: The format in which the generated image(s) will be returned. One of `url(default)`, `raw`, `png`, `jpeg`, and `jpg`.
default: url
control_images:
anyOf:
- items:
$ref: '#/components/schemas/ImageInput'
type: array
- type: 'null'
title: Control Images
description: Optional input images used to condition or guide the generation process (e.g., for ControlNet or image editing models). This field is only applicable when using ControlNet or image editing models.
controlnet_weights:
anyOf:
- items:
type: number
type: array
- type: 'null'
title: Controlnet Weights
description: A list of weights that determine the influence of each ControlNet model in the generation process. Each value must be within [0, 1], where 0 disables the corresponding ControlNet and 1 applies it fully. When multiple ControlNet models are used, the list length must match the number of control images. If omitted, all ControlNet models default to full influence (1.0). This field is only applicable when using ControlNet models.
type: object
required:
- model
- prompt
title: DedicatedImageGenerationBody
example:
model: (endpoint-id)
num_inference_steps: 10
prompt: An orange Lamborghini driving down a hill road at night with a beautiful ocean view in the background.
B64ImageItem:
properties:
seed:
type: integer
title: Seed
description: The seed used during image generation.
response_format:
type: string
enum:
- url
- raw
- png
- jpeg
- jpg
title: Response Format
description: The format of the generated image. One of `url(default)`, `raw`, `png`, `jpeg`, and `jpg`.
b64_json:
type: string
format: binary
title: B64 Json
description: The base64-encoded JSON of the generated image.
type: object
required:
- seed
- response_format
- b64_json
title: B64ImageItem
DedicatedImageEditSuccess:
$ref: '#/components/schemas/ImageGenerationDedicatedResult'
title: DedicatedImageEditSuccess
ImageGenerationDedicatedResult:
properties:
data:
anyOf:
- items:
$ref: '#/components/schemas/UrlImageItem'
type: array
- items:
$ref: '#/components/schemas/B64ImageItem'
type: array
title: Data
type: object
required:
- data
title: ImageGenerationDedicatedResult
DedicatedImageEditBody:
properties:
image:
anyOf:
- $ref: '#/components/schemas/ImageInput'
- items:
$ref: '#/components/schemas/ImageInput'
type: array
title: Image
description: The image(s) to edit. Must be in a supported image format.
prompt:
type: string
title: Prompt
description: A text description of the desired image(s).
model:
type: string
title: Model
description: ID of target endpoint. If you want to send request to specific adapter, use the format "YOUR_ENDPOINT_ID:YOUR_ADAPTER_ROUTE". Otherwise, you can just use "YOUR_ENDPOINT_ID" alone.
examples:
- (endpoint-id)
num_inference_steps:
type: integer
title: Num Inference Steps
description: 'The number of inference steps to use during image generation. Defaults to 20. Supported range: [1, 50].'
default: 20
guidance_scale:
anyOf:
- type: number
- type: 'null'
title: Guidance Scale
description: Adjusts the alignment of the generated image with the input prompt. Higher values (e.g., 8-10) make the output more faithful to the prompt, while lower values (e.g., 1-5) encourage more creative freedom. This parameter may be irrelevant for certain models, such as `FLUX.Schnell`.
seed:
anyOf:
- type: integer
- type: 'null'
title: Seed
description: The seed to use for image generation.
response_format:
anyOf:
- type: string
enum:
- url
- raw
- png
- jpeg
- jpg
- type: 'null'
title: Response Format
description: The format in which the generated image(s) will be returned. One of `url(default)`, `raw`, `png`, `jpeg`, and `jpg`.
default: url
type: object
required:
- image
- prompt
- model
title: DedicatedImageEditBody
example:
guidance_scale: 0.0
image: '@/path/to/file/image.png'
model: (endpoint-id)
num_inference_steps: 20
prompt: Add a red sports car in the foreground.
DedicatedImageGenerateSuccess:
$ref: '#/components/schemas/ImageGenerationDedicatedResult'
title: DedicatedImageGenerateSuccess
securitySchemes:
token:
type: http
description: 'When using Friendli Suite API for inference requests, you need to provide a **Friendli Token** for authentication and authorization purposes.
For more detailed information, please refer [here](https://friendli.ai/docs/openapi/introduction#authentication).'
scheme: bearer
x-speakeasy-retries:
strategy: backoff
backoff:
initialInterval: 500
maxInterval: 60000
maxElapsedTime: 3600000
exponent: 1.5
statusCodes:
- 429
- 500
- 502
- 503
- 504
retryConnectionErrors: true