Documentation
Introduction
Ablo is a set of APIs and tools purpose built for fashion designers and creators. We utilize a set of image generation models that are custom trained on different contemporary styles (e.g. Kidult or Graffiti). Using Ablo, fashion brands can give their in-house designers and even their customers the ability to create unique designs with the click of a button.
(If you're looking for a full-featured demo of our services, sign up on ablo.ai and go to the 'Design Studio'. You can also get your API key from the /subscription page.
Main Features
Here are the core entities in the platform
Retrieve all the image generation engines / models we make available for your use. For each Style, we automatically select the engine we think does the best job, but you're free to experiment.
Any image generated via our image generation APIs ends up in our DB and is retrievable (or deletable) via API.
Templates are garments or other physical blanks with drawable areas on them. Each Template has multiple TemplateSides, TemplateColors, and Sizes. You can think of a Template like a product.
A TemplateSide represents a part of the Template that is drawable. On the TemplateSide, we define the drawable area.
A TemplateColor is one of the colors a Template comes in.
We support universal sizes for templates: XXS, XS, S, M, L, XL, and XXL. Templates that have only 1 side have a OS (one-size) Size.
A Design represents the Template with an image and/or text in one or more of the drawable areas. Like Templates and TemplateSides, Designs are composed of multiple DesignSides.
A DesignSide is a TemplateSide with a drawable area with an image and/or text inside.
Image Generation
These endpoints can be used to generate completely new images.
Use our unique fontmaker API to create graphic text in a multitude of styles.
Standard text to image with many Styles to choose from.
Standard image to image with many Styles to choose from.
Image Manipulation
These endpoints can be used to manipulate existing images.
Remove background on any image.
Send in an image and a mask to re-imagine parts of an image.
Upscale an image up to 16mp by sending a url to the image.
In order to generate images, you must pass the Style you wish to use. You should request all Styles from GET /styles and use Styles that are purpose built for each type of workflow (text, image, font)
Authentication
Every Client is issued an API key. Every call you make to the Ablo API, must be authenticated with your API key. The API key should go in the x-api-key header.
Your usage will be tracked and you will be billed according to your API key usage so best practice would be to keep it secure only on your BE so that it's not exposed to the world. We recommend proxying calls to Ablo services through your own BE.
Error Handling
Here are some common error codes we return and their meaning:
- 400: Bad Request (e.g. input data of wrong type)
- 401: Unauthorized (e.g. Not sending x-api-key or Invalid x-api-key)
- 403: Forbidden (e.g. Accessing Template or Design not owned by Client orAccessing TemplateSide or DesignSide not owned by Client)
- 404: Not Found (e.g. Accessing Template or Design that doesn't exist or was deleted, Accessing TemplateSide or DesignSide that doesn't exist or was deleted, or Accessing a route that does not exist)
- 409: Conflict (e.g. Trying to create 2 Images for the same color / side combo)
- 500: Internal Server Error (We messed up or one of our downstream services messed up. Please reach out and tell us what happened! [email protected])
FAQs
Q: How do I create a Template?
A: You can create Templates and add TemplateSides and TemplateColors, and set Sizes all through the Client Dashboard. Or, if you prefer to do it in a more automated fashion, you do it all through the API as well. You don't need Templates to utilize our image generation APIs.
Q: What is the DesignSide.canvasStateUrl field for?
A: This is utility field you can use if you've saved up some state / steps in your canvas that your users are drawing on and need to be able to retrieve or replay it later. It's optional.
Q: How do I get the available Styles I can use to generate images?
A: Call GET /styles