Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nordlyslabs.com/llms.txt

Use this file to discover all available pages before exploring further.

Get Your Nordlys API Key

Sign up here to create an account and generate your API key.

Quick Setup

Installation

pip install langchain langchain-openai

Basic Usage

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    api_key="your-nordlys-api-key",
    base_url="https://api.nordlyslabs.com/v1",
    model=""
)

response = llm.invoke("Explain machine learning simply")
print(response.content)

Streaming Example

for chunk in llm.stream("Tell me a story about AI"):
    print(chunk.content, end="", flush=True)

Key Features

  • Drop-in replacement - Works with existing LangChain code
  • Nordlys model - Automatic Nordlys model based on complexity
  • Streaming support - Real-time responses work seamlessly
  • Chain compatibility - All LangChain patterns work without changes

Next Steps

More Examples

See complete working examples with LangChain

API Reference

Explore all available options and parameters