Articles on: Developers

API Overview

Getting Started



You're on your way to using Scenario's API to build awesome stuff. Follow the link below to check out the documentation page.
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:


Go to your workspace or Create a new one.

"Create Workspace"
If necessary, complete the workspace form

Go to "Workspace Settings" and Click + Add API Key

"Add API Key"
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=

For more information including Recipes to Create and Train your first model, Run your first inference, and Discover all the possibilities by Exporting the API Reference go to: https://docs.scenario.com/docs#-pre-requisites

See examples of the API in action!

Updated on: 04/05/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!