Easy-to-use LLM API from a state-of-the-art provider and comparison.
Project description
api4all
Easy-to-use LLM API from a state-of-the-art provider and comparison.
Installation
- Clone the repository
git clone https://github.com/api4all/api4all.git
- Create and activate a virtual environment
- Unix / macOS
python3 -m venv venv
source venv/bin/activate
- Windows
python3 -m venv venv
.\venv\Scripts\activate
- Install the requirements
pip install -r requirements.txt
Providers and Pricing
Providers
Provider | Free Credit | Rate Limit | API Key name | Provider string name |
---|---|---|---|---|
Groq | Unlimited | 30 Requests / Minute | GROQ_API_KEY | "groq" |
Anyscale | $10 | 30 Requests / Second | ANYSCALE_API_KEY | "anyscale" |
Together AI | $25 | 1 Requests / Second | TOGETHER_API_KEY | "together" |
Replicate | Free to try | 50 Requests / Second | REPLICATE_API_KEY | "replicate" |
Fireworks | $1 | 600 Requests / Minute | FIREWORKS_API_KEY | "fireworks" |
Deepinfra | Free to try | 200 Concurrent request | DEEPINFRA_API_KEY | "deepinfra" |
Google AI (Vertex AI) | Unlimited | 60 Requests / Minute | GOOGLE_API_KEY | "google" |
OpenAI | ✕ | 60 Requests / Minute | OPENAI_API_KEY | "openai" |
Mistral AI | ✕ | 5 Requests / Second | MISTRAL_API_KEY | "mistral" |
Anthropic | ✕ | 5 Requests / Minute | ANTHROPIC_API_KEY | "anthropic" |
- Free to try: Free to try, no credit card required but limited to a certain number of tokens.
Open-source models
1. Mixtral-8x7b-Instruct-v0.1
Mixtral 8x7B is a high-performing sparse mixture of experts model (SMoE) with open weights, licensed under Apache 2.0. It surpasses Llama 2 70B in most benchmarks, offering 6x faster inference. It's the best open-weight model considering cost/performance trade-offs, matching or exceeding GPT3.5 on most standard benchmarks.
- Developer: Mistral AI
- Context Length: 32,768
Provider | Input Pricing ($/1M Tokens) | Output Pricing ($/1M Tokens) |
---|---|---|
Groq | $0 | $0 |
Anyscale | $0.5 | $0.5 |
Together AI | $0.6 | $0.6 |
Replicate | $0.3 | $1 |
Fireworks | $0.5 | $0.5 |
Deepinfra | $0.27 | $0.27 |
2. Gemma 7B it
- Developer: Google AI
- Context Length: 8,192
Provider | Input Pricing ($/1M Tokens) | Output Pricing ($/1M Tokens) |
---|---|---|
Groq | $0 | $0 |
Anyscale | $0.15 | $0.15 |
Together AI | $0.2 | $0.2 |
Replicate | ✕ | ✕ |
Fireworks | $0.2 | $0.2 |
Deepinfra | ✕ | ✕ |
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
api4all-0.2.0.tar.gz
(13.6 kB
view details)
Built Distribution
api4all-0.2.0-py3-none-any.whl
(13.9 kB
view details)
File details
Details for the file api4all-0.2.0.tar.gz
.
File metadata
- Download URL: api4all-0.2.0.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5879af4312a7601fa4fec84fb12fff3dd1980742a9b9c2824ccd103e2b1025d9 |
|
MD5 | cf1947024a823e9ee29d70106fed336a |
|
BLAKE2b-256 | 6739b01adf43dacaa3d2b4d7305b115d9acf0ad56cac908a49e9e5025076e27f |
File details
Details for the file api4all-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: api4all-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6565291723d833e958c82bc6b9ab9a3269bf28aca7e2d2ece367ab8542b4b9b2 |
|
MD5 | cc9a266ae1e6f2d2a69ed8d9e7e7a9bf |
|
BLAKE2b-256 | 115c1b84237c39edc1852415ff63cee34b85dc9bb0beb5a15f917ed592fb5489 |