Skip to main content

llm-http-api

HTTP API for LLM with OpenAI compatibility

Usage

> llm http-api --help
Usage: llm http-api [OPTIONS]

  Run a FastAPI HTTP server with OpenAI compatibility

Options:
  -h, --host TEXT       [default: 0.0.0.0]
  -p, --port INTEGER    [default: 8080]
  -l, --log-level TEXT  [default: info]
  --help                Show this message and exit.
> curl http://localhost:8080/v1/embeddings -X POST -H "Content-Type: application/json" -d '{
  "input": "Hello world",
  "model": "jina-embeddings-v2-small-en"
}'
{"object":"embedding","embedding":[-0.47561466693878174,-0.4471365511417389,...],"index":0}

Supported OpenAI Endpoints

Models

Embeddings

Unsupported OpenAI Endpoints

A detailed list of unimplemented OpenAI endpoints can be found here

Development

This repository manages the dev environment as a Nix flake and requires Nix to be installed

nix develop -c $SHELL
make deps.install
make deps.install/test
make test
make coverage
make lint
make format

Metadata

Release files for llm-http-api 0.0.2

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

Source distribution (sdist)

Source distribution for llm-http-api 0.0.2
File Size Uploaded
llm-http-api-0.0.2.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-http-api 0.0.2
File Interpreter ABI Platform
llm_http_api-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / llm-http-api-0.0.2.tar.gz

Download URL llm-http-api-0.0.2.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5af620131bee53ba82bd52042b859a043096dc9e594ef1fd88c5ab2406d50457
BLAKE2b-256 checksum
How to use checksums
e8e5da2a9ae7765f432b622f986cb1b12bdfdef09892462996d9d96e319326dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / llm_http_api-0.0.2-py3-none-any.whl

Download URL llm_http_api-0.0.2-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b686bdcba1c3d67e1fced71c220011dada2006059231e7e4441ffcbb64327c7
BLAKE2b-256 checksum
How to use checksums
0dc5f4bacc3f6f26163b539ac11ad77b2b3eb83372f49a58911e214ec9f7bf67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

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