Lunos

Documentation

🤖 Model Discovery

The Model Discovery API lets you explore all available AI models, their capabilities, pricing, and context length. Filter by provider, capability, or search by name to find the best model for your use case.

Note: You need an API key to use this endpoint. See the Quickstart Guide to get started.

How to Discover Models (Step-by-Step)

  1. Choose your preferred client library or use cURL for direct API calls.
  2. Set your API key and endpoint URL.
  3. Call the models endpoint to list all available models.
  4. Filter or search the results to find the best model for your needs.

Example: Using OpenAI Library

List available models using the OpenAI Node.js library:

1const models = await openai.models.list();
2console.log(models);
Usage: models.list() returns all available models and their metadata.

Example: Using Lunos Client

List available models using the official Lunos client:

1const client = new LunosClient({ apiKey: 'YOUR_API_KEY' });
2const models = await client.models.getModels();
3console.log(models);
Usage: getModels() returns all available models and their metadata.

Example: Using cURL

Direct API call to list models:

1curl -X GET   https://api.lunos.tech/v1/models   -H "Authorization: Bearer YOUR_API_KEY"

Example Response

1[
2  {
3    "id": "openai/gpt-4.1-mini",
4    "name": "GPT-4.1 Mini",
5    "parameters": {
6      "context": 8192,
7      "max_output_tokens": 2000,
8      "size": "4B"
9    },
10    "provider": "openai",
11    "pricePerMillionTokens": {
12      "input": 0.1,
13      "output": 0.3
14    },
15    "capabilities": ["text-generation", "chat"],
16    "status": "available"
17  }
18]

Important: Your API key is sensitive. Never share it publicly or commit it to version control.

Best Practices & Tips

  • Filter by provider or capabilities to quickly find relevant models.
  • Check pricePerMillionTokens for cost estimation.
  • Use getModelById for detailed model information.

Troubleshooting

  • Authentication error: Verify your API key and permissions.
  • Missing models: Check your account's access level and region.
  • Request issues: Ensure your request payload matches the API specification.