Skip to main content
The Liquid API gives you hosted access to Liquid models for text generation, vision, audio, and decisions. Chat models speak the OpenAI API, so the official OpenAI SDKs work with a new base URL. Get started by creating an API key and running your first API call.
1

Create and export an API key

Create an API key on the API keys page of Liquid Console. If you don’t have an account yet, sign up and join an organization first. The key is shown once, so store it somewhere safe. Keys belong to your organization and can be revoked at any time.Export the key as an environment variable. Every example in these docs reads it from LIQUID_API_KEY.
Requests carry the key as a bearer token. Check that it works by listing the models your organization can call:
2

Install the OpenAI SDK and make an API call

Point the official OpenAI SDK at the Liquid API’s base URL, https://api.liquid.ai/openai/v1.
Install the SDK with pip:
Create a file called example.py, copy the example into it, and run it with python example.py:
In a few moments you should see the model’s reply. Replace lfm3-1.7b with any model id from the Models page.
3

Ask a decision model

Decision models answer typed questions about a state with calibrated probabilities instead of generated text. They have their own endpoint, which implements TypeSafe’s System One API, so the official TypeSafe SDKs work with the base URL https://api.liquid.ai/decisions.
See Decisions for the SDKs and every question type.

Keep building

Text generation

Stream replies, call tools, and get structured output.

Vision

Send images to vision models.

Audio and speech

Transcribe speech and get spoken replies.

Batch

Process large request files asynchronously.