v1.0 Documentation
Cosmos developer
Access our orchestration models for real-world applications with simple, powerful APIs
Our models
Files models
Document processing and extraction API for analyzing and extracting content.
0,005 € - 0,01 € per request
Translation models
Advanced translation capabilities.
Text: 0,003 € per 1000 tokens
Files: 0,005 € per 1000 tokens
Web models
Web scraping and content extraction API.
0,05 € per request
LLM Chat
Advanced conversational AI API for contextual interactions.
0,001 € per 1000 tokens
Vision modelsComing Soon
State-of-the-art computer vision and image analysis API.
0,05 € per image
Developer quickstart
1. Create and export an API key
Set up your API key in your environment:
export COSMOS_API_KEY="your_api_key_here"
2. Make your first request
Try a simple chat request:
from cosmos import CosmosClient
# Initialize the client
client = CosmosClient(api_key="your-cosmos-api-key")
# Make a request
response = client.llm_chat_request(text="Hello Cosmos!")
# Print the response
print(f"Cosmos says: {response}")
Advanced Usage Examples
Web Search
Advanced web search with language specification:
from cosmos import CosmosClient
# Initialize the client
client = CosmosClient(apikey="my-cosmos-api-key")
# Make the search request
response = client.web_search_request(
text="What is the capital of France?", output_language="en")
# Print results
print(response)
Document Analysis
Query indexed documents with natural language:
from cosmos import CosmosClient
# Initialize the client
client = CosmosClient(apikey="my-cosmos-api-key")
# Query the index
response = client.files_index_ask_request(
index_uuid='f2503e3e-676a-4673-8ed5-cd7c8b627cea', question='
What is discussed about early childhood?
', output_language="en")
# Print response
print(response)
Check our documentation for more advanced usage examples and best practices.