Lunos

Documentation

API Reference

This is the reference documentation for the Lunos API. The API provides programmatic access to Lunos's AI capabilities, allowing you to integrate multiple AI models into your applications through a single, unified interface.

Important: Make sure to keep your API keys secure and never expose them in client-side code. All API requests should be made server-side to protect your credentials.

Base URL

Most API requests should be made to the following base URL:

https://api.lunos.tech/v1

Note: The /public/models endpoint is an exception and uses the base URL https://api.lunos.tech without the /v1 prefix, as it's a publicly accessible endpoint that doesn't require authentication.

Available Endpoints

Current Status: At this time, only the /completions endpoint is available for AI access. Other endpoints are planned for future releases.

EndpointMethodDescription
/public/modelsGETList all available AI models (public endpoint)
/completionsPOSTGenerate text completions
/chat/completionsPOSTGenerate chat completions
/embeddingsPOSTGenerate text embeddings
/images/generationsPOSTGenerate images from text prompts
/audio/transcriptionsPOSTTranscribe audio to text

Models Endpoint

The models endpoint allows you to list and get information about the available models.

Public Access: This endpoint is publicly accessible and doesn't require authentication or API keys. It uses a different URL structure than other API endpoints.

List Models

GET https://api.lunos.tech/public/models

Returns a list of all models available through the Lunos API. Unlike other endpoints, this uses the full URL https://api.lunos.tech/public/models and doesn't require the /v1 prefix or authentication headers.

Example Request

Example Request
1curl https://api.lunos.tech/public/models

Example Response

Example Response
1{
2  "status": "success",
3  "data": {
4    "models": [
5      {
6        "id": "gpt-4",
7        "provider": "openai",
8        "created": 1677610602,
9        "object": "model",
10        "owned_by": "openai",
11        "capabilities": ["text-completion", "chat-completion"],
12        "pricing": {
13          "input": 0.00003,
14          "output": 0.00006,
15          "unit": "token",
16          "currency": "USD"
17        }
18      },
19      {
20        "id": "claude-3-opus",
21        "provider": "anthropic",
22        "created": 1678410602,
23        "object": "model",
24        "owned_by": "anthropic",
25        "capabilities": ["chat-completion"],
26        "pricing": {
27          "input": 0.00003,
28          "output": 0.00015,
29          "unit": "token",
30          "currency": "USD"
31        }
32      },
33      // Additional models...
34    ]
35  },
36  "meta": {
37    "processing_time": 0.023
38  }
39}

Completions Endpoint

The completions endpoint allows you to generate text completions using various AI models.

POST /completions

Request Parameters

ParameterTypeRequiredDescription
modelstringYesID of the model to use
promptstringYesThe prompt to generate completions for
max_tokensintegerNoMaximum number of tokens to generate (default: 16)
temperaturenumberNoSampling temperature (0-2, default: 1)
top_pnumberNoNucleus sampling parameter (0-1, default: 1)

For more detailed information about specific endpoints, please refer to the corresponding documentation pages: