Skip to main content

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

Metadata

Release files for neoncodex-ai 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neoncodex-ai 1.0.0
File Size Uploaded Provenance Actions
neoncodex_ai-1.0.0.tar.gz 5.0 kB Without provenance Details for neoncodex_ai-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for neoncodex-ai 1.0.0
File Interpreter ABI Platform Actions
neoncodex_ai-1.0.0-py3-none-any.whl Python 3 none any Details for neoncodex_ai-1.0.0-py3-none-any.whl

Total release size: 10.3 kB

Release files / neoncodex_ai-1.0.0.tar.gz

Download URL neoncodex_ai-1.0.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f83fb551c1d43064f9aa38d1ed0550bd90249b6c59450375833781e043d1d8fb
BLAKE2b-256 checksum
How to use checksums
059276f23fa08ded8cc3991ed7003ddde734f3114ba96505bc3afd6797a47b69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / neoncodex_ai-1.0.0-py3-none-any.whl

Download URL neoncodex_ai-1.0.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
842a404d50a7412b2faf5344be5adaee22dbf5837df3379ab7326015ad1a8b50
BLAKE2b-256 checksum
How to use checksums
1fa4b5413e67c54e0ccca6c3b4c59b5b5caad3f6e3bdb635e83c3c8e873c04a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for neoncodex-ai 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page