.webp)


Create your account in seconds
Use credits across any supported model
Create an API key and start making
M2.7 writes, refactors, and debugs code while building complex agent systems. It understands massive codebases, edits Office files programmatically, and improves its own performance with every interaction.

.webp)

import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.aimlapi.com/v1",
api_key="<YOUR_API_KEY>",
)
response = client.chat.completions.create(
model="deepseek/deepseek-r1",
messages=[
{
"role": "system",
"content": "You are an AI assistant who knows everything.",
},
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
],
)
message = response.choices[0].message.content
print(f"Assistant: {message}")