How to integrate Forge on your platform
This document represents a walkthrough of how you can integrate Forge on your platform. Not all of these steps are essential, but following them will ensure the best end-customer experience and that overall latency is minimized when generating outputs.
1. Create an API Key
First you need to create an API key from your Scale account in order to access Scale's API. To do this
- Go to the Scale dashboard
- Click on the profile icon
- Click on API keys
- Click on Add New Key next to Test API Keys (please note that the test keys aren't meant for production testing - if you are planning to do larger scale tests, instead you can generate a "Live API Key". This will require you to put down a default payment method)
2. Create a Catalog
You can now start leveraging Scale's API. The first thing you need to do is create an empty catalog, which is a grouping of product variants. You can do so here.
3. Create a Product Variant
Once you have created a catalog, we need to add a product variant to it. For Forge, you can assume that a product variant is the same as a product. When creating the product variant, you should only provide images from a single product (or quality will be a lot worse) and you should only provide images that you want enhanced. You can create a product variant here and when doing so, you should set the field run_forge_processing
to true
so that product categorization and background removal is performed prior to running Scene Creation.
4. Run Scene Creation
You can now leverage the Scene Creation endpoint to enhance the imagery of the product variant. When making a request, you should reference the product variant via the product_variant
field. We recommend that you do not submit more than five requests concurrently, as more concurrent requests can lead to timeouts due to our infrastructure not scaling quickly enough (i.e. there is a one minute timeout on the endpoint). Additionally, we advise that you set the resolution to SD
for each request to enable faster generations. You can subsequently increase the resolution of any generation you like using the Super Resolution endpoint.
5. Run Super Resolution
If you like a generation from Scene Creation, you can then use the Super Resolution endpoint to convert the output to HD. To do this, you must reference the unique id of the generation in the path parameters of the request. All Scene Creation outputs provide a generation_id
. Converting the generation to HD will increase the resolution of the generated image and make it production ready.
Next Steps
Congratulations! You have successfully completed the walkthrough!
As a next step, we recommend that you familiarize yourself with the rest of our Forge documentation. You can find more advanced features, like Brand Styles, within our documentation.