Fotor OpenAPI
  1. Reference
Fotor OpenAPI
  • Getting Started
    • Introduction
    • Access and Authentication
    • For Serverless Clients
    • Token Consumption
  • Reference
    • Get User Token Balance
      GET
    • Query Task Details
      GET
    • AI Upscaler
      POST
    • AI Skin Retouch
      POST
    • Text to Image
      POST
    • Image to Image (AI Art Effects)
      POST
    • Background Remover
      POST
    • AI Headshot
      POST
    • Photo Colorize
      POST
    • Photo Restoration
      POST
    • Face Swap
      POST
    • AI Replace
      POST
    • AI Expand
      POST
  • Webhook
    • Webhook
  • AI Editor SDK
    • Getting Started
    • Get Sdk Temporary Token
      GET
  1. Reference

Text to Image

POST
/v1/aiart/text2img
The Text2Image feature in Fotor OpenAPI leverages advanced AI technology to transform your textual descriptions into realistic images. Simply input a text description, and the system quickly generates a corresponding image—no design skills required.
This feature supports a variety of styles and templates, offering fine-grained control options to help you effortlessly create diverse and creative visuals.

Key Features#

Easy to Use:
Generate images effortlessly by simply entering a text description, with an intuitive and quick process.
Diverse Styles:
Offers a wide range of artistic styles and templates, including:
Photography
Anime
Oil Painting
3D
And more, to suit various creative needs.
Precise Control:
Supports specifying:
Image dimensions
Template selection
Negative prompts for fine-tuned results
High-Quality Output:
Delivers high-resolution images with rich details, ready for commercial use.
Fast Generation:
Powered by advanced AI algorithms and optimized server architecture, ensuring quick image creation.

Text to Image Styles#

Text to Image Styles

Request

Header Params

Body Params application/json

Example
{
    "content": "a boy",
    "sizeId": "6361e03bc09cb851c66328a4",
    "templateId": "7b3b1f40-60b0-41df-8280-238baae78c38",
    "negativePrompt": "girl"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-b.fotor.com/v1/aiart/text2img' \
--header 'Authorization: Bearer <your api key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "content": "a boy",
    "sizeId": "6361e03bc09cb851c66328a4",
    "templateId": "7b3b1f40-60b0-41df-8280-238baae78c38",
    "negativePrompt": "girl"
}'

Responses

🟢200success
application/json
Body

Example
{
    "code": "000",
    "msg": "success",
    "data": {
        "taskId": "e0dc194703174b6eafeacb4ee8e02850"
    }
}
Modified at 2025-06-25 07:51:22
Previous
AI Skin Retouch
Next
Image to Image (AI Art Effects)
Built with