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. 



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

Text To Image - Endpoint Features

Object Description
q [Required] Inser the text that will help the AI to generate an image.
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"images":[{"id":"017d6c3f-d7df-4df1-a2d3-780fd0e20c3a","gallery":"https://lexica.art?q=017d6c3f-d7df-4df1-a2d3-780fd0e20c3a","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/017d6c3f-d7df-4df1-a2d3-780fd0e20c3a","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/017d6c3f-d7df-4df1-a2d3-780fd0e20c3a","prompt":"artwork by greg manchess and brad rigney, bear, grapes, artstation, masterpiece, high detail ","width":1536,"height":1536,"seed":"2621529894","grid":true,"model":"stable-diffusion","guidance":7,"promptid":"ea1edab3-26fb-49e9-bffa-693c5220e0ff","nsfw":false},{"id":"02cb0912-1099-4720-a08f-20f2dcd6d36a","gallery":"https://lexica.art?q=02cb0912-1099-4720-a08f-20f2dcd6d36a","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/02cb0912-1099-4720-a08f-20f2dcd6d36a","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/02cb0912-1099-4720-a08f-20f2dcd6d36a","prompt":"linocut art print, grapes by greg rutkowski and thomas kinkade, vector graphic ","width":704,"height":512,"seed":"4060499545","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"24ad3864-1e70-4ab6-8f50-c2230c941096","nsfw":false},{"id":"06d9065f-3aac-437f-9f1c-35ebded56788","gallery":"https://lexica.art?q=06d9065f-3aac-437f-9f1c-35ebded56788","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/06d9065f-3aac-437f-9f1c-35ebded56788","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/06d9065f-3aac-437f-9f1c-35ebded56788","prompt":"dreamberry creamscape, watercolor album art, highly detailed, sharp, film, soft lighting ","width":768,"height":512,"seed":"2331710404","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"84080c00-0d6d-418d-a69f-910db046c969","nsfw":false},{"id":"10a65a71-7f59-4a1e-9f4d-935347b9cffb","gallery":"https://lexica.art?q=10a65a71-7f59-4a1e-9f4d-935347b9cffb","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/10a65a71-7f59-4a1e-9f4d-935347b9cffb","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/10a65a71-7f59-4a1e-9f4d-935347b9cffb","prompt":"muscular, hairy male harvesting grapes in a vineyard, barolo village painting by gaston bussiere, craig mullins, j. c. leyendecker, tom of finland ","width":512,"height":768,"seed":"111982428","grid":false,"model":"stable-diffusion","guidance":12,"promptid":"b05322d5-4956-4cf5-90c3-0dde6b9791f0","nsfw":false},{"id":"137a5d3f-ad89-4f7a-8b29-7df44f8077d4","gallery":"https://lexica.art?q=137a5d3f-ad89-4f7a-8b29-7df44f8077d4","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/137a5d3f-ad89-4f7a-8b29-7df44f8077d4","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/137a5d3f-ad89-4f7a-8b29-7df44f8077d4","prompt":"cats pondering grapes, still life painting, artstation ","width":512,"height":512,"seed":"2013492","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"0519a6d6-dc3b-459a-b47d-424597115da8","nsfw":false},{"id":"1a312fd8-2c16-44b4-ae2d-e9e2c18ddc38","gallery":"https://lexica.art?q=1a312fd8-2c16-44b4-ae2d-e9e2c18ddc38","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/1a312fd8-2c16-44b4-ae2d-e9e2c18ddc38","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/1a312fd8-2c16-44b4-ae2d-e9e2c18ddc38","prompt":"A squirrel stealing grapes in the style of a Dutch still life","width":512,"height":512,"seed":"4060233878","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"5d6d89db-4167-4712-adb7-12fba6c2bceb","nsfw":false},{"id":"25e20bfd-d447-43a9-84b7-003271b23eae","gallery":"https://lexica.art?q=25e20bfd-d447-43a9-84b7-003271b23eae","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/25e20bfd-d447-43a9-84b7-003271b23eae","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/25e20bfd-d447-43a9-84b7-003271b23eae","prompt":"artwork by greg manchess and brad rigney, bear turning into a cluster of grapes, artstation, masterpiece, high detail, intricate ","width":1536,"height":1536,"seed":"3318035784","grid":true,"model":"stable-diffusion","guidance":7,"promptid":"8c3c1391-09ec-4ada-b2c4-35875d5d0627","nsfw":false},{"id":"26f2e803-2ef9-4aa2-a1ee-1fdc9baaedf8","gallery":"https://lexica.art?q=26f2e803-2ef9-4aa2-a1ee-1fdc9baaedf8","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/26f2e803-2ef9-4aa2-a1ee-1fdc9baaedf8","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/26f2e803-2ef9-4aa2-a1ee-1fdc9baaedf8","prompt":"muscular, hairy male stomping grapes in a large wooden vat, near a vineyard, tuscan village painting by gaston bussiere, craig mullins, j. c. leyendecker, tom of finland ","width":512,"height":768,"seed":"2666513869","grid":false,"model":"stable-diffusion","guidance":12,"promptid":"7593f015-61da-4c6a-8c7d-08b4525c9eb4","nsfw":true},{"id":"2e0f7d74-7dae-43c2-ab83-eaf8c9808a1a","gallery":"https://lexica.art?q=2e0f7d74-7dae-43c2-ab83-eaf8c9808a1a","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/2e0f7d74-7dae-43c2-ab83-eaf8c9808a1a","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/2e0f7d74-7dae-43c2-ab83-eaf8c9808a1a","prompt":"cats pondering grapes, still life painting, artstation ","width":512,"height":512,"seed":"2013492","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"0519a6d6-dc3b-459a-b47d-424597115da8","nsfw":false},{"id":"2f9e5d6e-976e-444d-891f-4ba5ed28d57d","gallery":"https://lexica.art?q=2f9e5d6e-976e-444d-891f-4ba5ed28d57d","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/2f9e5d6e-976e-444d-891f-4ba5ed28d57d","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/2f9e5d6e-976e-444d-891f-4ba5ed28d57d","prompt":"purple grapes, album cover art ","width":512,"height":512,"seed":"192015643","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"58699bd3-3a72-4d8b-b07b-3b90a2028849","nsfw":false},{"id":"329df559-936b-4256-9551-33f8cf98f75b","gallery":"https://lexica.art?q=329df559-936b-4256-9551-33f8cf98f75b","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/329df559-936b-4256-9551-33f8cf98f75b","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/329df559-936b-4256-9551-33f8cf98f75b","prompt":"a cat with grapes on a table, still life painting, artstation ","width":512,"height":512,"seed":"4137029189","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"8f798eee-2e10-43ef-b074-062d0d900d65","nsfw":false},{"id":"3614d8e8-63d1-419a-959f-f221e81cb58b","gallery":"https://lexica.art?q=3614d8e8-63d1-419a-959f-f221e81cb58b","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/3614d8e8-63d1-419a-959f-f221e81cb58b","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/3614d8e8-63d1-419a-959f-f221e81cb58b","prompt":"wine label, vector graphic, linocut grapevine by greg rutkowski, fine details, highly detailed ","width":704,"height":512,"seed":"3065949560","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"d3837afb-2b87-4f7b-911f-f536e3b268bb","nsfw":false},{"id":"39015089-43b5-4af5-afbd-e57aa78855c3","gallery":"https://lexica.art?q=39015089-43b5-4af5-afbd-e57aa78855c3","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/39015089-43b5-4af5-afbd-e57aa78855c3","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/39015089-43b5-4af5-afbd-e57aa78855c3","prompt":"a man eats black currants in a plate, hyper realistic, hyper detailed, cfg _ scale 1 5 ","width":512,"height":512,"seed":"2033227172","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"be916f15-a5be-4843-a7d4-aa8444cb6be1","nsfw":false},{"id":"401a76f6-1614-4ad1-a6f6-745b59eb9e24","gallery":"https://lexica.art?q=401a76f6-1614-4ad1-a6f6-745b59eb9e24","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/401a76f6-1614-4ad1-a6f6-745b59eb9e24","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/401a76f6-1614-4ad1-a6f6-745b59eb9e24","prompt":"cats pondering grapes, still life painting, artstation ","width":512,"height":512,"seed":"2013492","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"0519a6d6-dc3b-459a-b47d-424597115da8","nsfw":false},{"id":"47fd97d2-dbca-4181-afca-5b7be0dbe313","gallery":"https://lexica.art?q=47fd97d2-dbca-4181-afca-5b7be0dbe313","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/47fd97d2-dbca-4181-afca-5b7be0dbe313","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/47fd97d2-dbca-4181-afca-5b7be0dbe313","prompt":"linocut art print, grapes by greg rutkowski and thomas kinkade, vector graphic ","width":704,"height":512,"seed":"4060499545","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"24ad3864-1e70-4ab6-8f50-c2230c941096","nsfw":false},{"id":"4c4031fe-e177-4f9b-9e88-b77d2b34089f","gallery":"https://lexica.art?q=4c4031fe-e177-4f9b-9e88-b77d2b34089f","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/4c4031fe-e177-4f9b-9e88-b77d2b34089f","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/4c4031fe-e177-4f9b-9e88-b77d2b34089f","prompt":"laughing Dionysus with grape in his hair, modern art","width":512,"height":512,"seed":"170920904","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"310c1670-3438-4da1-8330-5c6d9a93590f","nsfw":false},{"id":"55c9eb08-a799-4bad-adf0-28e0ab1ea2b8","gallery":"https://lexica.art?q=55c9eb08-a799-4bad-adf0-28e0ab1ea2b8","src":"https://lexica-serve-encoded-images.sharif.workers.dev/md/55c9eb08-a799-4bad-adf0-28e0ab1ea2b8","srcSmall":"https://lexica-serve-encoded-images.sharif.workers.dev/sm/55c9eb08-a799-4bad-adf0-28e0ab1ea2b8","prompt":"cats pondering grapes, still life painting, artstation ","width":512,"height":512,"seed":"2013492","grid":false,"model":"stable-diffusion","guidance":7,"promptid":"0519a6d6-dc3b-459a-b47d-424597115da8","nsfw":false},{"id":"609f15e2-5511-458a-9610-07114106c8e4","gallery":"https://lexica.art?q=609f15e2-5511-458a-9610-071141...
                                                                                                                                                                                                                    
                                                                                                    

Text To Image - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/685/ai+image+generator+api/431/text+to+image?q=grapes painting' --header 'Authorization: Bearer YOUR_API_KEY' 

    

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 commitments. One click upgrade/downgrade or cancellation. No questions asked.

🚀 Enterprise

Starts at
$ 10,000/Year


  • Custom Volume
  • Dedicated account manager
  • Service-level agreement (SLA)

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

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, look at the ‘X-Zyla-API-Calls-Monthly-Remaining’ header. For example, if your plan allows 1000 requests per month and you've used 100, this header will show 900.

To see the maximum number of API requests your plan allows, check the ‘X-Zyla-RateLimit-Limit’ header. For instance, if your plan includes 1000 requests per month, this header will display 1000.

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 3600, it means 3600 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 let you experience our APIs without any commitment, we offer a 7-day free trial that allows you to make API calls at no cost during this period. Please note that you can only use this trial once, so make sure to use it with the API that interests you the most. Most of our APIs provide a free trial, but some may not support it.

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 trial, you can make only 25% of the calls allowed by that plan. For example, if the API plan offers 1000 calls, you can make only 250 during the trial. To access the full number of calls offered by the plan, you will need to subscribe to the full plan.

 Service Level
100%
 Response Time
774ms

Category:


Related APIs