Kimi K3 is here. Try it now
large language

Cosine LogoLumen

AI coding model trained on real production code to outperform generalist models at software engineering.

Model details

Example usage

Lumen is Cosine's AI model built specifically for software engineering, rather than as a byproduct of general-purpose training. The core thesis is that specialists outperform generalists: most AI models try to write poetry, solve physics problems, and summarize novels, while Lumen does one thing: write software.

Cosine's Lumen models are available through the cos CLI (see full documentation) rather than a hosted HTTP endpoint. To use them from Python, run the CLI in headless mode and parse its output. --prompt runs a single task and exits; --response-format constrains the result to a JSON schema you supply.

This example asks Lumen Scout to identify a repo's primary language and source file count.

Input
1import json, subprocess
2
3schema = {"name": "summary", "schema": {
4    "type": "object",
5    "properties": {"language": {"type": "string"}, "files": {"type": "integer"}}
6}}
7
8out = subprocess.run([
9    "cos", "start",
10    "-p", "What language is this repo and how many source files?",
11    "--model", "lumen-scout", # cheapest Lumen tier; good for repo mapping
12    "--auto-accept",          # required headless: otherwise blocks on tool prompts
13    "--response-format", json.dumps(schema),
14], capture_output=True, text=True, check=True).stdout
15
16print(json.loads(out[out.find("{"):]))
JSON output
1{
2    "language": "Python",
3    "files": 47
4}

🔥 Trending models