Skip to main content

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:

  1. JWT Token (for web apps):

    Authorization: Bearer <token>
    
  2. 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nostromo_api-0.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

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

Hashes for nostromo_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a5878448d3d657e700405e5bb14d7a5d16e77aae9f99823caf21ae6b83a5aa2d
MD5 4f096822ff587a1559d59a8e0e0de32a
BLAKE2b-256 d40bec38ee315870cb515ecdc44220fcc421a5ae99b52d2e845ce77dd21e09ca

See more details on using hashes here.

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

Hashes for nostromo_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d280c9c9f9457c683cf59bf549ed1473735d5f09c19ffe8ed4f20957ba1e6ecb
MD5 3985d1838f63872d9262690e9e053ea8
BLAKE2b-256 d45c2dba6a90bb3cc37efb796662e6fa453d8728e2a800e8b4de17fa06c130a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page