Completions (Legacy)
Completions (Legacy)
⚠️ Deprecation Notice: This endpoint is deprecated as of 2025 and will be removed on January 1, 2027. Please migrate to the Chat Completions API which supports multi-turn conversations and system messages.
The Completions API was the original text completion endpoint. It accepts a single prompt and returns one or more predicted completions. While still functional, it does not support conversation context.
Migrating to Chat Completions
Replace your prompt parameter with a messages array:
// Old
{"model": "meedoo", "prompt": "Translate: Hello world"}
// New
{"model": "meedoo", "messages": [{"role": "user", "content": "Translate: Hello world"}]}POST
/api/v1/completions DeprecatedCreate Completion (Legacy)
Creates a text completion (deprecated).
Response Examples
{
"id": "md-resp-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"created": 1791815801,
"model": "meedoo:latest",
"owned_by": "MeeDoo",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"text": "Once upon a time, there was a"
}
],
"object": "text_completion",
"usage": {
"prompt_tokens": 5,
"completion_tokens": 8,
"total_tokens": 13,
"input_tokens": 5,
"output_tokens": 8,
"total_duration_ms": 180,
"tokens_per_second": 44.44
}
}Code Examples
Basic Completion
curl https://api.meedoo.co/api/v1/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "meedoo",
"prompt": "Write a haiku about edge computing"
}'