Text to PNG API

Effortlessly create high-quality, transparent PNG images for seamless integration into digital designs. This feature simplifies workflows by generating versatile graphics with transparent backgrounds, ready for any application.

For additional details on each parameter and its optimal use, check out the Text to PNG API References.

A high-quality product photograph showcasing a branded sneaker

Key Features

  • Transparent Backgrounds: Produce high quality transparent images through text.

  • Customizable Output: Define dimensions, resolutions, and transparency levels.

  • High-Quality Results: Lossless compression ensures optimized file size without quality loss

  • Versatile Color Support: Includes true color and alpha channel options.

Functionality

The AI uses edge detection and color analysis to accurately control transparency effects. Adjust output dimensions and resolution for web, print, or other uses.

Strategic Value

Save time and resources with automated transparent PNG generation. This tool enhances design flexibility, ensures consistency across assets, and streamlines workflows, making it an essential resource for professional digital asset creation.

Industries

  • Technology and Software: Create transparent UI assets, icons and overlays

  • Media and Entertainment: Generate transparent visual effects and elements

  • E-commerce and Retail: Create product images with transparent backgrounds

  • Marketing and Advertising: Produce transparent logos and graphic elements

  • Education and Training: Overlay illustrations on educational content

  • Food and Hospitality: Generate transparent food images for menus

  • Healthcare: Create transparent medical visuals for presentations

  • Finance: Produce transparent graphics for reports

Endpoint

The endpoint for Text to PNG API is

POST https://api.vyro.ai/v2/image/generations/transparent

Headers

You need to pass the following headers along with the request.

Authorization

Pass your API token as a Bearer token in the Authorization header. Refer to the Authorization Section for guidance on managing your API keys.

Authorization: Bearer {{API_TOKEN}}

Request Body Parameters

Below are the parameters that allow for a high degree of customization when generating transparent images. Click on each parameter to learn more about its use and best practices:

prompt

The main text description of the image you want to generate. Use descriptive and detailed language to achieve optimal results. See Creating Prompt.

prompt="Create an image of a sleek, futuristic car with a metallic finish, featuring sharp, aerodynamic lines and glowing LED lights along the front and rear."

aspect_ratio

Defines the width-to-height ratio of the output image, such as "1:1" for square images. You can try other available aspect ratios such as "3:2" "4:3" "3:4" "16:9" and "9:16".

aspect_ratio="1:1"

Example API Call

Here’s a sample curl request that uses the parameters above:

curl --location --request POST 'https://api.vyro.ai/v2/image/generations/transparent' \
--header 'authorization: Bearer {{API_TOKEN}}' \
--form 'prompt="Create an image of a sleek, futuristic car with a metallic finish, featuring sharp, aerodynamic lines and glowing LED lights along the front and rear."' \
--form 'aspect_ratio="16:9"' 

For additional details on each parameter and its optimal use, check out the Text to PNG API References.

Response

Upon a successful request, the API returns a binary image file which can be directly rendered or saved.

Response Attributes:

  • image (binary): The generated image in binary format. You can decode and display or store it based on your application needs.

Error Handling

In case of errors, the response includes status codes and error messages. See the Errors and Troubleshooting section for help with interpreting and resolving these errors.

Last updated