Skip to main content
Get started with Nordlys by changing one line of code. No complex setup required. Nordlys is a Mixture of Models model: each prompt activates the right models under the hood.

Step 1: Get Your API Key

1

Sign Up

Create a free account to get started
2

Generate Key

Generate your API key from the dashboard

Step 2: Install SDK (Optional)

pip install nordlys-py
Python only - native Nordlys SDK with Registry and Router APIs

Authentication

Nordlys uses API keys for authentication. Include your API key in requests:
  • Header: Authorization: Bearer YOUR_API_KEY
  • Store keys in environment variables (NORDLYS_API_KEY)

Step 3: Make Your First Request

Choose your preferred language and framework:
from nordlys_py import Nordlys

nordlys = Nordlys(api_key="your-nordlys-api-key")

response = nordlys.chat.completions.create(
    model="nordlys/hypernova",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)

Error Handling

Always implement proper error handling in production. Nordlys provides detailed error information to help you build resilient applications.
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env.NORDLYS_API_KEY,
  baseURL: 'https://api.nordlyslabs.com/v1'
});

async function chatWithRetry(message: string, maxRetries = 3) {
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
    try {
      const response = await client.chat.completions.create({
        model: 'nordlys/hypernova',
        messages: [{ role: 'user', content: message }]
      });

      return response.choices[0].message.content;

    } catch (error: any) {
      console.error(`Attempt ${attempt} failed:`, error.message);

      if (attempt === maxRetries) throw error;

      // Exponential backoff
      await new Promise(resolve =>
        setTimeout(resolve, Math.pow(2, attempt) * 1000)
      );
    }
  }
}

// Usage
try {
  const result = await chatWithRetry('Explain quantum computing');
  console.log(result);
} catch (error) {
  console.error('All retries failed:', error);
  // Implement your preferred recovery behavior (message, etc.)
}
Production Tip: Always log the request_id from error responses for debugging. For comprehensive error handling patterns, see the Error Handling Best Practices guide.

Example Response

{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1677652288,
  "model": "gpt-5-nano",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "Hello! I'm ready to help you."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 5,
    "completion_tokens": 10,
    "total_tokens": 15
  }
}
Nordlys returns standard OpenAI or Anthropic-compatible responses.

Testing Your Integration

1

Send Test Request

Run your code with a simple message like “Hello!” to verify the connection
2

Check Response

Confirm you receive a response and check the model field in the response
3

Monitor Dashboard

View request logs and analytics in your Nordlys dashboard

Next Steps

Model Reference & Pricing

Learn about Nordlys model specifications and pricing

Integration Guides

Detailed guides for each SDK and framework

API Reference

Complete API documentation with all parameters

Code Examples

Working examples for common use cases

Need Help?

Troubleshooting

Common issues and their solutions

Support

Get help from our team