MU-TH-UR 6000 REST API - Aliens-themed chatbot API server
Project description
nostromo-api
MU-TH-UR 6000 REST API - FastAPI server for the Aliens-themed chatbot.
Installation
# With Anthropic (recommended)
pip install "nostromo-api[anthropic]"
# With OpenAI
pip install "nostromo-api[openai]"
# All providers
pip install "nostromo-api[all]"
Quick Start
# Set your API key
export ANTHROPIC_API_KEY="sk-ant-..."
# Run the server
nostromo-api
# Or with uvicorn directly
uvicorn nostromo_api.main:app --reload
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/chat |
Send message, get full response |
| POST | /api/chat/stream |
SSE streaming response |
| WS | /ws/chat/{session_id} |
WebSocket bidirectional chat |
| POST | /api/auth/token |
Get JWT token (login) |
| GET | /api/sessions |
List user sessions |
| DELETE | /api/sessions/{id} |
Delete session |
| GET | /health |
Health check |
| GET | /docs |
OpenAPI documentation |
Authentication
Supports two authentication methods:
-
JWT Token (for web apps):
Authorization: Bearer <token> -
API Key (for integrations):
X-API-Key: nst_<your-api-key>
Environment Variables
| Variable | Description | Default |
|---|---|---|
ANTHROPIC_API_KEY |
Anthropic API key | - |
OPENAI_API_KEY |
OpenAI API key | - |
NOSTROMO_SECRET_KEY |
JWT signing key | Random |
NOSTROMO_API_KEYS |
Comma-separated API keys | - |
NOSTROMO_PROVIDER |
Default provider | anthropic |
NOSTROMO_MODEL |
Default model | claude-3-5-haiku-latest |
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
nostromo_api-0.1.0.tar.gz
(9.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 nostromo_api-0.1.0.tar.gz.
File metadata
- Download URL: nostromo_api-0.1.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5878448d3d657e700405e5bb14d7a5d16e77aae9f99823caf21ae6b83a5aa2d
|
|
| MD5 |
4f096822ff587a1559d59a8e0e0de32a
|
|
| BLAKE2b-256 |
d40bec38ee315870cb515ecdc44220fcc421a5ae99b52d2e845ce77dd21e09ca
|
File details
Details for the file nostromo_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nostromo_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d280c9c9f9457c683cf59bf549ed1473735d5f09c19ffe8ed4f20957ba1e6ecb
|
|
| MD5 |
3985d1838f63872d9262690e9e053ea8
|
|
| BLAKE2b-256 |
d45c2dba6a90bb3cc37efb796662e6fa453d8728e2a800e8b4de17fa06c130a4
|