Official Python SDK for NeonCodex AI — Claude, GPT-5.5, Gemini
Project description
neoncodex
Official Python SDK for NeonCodex AI — Claude 4.6, GPT-5.5, Gemini 3.1 Pro, and 50+ models.
Install
pip install neoncodex
For async support:
pip install neoncodex[async]
Quick start
from neoncodex import NeonCodex
client = NeonCodex(api_key="nck_live_...")
# Run a task and get full output
output = client.tasks.run("Write a Python web scraper for HN")
print(output)
# Stream output in real time
for chunk in client.tasks.stream("Explain transformers in ML"):
print(chunk, end="", flush=True)
# With file attachment
attachment = client.files.from_path("data.csv")
output = client.tasks.run(
"Analyze this data and find key insights",
attachments=[attachment]
)
Async
import asyncio
from neoncodex import NeonCodex
client = NeonCodex(api_key="nck_live_...")
async def main():
async for chunk in client.tasks.astream("Write a FastAPI app"):
print(chunk, end="", flush=True)
asyncio.run(main())
Models
# Auto-routing (recommended)
client.tasks.run("Your prompt", model="auto")
# Specific models
client.tasks.run("Debug this code", model="claude-sonnet-4-6")
client.tasks.run("Analyze this dataset", model="google/gemini-3.1-pro-preview")
client.tasks.run("Quick question", model="qwen/qwen3-coder:free") # free
API Reference
client.tasks.run(prompt, model, attachments) → str
client.tasks.stream(prompt, model, attachments) → Iterator[str]
client.tasks.create(prompt, model, title, attachments) → Task
client.tasks.get(task_id) → Task
client.tasks.wait(task_id, poll_interval, timeout) → Task
client.tasks.list(limit) → List[Task]
client.tasks.cancel(task_id) → None
client.files.from_path(file_path) → Attachment
client.files.from_string(content, filename) → Attachment
client.me() → User
Error handling
from neoncodex import NeonCodex, NeonCodexError, AuthenticationError
try:
output = client.tasks.run("...")
except AuthenticationError:
print("Invalid API key")
except NeonCodexError as e:
print(f"Error {e.status_code}: {e}")
Get an API key
neoncodex.io → Settings → API Keys
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
neoncodex_ai-1.0.0.tar.gz
(5.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neoncodex_ai-1.0.0.tar.gz.
File metadata
- Download URL: neoncodex_ai-1.0.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f83fb551c1d43064f9aa38d1ed0550bd90249b6c59450375833781e043d1d8fb
|
|
| MD5 |
3dbdbca4c872c78c072c5e988c9e9b1b
|
|
| BLAKE2b-256 |
059276f23fa08ded8cc3991ed7003ddde734f3114ba96505bc3afd6797a47b69
|
File details
Details for the file neoncodex_ai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: neoncodex_ai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
842a404d50a7412b2faf5344be5adaee22dbf5837df3379ab7326015ad1a8b50
|
|
| MD5 |
5b290a030f3e52667d6c48fd689021b2
|
|
| BLAKE2b-256 |
1fa4b5413e67c54e0ccca6c3b4c59b5b5caad3f6e3bdb635e83c3c8e873c04a9
|