Metadata-Version: 2.4
Name: noodelapi
Version: 0.1.0
Summary: Local OpenAI-compatible API publisher for chat.deepseek.com
Author: noodelTech
License-Expression: MIT
Keywords: deepseek,openai,api,llm,local
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21
Dynamic: license-file

# noodelapi

Local OpenAI-compatible API for chat.deepseek.com.

noodelapi uses your existing DeepSeek web session and exposes
`/v1/chat/completions` on your machine. Any agent harness that accepts an
OpenAI-compatible base URL can use it.

## Requirements

- Windows, macOS, or Linux
- Python 3.9 or newer
- A browser profile logged in at https://chat.deepseek.com. Supported:
  Brave, Chrome, Edge, Chromium, Vivaldi, Arc.

## Install

    pipx install noodelapi

or:

    python3 -m pip install --user noodelapi

On Windows use `py -m pip install --user noodelapi`.

## Setup

1. Open https://chat.deepseek.com in your browser and sign in.
2. Run:

       noodelapi setup

3. Paste the `ds_session_id` cookie value when asked. The CLI finds the
   `userToken` from the browser profile automatically. If it cannot find
   it, the CLI asks for that value instead.
4. Start the server:

       noodelapi start

The command prints the base URL, API key, and model names.

## Use

Base URL: `http://127.0.0.1:8787/v1`

API key: printed by `noodelapi setup` and `noodelapi status`.

Models:

- `deepseek-v4.1-flash`
- `deepseek-v4.1-flash-thinking`

Example:

    curl http://127.0.0.1:8787/v1/chat/completions \
      -H "Authorization: Bearer $NOODELAPI_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"hello"}]}'

Streaming is supported with `"stream": true`.

## Commands

    noodelapi setup      save browser credentials
    noodelapi start      start in the background
    noodelapi stop       stop the background server
    noodelapi status     show status and base URL
    noodelapi logs -f    follow logs
    noodelapi check      verify saved credentials
    noodelapi config     show config with secrets masked
    noodelapi models     list model names

## Notes

This is an unofficial bridge. It uses the same web endpoints as the
DeepSeek chat app and can stop working when DeepSeek changes them.

Sessions are deleted after each request by default. Set `keep_sessions`
to true in the config if you want to keep them in your DeepSeek history.

Only use it with your own account.
