With just a few lines of Python, you can build dynamic Streamlit dashboards, create low-code AI interfaces, and scale to production faster - all while keeping the simplicity developers love about Streamlit.
This guide assumes you have basic knowledge of Python and Streamlit. You’ll also need a Thesys API key from the C1 Console.

Visualizing data

1

Install Streamlit and Thesys

pip install streamlit streamlit-thesys pandas
2

Create a new Streamlit app

import streamlit as st
import pandas as pd
import streamlit_thesys as thesys

# Load some example data
df = pd.read_csv("sales.csv")
api_key = os.getenv("THESYS_API_KEY")

st.title("Generative Visualizations with Thesys")
# Generate a chart dynamically
thesys.visualize(
  instructions="Show monthly sales as a line chart",
  data=df,
  api_key=api_key
)

3

Run the app

export THESYS_API_KEY=<your-api-key>
streamlit run app.py

Using the LLM API directly

Since Thesys is a OpenAI compatible API, you can use it with any OpenAI compatible library.
1

Installing dependencies

pip install openai
2

Create a new Streamlit app

import os
import openai
import streamlit as st
import streamlit_thesys as thesys

client = openai.OpenAI(
    base_url="https://api.thesys.dev/v1",
    api_key=os.getenv("THESYS_API_KEY"))

response = client.chat.completions.create(
    model="c1/anthropic/claude-sonnet-4/v-20250815",
    messages=[{"role": "user", "content": "Population trend in the US"}])

st.title("Population trend in the US")
thesys.render_reponse(response.choices[0].message.content)
3

Run the app

export THESYS_API_KEY=<your-api-key>
streamlit run app.py