Download OpenAPI specification:Download
Welcome to LimeWire Developer, a collection of RESTful APIs leveraging state-of-the-art generative AI models to allow for operations like text-to-image generation, image-to-image generation, background removal, image inpainting, image outpainting, image upscaling, and more. In due course, additional API endpoints for AI music and AI video generation will be released as well.
For every API request you make, you will need to make sure to be authenticated with the API by passing your API key as an Authorization
header to the API. You can find an manage your API key by logging in to your LimeWire account and navigating to your Account Settings.
See below for an example:
Authorization: Bearer <YOUR_API_KEY>
You are currently looking at the documentation for API version 1.0.0. Whenever you make an API request, it is recommended that you specify your desired API version using the optional X-Api-Version
header. If no header is specified, the API will default to version v1
.
See below for an example:
X-Api-Version: v1
The API is rate limited according to your subscription plan. If your usage exceeds rate limit, the API will return the following error response:
429 Too Many Requests
The API uses conventional HTTP response codes to indicate the success or failure of an API request.
In general, codes in the 2xx
range indicate success, codes in the 4xx
range indicate an error that failed given the information provided (e.g. a required parameter was omitted, a validation error, etc.), and codes in the 5xx
range indicate an error with LimeWire's servers.
All of our error responses follow the RFC 7807 standard. For more information, please refer to each API endpoint's documentation and examples below.
Our image API endpoints will allow you to perform a series of operations, including text-to-image generation, image-to-image generation, background removal, image inpainting, image outpainting as well as image upscaling.
Use this endpoint to generate a new image based on a text prompt (text-to-image). Instead of just passing a text prompt to the API, you can optionally also pass an existing image to the API (image-to-image) as the basis for your newly generated image.
ok
Bad request
API key not provided or invalid
Too many requests
Unknown internal server error
{- "prompt": "A cute baby sea otter",
- "aspect_ratio": "1:1"
}
{- "id": "296a972f-666a-44a1-a3df-c9c28a1f56c0",
- "status": "COMPLETED",
- "credits_used": 1.2,
- "credits_remaining": 983.8,
- "data": [
- {
- "asset_id": "116a972f-666a-44a1-a3df-c9c28a1f56c0",
- "type": "image/jpeg",
- "width": 1024,
- "height": 1024
}, - {
- "asset_id": "216a972f-666a-44a1-a3df-c9c28a1f56c0",
- "type": "image/jpeg",
- "width": 1024,
- "height": 1024
}
]
}
Use this endpoint to upscale an image by a scaling factor of your choice. Upscaling is the process of increasing the size of an image without compromising on image sharpness or quality. Find below an overview of the scale factors supported by the API.
Scale factor 2: the maximum input image size is 1024x1024 pixels (2,097,576 pixels).
Scale factor 3: the maximum input image size is 680x680 pixels (462,400 pixels).
Scale factor 4: the maximum input image size is 1256x1256 pixels (1,577,536 pixels).
ok
Bad request
API key not provided or invalid
Too many requests
Unknown internal server error
{- "image_asset_id": "116a972f-666a-44a1-a3df-c9c28a1f56c0",
- "upscale_factor": 2
}
{- "id": "296a972f-666a-44a1-a3df-c9c28a1f56c0",
- "status": "COMPLETED",
- "credits_used": 1.2,
- "credits_remaining": 983.8,
- "data": [
- {
- "asset_id": "116a972f-666a-44a1-a3df-c9c28a1f56c0",
- "type": "image/jpeg",
- "width": 1024,
- "height": 1024
}
]
}
Use this endpoint to outpaint an image. Outpainting is the process of extending one or all boundaries around an image by logically generating new objects and backgrounds based on the existing contents of the image.
ok
Bad request
API key not provided or invalid
Too many requests
Unknown internal server error
{- "image_asset_id": "116a972f-666a-44a1-a3df-c9c28a1f56c0",
- "direction": "UP",
- "crop_side": "LEFT"
}
{- "id": "296a972f-666a-44a1-a3df-c9c28a1f56c0",
- "status": "COMPLETED",
- "credits_used": 1.2,
- "credits_remaining": 983.8,
- "data": [
- {
- "asset_id": "116a972f-666a-44a1-a3df-c9c28a1f56c0",
- "type": "image/jpeg",
- "width": 1024,
- "height": 1024
}
]
}
Use this endpoint to modify certain parts of an image based on a text prompt you specify in your request. The area that will be manipulated can be chosen in different ways:
mask_color_rgba
that will be applied to the input image. Every pixel that
matches the specified color will be replaced using the prompt.mask_asset_id
, on which the mask_color_rgba
will be applied.ok
Bad request
API key not provided or invalid
Too many requests
Unknown internal server error
{- "image_asset_id": "116a972f-666a-44a1-a3df-c9c28a1f56c0",
- "prompt": "A cute baby sloth"
}
{- "id": "296a972f-666a-44a1-a3df-c9c28a1f56c0",
- "status": "COMPLETED",
- "credits_used": 1.2,
- "credits_remaining": 983.8,
- "data": [
- {
- "asset_id": "116a972f-666a-44a1-a3df-c9c28a1f56c0",
- "type": "image/jpeg",
- "width": 1024,
- "height": 1024
}
]
}
Use this endpoint to check if the input for a specific use case contains NSFW content.
OK
{- "prompt": "a couple kissing"
}
{- "nsfw_content_detected": true
}
Below you will find a series of endpoints that are used as ancillary endpoints when using the API.
Use this endpoint to upload an asset for further processing by the API. Uploaded assets are available for 24 hours after upload.
ok
Bad request
API key not provided or invalid
Too many requests
Unknown internal server error
{- "asset_id": "116a972f-666a-44a1-a3df-c9c28a1f56c0",
- "type": "image/jpeg",
- "height": 1024,
- "width": 1024
}
The Studio API has the following limitations:
The Studio API execute request against the best fitting model and price of each call is decided based on request parameters.
Each successful response contains a field credits_used
that indicates the number of credits used for the call
and credits_remaining
that indicates the number of credits remaining in your account.