LogoLogo
  • 👋Welcome to Arcee AI Docs
  • Arcee Orchestra
    • Introduction to Arcee Orchestra
    • Getting Started
    • Workflows
      • Workflow Components
        • Model Node
        • Code Node
        • Integrations
        • Knowledge Retrieval
        • Conditional Node
      • Passing Variables
      • API Invocation
        • List Available Workflows API
        • Workflow Execution API
        • Workflow Execution Steps API
        • Execution History API
        • Workflow Diagram API
        • API Code Examples
        • Upload Workflow JSON API
        • Workflow Runs API
    • Workflow Library
      • Research Automation
      • Real Time Financial Analysis
      • Blog Writer
      • Code Improvement
      • Energy Domain Assistant
    • Chat Interface
    • FAQ
  • ARCEE CONDUCTOR
    • Introduction to Arcee Conductor
    • Getting Started
    • Features & Functionality
      • Auto Mode
      • Auto Reasoning Mode
      • Auto Tools Mode
      • Compare
      • Direct Model Invocation
      • Usage
      • API
    • Arcee Small Language Models
      • Model Selection
      • Model Performance
    • Pricing
Powered by GitBook
On this page
  • Create API Key
  • API Syntax
  • Curl
  • Python
  1. ARCEE CONDUCTOR
  2. Features & Functionality

API

PreviousUsageNextArcee Small Language Models

Last updated 1 month ago

You can directly invoke Arcee Conductor via API. The Conductor API uses an OpenAI compatible endpoint making it very easy to update current applications to use Conductor.

Create API Key

To use the API, you first need to generate an API key.

Select your account at the bottom left of the page, and select "API Keys". Click "Create API Key" in the top right.

Provide a label/name for the key and click "Create API key". Make sure to save the key in a secure location as once you leave the page, you will not be able to view the key again. If you misplace a key, you should delete the old key and create a new one.

API Syntax

Request Syntax:

POST https://models.arcee.ai/v1/chat/completions
Authorization: Bearer <YOUR_ARCEE_TOKEN>
Content-Type: application/json

{
  "model": "auto",
  "messages": [
    {
      "role": "user",
      "content": "Your prompt here"
    }
  ]
}

Curl

curl -X POST https://models.arcee.ai/v1/chat/completions \
  -H "Authorization: Bearer $ARCEE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "model": "auto",
        "messages": [
          {
            "role": "user",
            "content": "Your prompt here"
          }
        ]
      }'

Python

# First, install the openai packages
# pip install openai

# Be sure to set the following environment variables
# OPENAI_BASE_URL="https://models.arcee.ai/v1"
# OPENAI_API_KEY="$ARCEE_TOKEN"

from openai import OpenAI

client = OpenAI()
response = client.chat.completions.create(
  model='auto',
  messages=[{'role': 'user', 'content': 'Your prompt here'}],
  temperature=0.4,
)

print(response)
Select API Key
Create API Key
Page cover image