Getting Started

You're on your way to using Scenario's API to build awesome stuff. Here are some of the things you'll want to check out.

Don't hesitate to share your integrations in our Discord; we'd be happy to see your creations!

🚧

The API is still in active development

Get ready for a top-notch developer experience as we strive to deliver the best API for you! However, do keep in mind that, during the upcoming months, there might be some inevitable breaking changes. We kindly request you to take this into consideration while integrating the API into your esteemed products.

Please take care of deprecation notice for example 🤗

👀 Pre-requisites

You can provision an API key and API secret yourself from the Scenario web application:

  1. Go to your workspace or Create a new one.
"Create Workspace"

"Create Workspace"

  1. If necessary, complete the workspace form
  2. Go to "Workspace Settings"
  3. "Add API Key"
"Add API key"

"Add API key"

  1. Follow instructions

🧑‍🏫 A bit of vocabulary

You will find many answers about Scenario's concepts and terms in our Helpdesk. Here are some terms specific to the API:

Model

A model is a generator in the web app. See our dedicated article about generators to learn more. To create a model, you must upload training images and specify some parameters. Then, our cloud platform will handle the training.

Inference

An inference is a request to generate images from a generator. You can specify parameters and generate multiple images in a single request.

Image

An image is one of the inference results, similar to the web app.

🔐 Authentication

The API uses Basic authentication, all your requests must have the Authorization header set to Basic <credentials> where credentials is the Base64 encoding of your API key and API secret joined by a single colon :.

👉

Example

For instance, if your API key is hello and your API secret world, then you must compute the Base64 encoding for hello:world which is aGVsbG86d29ybGQ=.

Thus, all your requests must include the following header:

Authorization: Basic aGVsbG86d29ybGQ=

🐣 Create and train your first model

Congrats, you're ready to move on to the real things!

Follow this recipe to create your first model:

🐥 Run your first inference

Now that you have your first model trained; copy its ID and follow this recipe to run your first inference:

🐓 Discover all the possibilities

You've seen the basics of the API. Explore all the API routes to discover all the possibilities: Export API Reference

🛟 Support

A question about the API? Drop us an email at [email protected] or chat with us on Discord.

A bug, a feature request, or a suggestion? Please submit it in our Feedback Center (you will be able to track progress in the roadmap).