Skip to main content
In this guide, we’ll walk you through using one of our popular model endpoints, such as black-forest-labs/flux-kontext-pro/text-to-image. Before diving in, you’ll need an API key — see Authentication for how to create one and configure your environment. Choose your preferred programming language below to get started:

JavaScript/Node.js

To get started, install the client package and configure it with your API key:
Set your API key as an environment variable:
Once configured, you can invoke our Model API endpoint using the sunra client:

Python

Install the Python client library using pip:
Set your API key as an environment variable:
Configure and use the client:

Java

Add the Java client library to your project using your preferred build system:
Set your API key as an environment variable:
Configure and use the client:

Next Steps

We offer various models like Flux kontext pro and Kling v2 master as ready-to-use APIs. Explore these on our Model Playground. To use a model, visit its “API” tab to find the URL, source code, and usage examples, helping you integrate it seamlessly into your applications. For more detailed information about each client library, visit our client libraries documentation.