AI Image Generator API

Generate images from text with this API. Easy to implement and use.

About the API:

This API uses Stable-Diffusion to create the images you want basing on your text. 

 

What this API receives and what your API provides (input/output)?

This API will receive a text and deliver a list of different created images. 

You can find your created image in the "src" field.

 

What are the most common uses cases of this API?

Text-to-image APIs are beneficial to create images copyright free for different purposes. 

For example, you can use this API to create images for your magazines, research, and many more. 

You can use this API to programmatically create images for blogs and websites. 

 

Are there any limitations to your plans?

Besides the number of API calls per month, there are no other limitations. 

API Documentation

Endpoints


Using Stable-Diffusion, this API will deliver images based on your texts. 

Receive an array of different options for you to choose from. They will be available in the "src" field. 



                                                                            
POST https://zylalabs.com/api/685/ai+image+generator+api/431/text+to+image
                                                                            
                                                                        

Text To Image - Endpoint Features

Object Description
Request Body [Required] Json
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"images":[{"id":"028eea4d-9b97-4c92-bba0-40999be648b3","gallery":"https://lexica.art?q=028eea4d-9b97-4c92-bba0-40999be648b3","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/028eea4d-9b97-4c92-bba0-40999be648b3","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/028eea4d-9b97-4c92-bba0-40999be648b3","prompt":"artistic render of a scene with detailed blueberry bushes in a nordic forest. Digital art. 4K. Unreal engine. Trending on artstation.","width":512,"height":512,"seed":"94332380","grid":false,"model":"stable-diffusion","guidance":12,"promptid":"4474da98-0ac9-45d4-b9e6-e7c9c5fd433d","nsfw":false},{"id":"032e9f9e-632d-4346-be25-224ddd3521ec","gallery":"https://lexica.art?q=032e9f9e-632d-4346-be25-224ddd3521ec","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/032e9f9e-632d-4346-be25-224ddd3521ec","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/032e9f9e-632d-4346-be25-224ddd3521ec","prompt":"minecraft in real life tall mountain surrounded in sparse forest photorealistic artwork very detailed beautiful landscape painted by Caspar David Friedrich","width":960,"height":512,"seed":"3092298845","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"a0f77f62-964e-41a7-9b91-e94897ef37f3","nsfw":false},{"id":"078f0e6f-9c80-45b8-a168-856b47ac2196","gallery":"https://lexica.art?q=078f0e6f-9c80-45b8-a168-856b47ac2196","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/078f0e6f-9c80-45b8-a168-856b47ac2196","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/078f0e6f-9c80-45b8-a168-856b47ac2196","prompt":"unreal engine render of a dense rain forest, photo realism and very detailed and realistic, comparable to real life ","width":1024,"height":1024,"seed":"183075181","grid":true,"model":"stable-diffusion","guidance":7,"promptid":"a959d8f8-a861-402b-9f9d-816d60569931","nsfw":false},{"id":"14c25ed2-27d6-4173-b0b5-ee49b0c0c228","gallery":"https://lexica.art?q=14c25ed2-27d6-4173-b0b5-ee49b0c0c228","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/14c25ed2-27d6-4173-b0b5-ee49b0c0c228","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/14c25ed2-27d6-4173-b0b5-ee49b0c0c228","prompt":"still shot of a lake covered in morning fog, highly detailed, photorealistic portrait, bright studio setting, studio lighting, crisp quality and light reflections, unreal engine 5 quality render ","width":512,"height":512,"seed":"511116819","grid":false,"model":"stable-diffusion","guidance":9,"promptid":"bada96e6-30fa-424e-911a-559b99861159","nsfw":false},{"id":"156db876-8371-416a-9c9a-8179fec8f4ed","gallery":"https://lexica.art?q=156db876-8371-416a-9c9a-8179fec8f4ed","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/156db876-8371-416a-9c9a-8179fec8f4ed","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/156db876-8371-416a-9c9a-8179fec8f4ed","prompt":"looking down a mountain at a forest of hammerhead sharks, sharp focus, octane render ","width":640,"height":640,"seed":"2140898096","grid":false,"model":"stable-diffusion","guidance":12,"promptid":"2539ff06-b68e-43d4-9812-68db10fb45b1","nsfw":false},{"id":"228406f4-9c41-4573-934b-847a87fae996","gallery":"https://lexica.art?q=228406f4-9c41-4573-934b-847a87fae996","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/228406f4-9c41-4573-934b-847a87fae996","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/228406f4-9c41-4573-934b-847a87fae996","prompt":"A boreal forest, rendered in the candy engine","width":768,"height":512,"seed":"2416696443","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"23fc5f5a-f49b-4de4-a63e-8766b41da128","nsfw":false},{"id":"2362b65f-d44a-479a-a044-53428bd048f2","gallery":"https://lexica.art?q=2362b65f-d44a-479a-a044-53428bd048f2","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/2362b65f-d44a-479a-a044-53428bd048f2","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/2362b65f-d44a-479a-a044-53428bd048f2","prompt":"A boreal forest, rendered in the candy engine","width":768,"height":512,"seed":"2416696443","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"23fc5f5a-f49b-4de4-a63e-8766b41da128","nsfw":false},{"id":"2bf6f60f-669e-4b22-aa19-e6e1d474f247","gallery":"https://lexica.art?q=2bf6f60f-669e-4b22-aa19-e6e1d474f247","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/2bf6f60f-669e-4b22-aa19-e6e1d474f247","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/2bf6f60f-669e-4b22-aa19-e6e1d474f247","prompt":"a wide shot of a forest growing on top of cumulus clouds, beautiful, stunning, serene, volumetric light, volumetric clouds, photography, color, intricate, extremely detailed, photorealistic, unreal engine 5","width":1216,"height":512,"seed":"3106880201","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"34f8561f-24cb-4eeb-a8a6-bd34da234355","nsfw":false},{"id":"305f1ba7-be3d-4809-add8-871dea50bedf","gallery":"https://lexica.art?q=305f1ba7-be3d-4809-add8-871dea50bedf","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/305f1ba7-be3d-4809-add8-871dea50bedf","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/305f1ba7-be3d-4809-add8-871dea50bedf","prompt":"a large ceramic still distilling eucalyptus into green oil, amphora, eucalyptus forest background, slope, romanesque, futuristic, vat, alchemical still, 3 d render, atmospheric, dynamic lighting, ","width":1280,"height":704,"seed":"28538827","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"6f79c8a9-dcd6-4587-82d8-a4a0b2dea225","nsfw":false},{"id":"4b36f53b-2bca-4e25-9da3-f15cc49226cd","gallery":"https://lexica.art?q=4b36f53b-2bca-4e25-9da3-f15cc49226cd","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/4b36f53b-2bca-4e25-9da3-f15cc49226cd","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/4b36f53b-2bca-4e25-9da3-f15cc49226cd","prompt":"a beautiful forest by Greg Rutkowski","width":1536,"height":1536,"seed":"56840901","grid":true,"model":"stable-diffusion","guidance":21,"promptid":"eb2a2386-9da1-4264-afa1-0740de9af2d6","nsfw":false},{"id":"4e67836b-5ac2-4871-948e-70c74af4560c","gallery":"https://lexica.art?q=4e67836b-5ac2-4871-948e-70c74af4560c","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/4e67836b-5ac2-4871-948e-70c74af4560c","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/4e67836b-5ac2-4871-948e-70c74af4560c","prompt":"bosch and beeple painting of a magnificent garden ","width":2304,"height":3840,"seed":"3049316108","grid":true,"model":"stable-diffusion","guidance":7,"promptid":"4f3e5e4e-9437-47f9-901c-7d55a89b09ea","nsfw":false},{"id":"50a179ba-73d5-4d1d-b6af-b13c2c6f0336","gallery":"https://lexica.art?q=50a179ba-73d5-4d1d-b6af-b13c2c6f0336","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/50a179ba-73d5-4d1d-b6af-b13c2c6f0336","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/50a179ba-73d5-4d1d-b6af-b13c2c6f0336","prompt":"atmospheric render of a forest, minecraft, rendered with blender, 4 k, rtx ","width":512,"height":512,"seed":"2874379529","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"0d6a4df0-58d1-4424-bda4-4e06ead834d5","nsfw":false},{"id":"50a8c70e-7bf9-4c27-ba39-7a0645a55117","gallery":"https://lexica.art?q=50a8c70e-7bf9-4c27-ba39-7a0645a55117","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/50a8c70e-7bf9-4c27-ba39-7a0645a55117","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/50a8c70e-7bf9-4c27-ba39-7a0645a55117","prompt":"small new england colonial village on a river in the white mountains of new hampshire, fall foliage, realistic, unreal engine render, octane render, hyper realistic, photo, 8 k ","width":640,"height":640,"seed":"704326532","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"2961a1d0-196a-4fa6-9e91-9adbcdc410eb","nsfw":false},{"id":"56030b96-2eec-4460-a5ad-70750da6d4b7","gallery":"https://lexica.art?q=56030b96-2eec-4460-a5ad-70750da6d4b7","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/56030b96-2eec-4460-a5ad-70750da6d4b7","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/56030b96-2eec-4460-a5ad-70750da6d4b7","prompt":"Forest of endless trees with ancient ruins, photorealistic digital art by Makoto Shinkai and Ivan Shishkin, oil on canvas, pixiv wallpaper","width":1024,"height":1024,"seed":"3034049735","grid":true,"model":"stable-diffusion","guidance":10,"promptid":"e47db768-2b19-414d-bd93-acddb8ae5aed","nsfw":false},{"id":"60c74e6e-f387-4f0a-b691-ac7e407a1a9b","gallery":"https://lexica.art?q=60c74e6e-f387-4f0a-b691-ac7e407a1a9b","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/60c74e6e-f387-4f0a-b691-ac7e407a1a9b","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/60c74e6e-f387-4f0a-b691-ac7e407a1a9b","prompt":"The Garden of Osmanthus, game concept art by Akihiko Yoshida, trending on artstation and cgsociety","width":1280,"height":704,"seed":"642705195","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"c4cb805f-c1e9-4321-9b6f-dcf3c1681617","nsfw":false},{"id":"66a944d3-6dda-4088-8827-a84736405c2e","gallery":"https://lexica.art?q=66a944d3-6dda-4088-8827-a84736405c2e","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/66a944d3-6dda-4088-8827-a84736405c2e","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/66a944d3-6dda-4088-8827-a84736405c2e","prompt":"cattail forest scaled up to human size, riding a boat, concept art, 3 d render, realistic, focused ","width":512,"height":512,"seed":"890616023","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"a4f25431-fb7a-4e4d-8ba2-2868e25037c6","nsfw":false},{"id":"6933a10c-c29b-462d-b700-bfef56ce7a9c","gallery":"https://lexica.art?q=6933a10c-c29b-462d-b700-bfef56ce7a9c","src":"https://lexica-ser...
                                                                                                                                                                                                                    
                                                                                                    

Text To Image - CODE SNIPPETS


curl --location --request POST 'https://zylalabs.com/api/685/ai+image+generator+api/431/text+to+image' --header 'Authorization: Bearer YOUR_API_KEY' 

--data-raw '{
  "inputs": "big fish"
}'

    

API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the AI Image Generator API REST API, simply include your bearer token in the Authorization header.
Headers
Header Description
Authorization [Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

Simple Transparent Pricing

No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.

πŸš€ Enterprise

Starts at
$ 10,000/Year


  • Custom Volume
  • Specialized Customer Support
  • Real-Time API Monitoring

Customer favorite features

  • βœ”οΈŽ Only Pay for Successful Requests
  • βœ”οΈŽ Free 7-Day Trial
  • βœ”οΈŽ Multi-Language Support
  • βœ”οΈŽ One API Key, All APIs.
  • βœ”οΈŽ Intuitive Dashboard
  • βœ”οΈŽ Comprehensive Error Handling
  • βœ”οΈŽ Developer-Friendly Docs
  • βœ”οΈŽ Postman Integration
  • βœ”οΈŽ Secure HTTPS Connections
  • βœ”οΈŽ Reliable Uptime

AI Image Generator API FAQs

The Text To Image endpoint returns an array of generated images based on the provided text. Each image object includes fields such as "id," "src," "srcSmall," "prompt," "width," and "height," allowing users to access various image sizes and details.

Key fields in the response data include "id" (unique identifier), "src" (URL of the generated image), "srcSmall" (URL of a smaller version), "prompt" (text used for generation), "width," "height," and "gallery" (link to the image gallery).

The response data is organized as a JSON object containing an "images" array. Each element in the array represents a generated image with its associated metadata, making it easy to iterate through and access specific image details.

The primary parameter for the Text To Image endpoint is the "text" input, which specifies the description for image generation. Users can customize their requests by varying the text to achieve different artistic results.

Users can utilize the returned data by accessing the "src" field to display images on websites or applications. The "prompt" field can help in understanding the context of the image, while "width" and "height" can assist in layout planning.

Typical use cases include generating unique images for blogs, websites, magazines, and research projects. The API is also useful for artists and designers seeking inspiration or creating visual content without copyright concerns.

Data accuracy is maintained through the use of Stable-Diffusion, a well-established model for generating images from text. Continuous updates and improvements to the model help ensure high-quality outputs that align with user prompts.

Users can expect a variety of artistic styles and interpretations based on their input text. The generated images may vary in detail and composition, reflecting the diversity of prompts, which allows for creative exploration and experimentation.

General FAQs

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the world’s most reliable payment companies. If you have any trouble paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.

The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.

Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]

Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.

API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.

Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.

To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.

To check how many API calls you have left for the current month, refer to the β€˜X-Zyla-API-Calls-Monthly-Remaining’ field in the response header. For example, if your plan allows 1,000 requests per month and you've used 100, this field in the response header will indicate 900 remaining calls.

To see the maximum number of API requests your plan allows, check the β€˜X-Zyla-RateLimit-Limit’ response header. For instance, if your plan includes 1,000 requests per month, this header will display 1,000.

The β€˜X-Zyla-RateLimit-Reset’ header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3,600, it means 3,600 seconds are left until the limit resets.

Yes, you can cancel your plan anytime by going to your account and selecting the cancellation option on the Billing page. Please note that upgrades, downgrades, and cancellations take effect immediately. Additionally, upon cancellation, you will no longer have access to the service, even if you have remaining calls left in your quota.

You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

To give you the opportunity to experience our APIs without any commitment, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost. This trial can be used only once, so we recommend applying it to the API that interests you the most. While most of our APIs offer a free trial, some may not. The trial concludes after 7 days or once you've made 50 requests, whichever occurs first. If you reach the 50 request limit during the trial, you will need to "Start Your Paid Plan" to continue making requests. You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab. Alternatively, if you don't cancel your subscription before the 7th day, your free trial will end, and your plan will automatically be billed, granting you access to all the API calls specified in your plan. Please keep this in mind to avoid unwanted charges.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, it’s important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.

When you subscribe to an API free trial, you can make up to 50 API calls. If you wish to make additional API calls beyond this limit, the API will prompt you to perform an "Start Your Paid Plan." You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab.

Payout Orders are processed between the 20th and the 30th of each month. If you submit your request before the 20th, your payment will be processed within this timeframe.


Related APIs