Build AI Applications in Python with DEVUP AI
Connect standard Python AI libraries including OpenAI, Anthropic, LangChain, and AutoGen directly to DEVUP AI's high-performance inference endpoints. No proprietary DEVUP AI Python wrapper required.
Ecosystem Architecture
Standard Python Libraries, Zero Proprietary Wrapper
Custom services, data pipelines, web backends, or agent workflows.
Official openai, anthropic, langchain-openai, or pyautogen packages.
https://api.devupai.com/v1 or /anthropic.
High-throughput GPU inference cluster with transparent Algerian Dinar (DZD) billing.
Installation
Install the Standard OpenAI Python Client
DEVUP AI exposes standard OpenAI REST endpoints. Install the official OpenAI Python package from PyPI:
pip install openaiQuickstart
Client Initialization & First Chat Completion
Initialize the standard OpenAI client with your DEVUP AI credentials and custom base_url. The example below uses the documented deepseek-ai/DeepSeek-V4-Pro example model:
import os
from openai import OpenAI
# Initialize the standard OpenAI client configured for DEVUP AI
client = OpenAI(
api_key=os.environ.get("DEVUP_API_KEY"),
base_url="https://api.devupai.com/v1",
)
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Pro", # Example model
messages=[
{
"role": "system",
"content": "You are a concise technical assistant.",
},
{
"role": "user",
"content": "Explain artificial intelligence in one paragraph.",
},
],
)
print(response.choices[0].message.content)Streaming
Real-Time Token Streaming in Python
Enable token-by-token streaming by setting stream=True. The response returns an iterable generator yielding delta chunks in real time:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("DEVUP_API_KEY"),
base_url="https://api.devupai.com/v1",
)
stream = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Pro", # Example model
messages=[
{"role": "user", "content": "Write a short poem about Algeria."}
],
stream=True,
)
for chunk in stream:
content = chunk.choices[0].delta.content
if content is not None:
print(content, end="", flush=True)
print()Embeddings
Vector Embeddings Generation
Generate dense vector representations for semantic search and retrieval systems using the documented Qwen/Qwen3-Embedding-8B example model. Both single strings and batch string arrays are supported:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("DEVUP_API_KEY"),
base_url="https://api.devupai.com/v1",
)
response = client.embeddings.create(
model="Qwen/Qwen3-Embedding-8B", # Example embedding model
input="The food was delicious and the service was excellent.",
)
vector = response.data[0].embedding
print(f"Embedding dimensions: {len(vector)}")Anthropic Messages API
Use the Official Anthropic Python Client
DEVUP AI also provides native protocol compatibility for the Anthropic Messages API. Point the official anthropic Python client to https://api.devupai.com/anthropic:
pip install anthropicimport os
import anthropic
client = anthropic.Anthropic(
base_url="https://api.devupai.com/anthropic",
api_key=os.environ["DEVUP_API_KEY"],
)
message = client.messages.create(
model="claude-opus-5",
max_tokens=1024,
messages=[
{"role": "user", "content": "What is the capital of Algeria?"}
],
)
print(message.content[0].text)Frameworks & Agents
LangChain & Multi-Agent Systems
Standard Python orchestration frameworks connect directly to DEVUP AI by configuring the OpenAI-compatible base URL:
langchain-openai
Use the ChatOpenAI class with openai_api_base to run LCEL prompt chains, .invoke(), and .stream().
pip install langchain-openaiimport os
from langchain_openai import ChatOpenAI
chat = ChatOpenAI(
openai_api_key=os.environ["DEVUP_API_KEY"],
openai_api_base="https://api.devupai.com/v1",
model_name="deepseek-ai/DeepSeek-V4-Pro",
)
response = chat.invoke("Hello, DEVUP AI!")
print(response.content)pyautogen
Build multi-agent conversational pipelines by setting the agent config_listto DEVUP AI's endpoint.
pip install pyautogenimport os
import autogen
config_list = [
{
"model": "deepseek-ai/DeepSeek-V4-Pro",
"base_url": "https://api.devupai.com/v1",
"api_key": os.environ["DEVUP_API_KEY"],
}
]
assistant = autogen.AssistantAgent("assistant", llm_config={"config_list": config_list})
user_proxy = autogen.UserProxyAgent("user_proxy", code_execution_config={"work_dir": "coding"})
user_proxy.initiate_chat(assistant, message="What is machine learning?")Capabilities
Python Ecosystem Capability Matrix
Verified features available when integrating through standard Python clients:
Multi-turn dialogues via standard openai client.
Synchronous generator chunk streaming with stream=True.
Single and batch embeddings via client.embeddings.create.
JSON Schema tool definitions and tool_choice="auto".
Structured JSON responses via response_format.
Messages API compatibility via official anthropic client.
Prompt templates and LCEL pipelines with ChatOpenAI.
Autonomous multi-agent orchestration via pyautogen.
Authentication & Security
Credentials & Endpoint Configuration
OpenAI-Compatible Authentication
- Base URL:
https://api.devupai.com/v1 - Header:
Authorization: Bearer <API_KEY> - Environment Variable:
DEVUP_API_KEYis a developer convention. Pass it explicitly toapi_key=os.environ.get("DEVUP_API_KEY").
Anthropic Authentication
- Base URL:
https://api.devupai.com/anthropic - Header:
x-api-key: <API_KEY> - Client Setup: Pass your key explicitly to
anthropic.Anthropic(api_key=..., base_url=...).
Security Guidance
Store your DEVUP AI API key exclusively in secure server-side environment variables or secret managers. Never hardcode API keys into public repositories or client-distributed applications.
os.environ or python-dotenv during local development.Looking for Cross-Language Protocol Details?
While this page covers the broader Python developer ecosystem (including Anthropic, LangChain, and AutoGen), the OpenAI SDK integration page focuses on protocol drop-in compatibility across both Node.js and Python.
Other First-Party Ecosystems
Start Building with DEVUP AI in Python
Create an API key in the developer dashboard, point your favorite standard Python AI library to DEVUP AI, and run your first completion in seconds.