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 Requests carry the key as a bearer token. Check that it works by listing the models your organization can call:
LIQUID_API_KEY.- macOS / Linux
- Windows
Install the OpenAI SDK and make an API call
Point the official OpenAI SDK at the Liquid API’s base URL, In a few moments you should see the model’s reply. Replace
https://api.liquid.ai/openai/v1.- Python
- JavaScript
- cURL
Install the SDK with pip:Create a file called
example.py, copy the example into it, and run it with python example.py:lfm3-1.7b with any model id from the Models page.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 See Decisions for the SDKs and every question type.
https://api.liquid.ai/decisions.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.