LimeWire AI API Review: Seamless Content Creation for Developers

In Short
  • LimeWire is offering APIs for generating AI images, upscaling existing photos, inpainting, and outpainting images.
  • The Limewire AI API is easy to implement and supports several languages including Python, Ruby, Go, PHP, and more.
  • The AI API pricing starts at $29.99 per month, offering up to 3,750 images in a month.

LimeWire recently launched the AI Studio for creators and artists. Now, the company has released its RESTful APIs for content creation using top generative AI models. Developers can leverage LimeWire’s AI API to generate images from text prompts, upscale images, expand images beyond the border, and modify images using AI.

Not to mention, LimeWire is also working to bring API support for music and video generation as well. So, in this article, we review LimeWire AI APIs across many different generative AI tasks. Go through our detailed testing of the API and see if it fits your bill.

Generate Images Using LimeWire API

First of all, let’s go through the text-to-image endpoint and how you can implement the LimeWire AI API to generate images. I’m demonstrating the examples in Python, but you can choose other languages too including Node.js, PHP, Java, Go, Ruby, and more.

Here is a code sample for generating images in Python:

import requests

url = "https://api.limewire.com/api/image/generation"

payload = {
  "prompt": "A dinosaur on the moon",
  "aspect_ratio": "1:1"
}

headers = {
  "Content-Type": "application/json",
  "X-Api-Version": "v1",
  "Accept": "application/json",
  "Authorization": "Bearer <YOUR_lmwr_sk_*_HERE>"
}

response = requests.post(url, json=payload, headers=headers)

data = response.json()
print(data)

As you can see here, I am using LimeWire’s image generation endpoint (api/image/generation) and in the body, have defined the prompt. The prompt should be less than 2,000 characters, and you can also pass a negative_prompt to describe what should not be included in the image. Below, I have specified the aspect_ratio as 1:1, but you can also specify 2:3 and 3:2 as well.

Since this is the first release of LimeWire’s AI API, the X-Api-version is mentioned as v1. Simply paste your LimeWire API key next to Bearer, and you are good to go.

By the way, there are many other parameters too which you can include like samples to generate the number of images (from 1 to 4), quality to specify the desired quality (LOW, MID, and HIGH, MID is the default), style to define the image style (PHOTOREALISTIC, SCIFI, LANDSCAPE), guidance scale to ask the model to strictly adhere to your text prompt (from 1 to 100, 40 is the default). You can find more information on LimeWire’s API documentation page.

generate image using limewire AI API

Now, just call the API and you get a clean output in JSON with asset_id and asset_url of the image. It’s that simple to generate images using LimeWire’s AI API. Currently, LimeWire supports over 10 Generative AI models including BlueWillow (v3, v4, and v5), Dall -E3, Stable Diffusion XL v1.0, Google AI Imagen, and more.

Upscale Images Using LimeWire API

Next, we have the API to upscale images using LimWire’s api/image/upscaling endpoint. Here, you need to define the image_asset_id which you can generate using its “api/upload” endpoint through a POST request, as described below. After that, simply mention the upscale_factor (2, 3, or 4) and paste your API key.

import requests

url = "https://api.limewire.com/api/image/upscaling"

payload = {
  "image_asset_id": "XXXXXXXXXXXXXXXXXXXXXXXXX",
  "upscale_factor": 2
}

headers = {
  "Content-Type": "application/json",
  "X-Api-Version": "v1",
  "Accept": "application/json",
  "Authorization": "Bearer <YOUR_lmwr_sk_*_HERE>"
}

response = requests.post(url, json=payload, headers=headers)

data = response.json()
print(data)

It will return the generated asset_id along with the asset_url. In my testing, the LimWire API did a fabulous job. I passed a 1000×750 PNG image and it upscaled the image and generated a 2000×1500 image with no artifacts.

upscale images using limewire ai api

It’s often seen that when you pass an image with texts, Diffusion models struggle with texts and render them incorrectly. However, LimeWire’s image upscaling API did not botch up the text in the image, which is amazing.

Outpaint Images Using LimeWire API

Now, we come to outpainting images which allows you to extend the boundaries of the image. It generates objects and backgrounds in sync with the existing content of the image. Here, I am using LimeWire’s api/image/outpainting endpoint.

Just like above, you have to pass the image_asset_id and add the API key. Here, the “direction parameter lets you define how you want to expand the image, just one side or all directions. You can define direction as UP, DOWN, LEFT, RIGHT, or ALL.

import requests

url = "https://api.limewire.com/api/image/outpainting"

payload = {
  "image_asset_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "direction": "UP",
  "crop_side": "LEFT"
}

headers = {
  "Content-Type": "application/json",
  "X-Api-Version": "v1",
  "Accept": "application/json",
  "Authorization": "Bearer <YOUR_lmwr_sk_*_HERE>"
}

response = requests.post(url, json=payload, headers=headers)

data = response.json()
print(data)

Next, you can define the crop_side to specify which side to crop for outpainting. Not all images require cropping, however, AI models can choose if it’s required to make the image look more natural. You can define it as TOP, BOTTOM, LEFT, or RIGHT. Keep in mind, for outpainting, your image should have an aspect ratio of 1:1, 2:3 or 3:2.

expand and outpaint images using limewire AI api

I then passed a PNG image in 1:1 aspect ratio and set direction as ALL, but it failed to process the image. So I just asked it to outpaint the upper border of the image, and it successfully processed the image. You can see the difference in the above image.

Inpaint Images Using LimeWire API

Now, we come to inpainting which lets you modify the image by passing a text prompt. Simply add a text prompt along with the image, and you can manipulate the image using LimeWire’s AI API. Here, I am using the api/image/inpainting endpoint.

import requests

url = "https://api.limewire.com/api/image/inpainting"

payload = {
  "image_asset_id": "XXXXXXXXXXXXXXXXXXXXXXXXX",
  "prompt": "Add a tiger on the roof"
}

headers = {
  "Content-Type": "application/json",
  "X-Api-Version": "v1",
  "Accept": "application/json",
  "Authorization": "Bearer <YOUR_lmwr_sk_*_HERE>"
}

response = requests.post(url, json=payload, headers=headers)

data = response.json()
print(data)

I tried to run the inpainting API, but unfortunately, it kept throwing “Internal Server Error“. The API may be down for some reason. Nevertheless, this is how you can inpaint images using LimeWire’s AI API.

limewire AI API failed to inpaint image

Upload Assets Using LimeWire API

Finally, we come to uploading assets using LimeWire API. You can use the api/upload endpoint to upload your assets. LimeWire keeps the uploaded assets for 24 hours after they are uploaded. And the maximum upload size for an image is 10MB. You can use the POST request method to pass the image.

Note that, the Content-Type parameter should match the image format. Supported image formats are image/png, image/jpeg, image/x-ms-bmp, image/webp, and image/tiff.

import requests

url = "https://api.limewire.com/api/upload"

payload = '''
  [object Object]
'''

headers = {
  "Content-Type": "image/png",
  "Authorization": "Bearer <YOUR_lmwr_sk_*_HERE>"
}

response = requests.post(url, data=payload, headers=headers)

data = response.json()
print(data)

Is the LimeWire AI API Worth It?

As far as performance is concerned, LimeWire’s Generative API tools are worth it. The APIs are built on the REST architecture so they are scalable, and can deliver great performance. In my testing, the API calls were resolved in 4 to 5 seconds, which is incredible. Apart from that, the quality of generated content is also quite good as it hosts state-of-the-art Diffusion models from vendors like OpenAI, Stability AI, Google, and more.

Not to mention, the API implementation is breezy and anyone can get started with the tools in any environment. Its documentation is clean and easy to understand. Despite this being the first release of LimeWire’s AI API, there are several customization options and you can pass several parameters to generate content as you like.

As for pricing, I like what LimeWire is doing here. It has a single plan for using all kinds of APIs, as opposed to multiple plans for generating images, inpainting, outpainting, etc. that competitors are offering. The API Pro plan lets you generate up to 7,500 images per month with 4 concurrent requests. It costs $49 per month, which is pretty reasonable in comparison to its competitors. For developers and small businesses, this plan will serve well.

You can also check out the API Basic plan, which costs $29.99 per month (3,750 images) or the API Pro Plus plan which costs $250 per month (37,500 images).

#Tags
comment Comments 0
Leave a Reply