AINative provider for litellm — free Llama, Qwen, DeepSeek & Kimi models via one call.
Project description
litellm-ainative
AINative provider for litellm — free Llama, Qwen, DeepSeek & Kimi models through litellm's unified interface.
Install
pip install litellm-ainative
Quick Start
import litellm
from litellm_ainative import configure
# Auto-provisions a free API key (no signup required)
configure()
# Use any AINative model through litellm
response = litellm.completion(
model="ainative/meta-llama/Llama-3.3-70B-Instruct",
messages=[{"role": "user", "content": "Explain quantum computing in one paragraph."}],
)
print(response.choices[0].message.content)
Available Models
All models are free with tool-calling support:
| Model | litellm Name |
|---|---|
| Llama 3.3 70B | ainative/meta-llama/Llama-3.3-70B-Instruct |
| Llama 4 Scout 17B | ainative/meta-llama/Llama-4-Scout-17B-16E-Instruct |
| Qwen3 Coder Flash | ainative/qwen3-coder-flash |
| DeepSeek 4 Flash | ainative/deepseek-4-flash |
| Kimi K2 | ainative/kimi-k2 |
Configuration
With an existing API key
from litellm_ainative import configure
configure(api_key="your_ainative_api_key")
With environment variable
export AINATIVE_API_KEY=your_key
from litellm_ainative import configure
configure()
Auto-provisioning (default)
If no key is found, configure() auto-provisions a temporary API key via
AINative's instant-db endpoint. The key is valid for 72 hours. Claim it for
permanent access at https://ainative.studio/claim.
from litellm_ainative import configure
configure() # auto-provisions if no key found
Disable auto-provisioning
from litellm_ainative import configure
configure(auto_provision=False) # raises RuntimeError if no key
Convenience Wrapper
For simpler usage without managing litellm directly:
from litellm_ainative import configure
from litellm_ainative.provider import completion
configure()
response = completion(
model="ainative/kimi-k2",
messages=[{"role": "user", "content": "Write a haiku about code."}],
temperature=0.7,
)
Tool Calling
All models support OpenAI-compatible tool calling:
import litellm
from litellm_ainative import configure
configure()
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"}
},
"required": ["location"],
},
},
}
]
response = litellm.completion(
model="ainative/qwen3-coder-flash",
messages=[{"role": "user", "content": "What's the weather in Tokyo?"}],
tools=tools,
)
How It Works
litellm-ainative registers AINative models with litellm's model registry
using the openai provider backend (since AINative exposes an
OpenAI-compatible /chat/completions endpoint). When you call
litellm.completion(model="ainative/..."), litellm routes the request
through the OpenAI provider to AINative's API gateway.
Links
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
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 litellm_ainative-0.1.0.tar.gz.
File metadata
- Download URL: litellm_ainative-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1da886956e6b8605b1cc4e76607021af1f351bdf7f7ad20248f00c6414f6703b
|
|
| MD5 |
60ff0581520ec61141ad970216c25846
|
|
| BLAKE2b-256 |
3ec758b49d1cc9db5aca7a757c6fb9c0c84df51896472253e7a53372acf0c4e9
|
File details
Details for the file litellm_ainative-0.1.0-py3-none-any.whl.
File metadata
- Download URL: litellm_ainative-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60081e780b0fccc8b7243a92aff6f5d8d0166130a6b6575e0cff40948d4797dc
|
|
| MD5 |
0add440720f2cb4123ec352355510d1b
|
|
| BLAKE2b-256 |
121f4613bae7775fbc21b34fde4f477b5a692562deee7f2d0cb71a404ef1cfc2
|