Skip to main content
Get started with Synthefy’s Forecasting API in minutes. This guide will walk you through deploying the API locally and making your first forecast request using our Python client.

Prerequisites

  • Docker installed on your system
  • Python 3.11+ installed
  • Access to the Synthefy container registry

Deployment

Pull and Run the Container

If you’d like to try our forecasting API, please do the following:

Python Client Setup

Install the Synthefy Client

Install the Synthefy Python client from PyPI:

Authentication

The Synthefy client handles authentication differently depending on the target domain:
  • Synthefy Cloud (synthefy.com): Requires a valid API key for authentication
  • On-Premise/Local Deployments: No API key required - set api_key=None or omit the parameter entirely
Domain-Based Authentication: The client automatically detects the target domain and adjusts authentication accordingly. For non-Synthefy domains (localhost, on-premise deployments, etc.), authentication is handled automatically without requiring an API key.

Basic Usage Example

Here’s a complete example of using the Synthefy client to make forecast requests:

Understanding the Code

Let’s break down the key components of this example:

1. Imports and Setup

The client provides typed data models for request/response handling and comprehensive error handling.

2. Creating the Request

Each SingleEvalSamplePayload represents a time series with historical data and target timestamps for forecasting.

3. Client Configuration and Request

The client handles connection management and provides a clean interface for making requests.
API Key for Non-Synthefy Domains: When connecting to domains other than synthefy.com (like localhost or on-premise deployments), the api_key should be omitted or explicitly set to None. The client automatically handles authentication for non-Synthefy domains without requiring an API key.

4. Error Handling

The example includes comprehensive error handling for different types of API errors, making it easy to debug issues.

Expected Output

When you run this example, you should see output similar to:

Next Steps

Python SDK Documentation

Explore the complete Python SDK documentation.

Support

Get help with deployment, authentication, or custom integrations.
Need help? Contact our support team at support@synthefy.com for assistance with deployment or integration questions.