Your First API Call
Parameter
Value
1. Generate an API Key
2. Choose a Model
3. Run the Code Snippet
curl -X POST "https://api.arcee.ai/api/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <Arcee Platform API Key>" \
-d '{
"model": "<Model Name>",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Greetings!"}
],
"stream": false
}'from openai import OpenAI
client = OpenAI(
api_key="<Arcee Platform API Key>",
base_url="https://api.arcee.ai/api/v1")
response = client.chat.completions.create(
model = "<Model Name>", # Change to whichever Arcee AI model you want to invoke
messages = [
{"role":"system", "content":"You are a helpful assistant"},
{"role":"user", "conent": "Hello"},
],
steam = false
)
print(response.choices[0].message.content)
Last updated


