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.
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.
Current Status: At this time, only the /completions
endpoint is available for AI access. Other endpoints are planned for future releases.
Endpoint | Method | Description |
---|---|---|
/public/models | GET | List all available AI models (public endpoint) |
/completions | POST | Generate text completions |
/chat/completions | POST | Generate chat completions |
/embeddings | POST | Generate text embeddings |
/images/generations | POST | Generate images from text prompts |
/audio/transcriptions | POST | Transcribe audio to text |
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.
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.
1curl https://api.lunos.tech/public/models
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}
The completions endpoint allows you to generate text completions using various AI models.
POST /completions
Parameter | Type | Required | Description |
---|---|---|---|
model | string | Yes | ID of the model to use |
prompt | string | Yes | The prompt to generate completions for |
max_tokens | integer | No | Maximum number of tokens to generate (default: 16) |
temperature | number | No | Sampling temperature (0-2, default: 1) |
top_p | number | No | Nucleus sampling parameter (0-1, default: 1) |
For more detailed information about specific endpoints, please refer to the corresponding documentation pages:
No headings found on this page.