MIGRATION & COMPATIBILITY
Migration guideMigrating from Text Completions
DEVUP AI does not expose the legacy /v1/completions endpoint. For OpenAI-compatible text generation, use Chat Completions.
Availability notice
/v1/completionsis not in the current API contract.- Requests should use
/v1/chat/completions. - The selected model must support chat-style input.
Text Completions vs Chat Completions
Legacy Text Completions
- Raw
promptstring - Model-specific prompt formatting
- Endpoint not currently exposed by DEVUP AI
Chat Completions
- Structured
messagesarray - Explicit roles such as
system,user, andassistant - Current OpenAI-compatible interface for text generation
Migration example
Raw prompt
Messages array
Chat Completions
Legacy raw prompt
Illustrative onlyA conceptual legacy input (illustrative only, not a runnable DEVUP AI API request):
text
Summarize the following text:
<document>DEVUP AI Chat Completions
The equivalent Chat Completions request formatted as a structured messages array:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEVUP_API_KEY"],
base_url="https://api.devupai.com/v1",
)
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Pro",
messages=[
{
"role": "user",
"content": "Summarize the following text:\n\n<document>",
}
],
)
print(response.choices[0].message.content)Migration checklist
- Replace /v1/completions with /v1/chat/completions
- Replace prompt with messages
- Assign the correct message roles
- Keep the DEVUP AI base URL and API key
- Confirm that the selected model supports Chat Completions
- Re-test stop conditions and output-length controls