MeeDoo AI Python SDK
The easiest way to add AI to your Python application. No PhD required.
What is this?
MeeDoo is an AI platform (like ChatGPT, but yours). This SDK lets you talk to MeeDoo's AI from your Python code in 3 lines.
PyPI: https://pypi.org/project/meedoo-ai/ GitHub: https://github.com/MeeDoo-AI/SDK_Python
Installation
pip install meedoo-ai
That's it. No other setup needed.
Getting Started (3 minutes)
Step 1: Get your API key
- Go to your MeeDoo chat interface
- Click Settings → Account
- Scroll down to API Keys
- Click Create API Key
- Copy the key (it starts with
md-)
Step 2: Your first AI chat
from meedoo_ai import MeeDooClient
# Create a client with your API key
client = MeeDooClient(api_key="md-your-api-key-here")
# Ask the AI a question
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "What is the capital of France?"}],
)
# Print the answer
print(response.content)
# Output: The capital of France is Paris.
Step 3: That's it! You just built an AI app.
Everything You Can Do
Basic Chat
response = client.chat.completions.create(
model="meedoo:latest",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain quantum computing to a 5-year-old."},
],
)
print(response.content)
Streaming (see the answer appear word by word)
for chunk in client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Write a poem about the ocean."}],
stream=True,
):
print(chunk.delta_content, end="", flush=True)
# Output appears live, like ChatGPT typing
Web Search (AI can search the internet)
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "What is the Bitcoin price today?"}],
features={"web_search": True},
)
print(response.content)
# Output: Bitcoin is currently trading at $83,052.07...
Think Mode (AI reasons step by step)
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Solve 15 * 17 step by step."}],
think=True,
)
print(response.content)
# Output shows the AI's reasoning step by step
Memory (AI remembers things about you)
# First, tell the AI something about yourself
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "My name is Alice and I love chocolate."}],
features={"memory": True},
)
# Later, the AI remembers
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "What do you know about me?"}],
features={"memory": True},
)
print(response.content)
# Output: You are Alice and you love chocolate.
Code Interpreter (AI writes and runs code)
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Calculate the factorial of 20."}],
features={"code_interpreter": True},
)
print(response.content)
JSON Output (for when you need structured data)
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Give me a JSON with 3 users, each with name and age."}],
response_format={"type": "json_object"},
)
print(response.content)
# Output: {"users": [{"name": "Alice", "age": 25}, ...]}
Custom System Prompt (control the AI's personality)
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Who are you?"}],
system="You are a pirate. Always talk like a pirate.",
)
print(response.content)
# Output: Arr, I be Captain Blackbeard...
Function Calling (let the AI use tools)
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Search for the latest AI news."}],
tool_ids=["llm_web_search"],
function_calling="native",
)
# The AI can call tools automatically
Temperature (control creativity)
# Low temperature = focused, predictable
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Pick a number 1-10."}],
temperature=0.0, # Always gives the same answer
)
# High temperature = creative, varied
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Write a creative story."}],
temperature=1.5, # More random, more creative
)
Background Tasks (generate titles and follow-ups)
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Explain how photosynthesis works."}],
background_tasks={
"title_generation": True, # Generates a chat title
"follow_up_generation": True, # Generates follow-up questions
},
)
Variables (template your system prompts)
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Greet me."}],
variables={"user_name": "Alice", "language": "French"},
)
# The AI knows the user's name is Alice and should respond in French
Account & Usage
# Check your credit balance
credits = client.usage.credits()
print(f"Balance: €{credits.credit_balance}")
print(f"Tokens: {credits.token_balance:,}")
# Check your usage stats
stats = client.usage.stats()
print(f"Plan: {stats.plan}")
print(f"Requests: {stats.remaining}/{stats.max_requests} remaining")
# List available models
models = client.models.list()
for m in models.data:
print(f" {m.id}: {m.name}")
# Check API config (what features are enabled)
config = client.config()
print(f"Config: {config.features}")
Error Handling
from meedoo_ai import MeeDooClient, AuthenticationError, ModelNotFoundError, InsufficientCreditsError
client = MeeDooClient(api_key="md-your-key")
try:
response = client.chat.completions.create(
model="meedoo:latest",
messages=[{"role": "user", "content": "Hello!"}],
)
except AuthenticationError:
print("Your API key is wrong. Check Settings → Account.")
except InsufficientCreditsError:
print("You're out of credits. Buy more at meedoo.co/pricing-api")
except ModelNotFoundError:
print("That model doesn't exist. Use client.models.list() to see available models.")
Complete Reference
client.chat.completions.create() parameters
| Parameter | Type | Default | What it does |
|---|---|---|---|
model |
str |
required | Which AI model to use (e.g. "meedoo:latest") |
messages |
list |
required | The conversation [{"role": "user", "content": "..."}] |
stream |
bool |
False |
If True, returns chunks one by one (live typing effect) |
temperature |
float |
model default | 0.0 = focused, 2.0 = very creative |
top_p |
float |
model default | Nucleus sampling (alternative to temperature) |
min_p |
float |
model default | Minimum probability for tokens |
max_tokens |
int |
model default | Maximum number of tokens to generate |
frequency_penalty |
float |
0 |
Penalize repeated tokens (-2.0 to 2.0) |
presence_penalty |
float |
0 |
Penalize tokens already present (-2.0 to 2.0) |
reasoning_effort |
str |
— | For reasoning models: "low", "medium", "high" |
seed |
any |
— | Same seed = same output (reproducibility) |
stop |
list |
— | Stop generating when these strings appear |
response_format |
dict |
— | {"type": "json_object"} for JSON output |
think |
bool |
False |
Think mode — AI shows its reasoning |
features |
dict |
— | Feature flags (dict of string to boolean) |
tool_ids |
list |
— | Tool IDs to activate (e.g. ["llm_web_search"]) |
tools |
list |
— | Custom tool definitions (standard API format) |
tool_choice |
str |
— | "auto", "none", or specific tool |
function_calling |
str |
— | "native" (model handles tools) or "default" |
system |
str |
— | Override the system prompt |
custom_params |
dict |
— | Custom LLM parameters |
chat_id |
str |
— | Chat session ID (for persistence) |
message_id |
str |
— | Message ID for this response |
parent_id |
str |
— | Parent message ID (for threading) |
session_id |
str |
— | Socket session ID |
files |
list |
— | File attachments |
skill_ids |
list |
— | Skill IDs to inject |
variables |
dict |
— | Template variables {"user_name": "Alice"} |
filter_ids |
list |
— | Filter function IDs |
background_tasks |
dict |
— | {"title_generation": True, "follow_up_generation": True} |
use_credits |
bool |
— | Use API credits instead of session quota |
metadata |
dict |
— | Additional metadata |
Response object
| Property | Type | Description |
|---|---|---|
response.content |
str |
The AI's answer text |
response.id |
str |
Unique response ID |
response.model |
str |
Model used |
response.usage.total_tokens |
int |
Total tokens used |
response.usage.input_tokens |
int |
Input tokens |
response.usage.output_tokens |
int |
Output tokens |
response.tool_calls |
list |
Tool calls made by the AI |
response.sources |
list |
Web search sources (if any) |
FAQ
Q: Do I need to install anything else?
No. Just pip install meedoo-ai. The SDK uses requests which is installed automatically.
Q: What Python versions are supported? Python 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14.
Q: Can I use this in a web app? Yes! It works in Flask, Django, FastAPI, or any Python framework.
Q: Does the AI search the web automatically?
Only if you set features={"web_search": True}. Otherwise it uses its own knowledge.
Q: What if I get an InsufficientCreditsError?
You need to buy credits at meedoo.co/pricing-api or via the API: POST /api/v1/stripe/checkout.
Q: Is there a rate limit?
Yes, depends on your plan. Check with client.usage.stats().
License
MIT © MeeDoo
Metadata
Release files for meedoo-ai 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| meedoo_ai-1.0.2.tar.gz | 16.2 kB | Without provenance | Details for meedoo_ai-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| meedoo_ai-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for meedoo_ai-1.0.2-py3-none-any.whl |
Total release size: 28.4 kB
Release files / meedoo_ai-1.0.2.tar.gz
| Download URL | meedoo_ai-1.0.2.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa7bfc9c4b92d90fedd11fc38c34a7afc37593b7d96e92d15a967afc8ddaa136
|
|
BLAKE2b-256 checksum How to use checksums |
c5ccb82cd5f8ef8b1b6f1624676988e4d8712a8898f3f314fcbb709ae6f07d07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / meedoo_ai-1.0.2-py3-none-any.whl
| Download URL | meedoo_ai-1.0.2-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
320b36c272bf513ce725c95173e24778b205f321ad3fccf0c6a9efdc0c77108a
|
|
BLAKE2b-256 checksum How to use checksums |
84f9567b3194f391fb6930b9e3d857ae1eef0ab4f54e560164b93d3a722da305
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for meedoo-ai 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.