# Your First API Call

The Arcee Platform API is OpenAI compatible. It can be accessed through your command line, or, with minor configuration changes, through the OpenAI SDK.&#x20;

| Parameter | Value                                                  |
| --------- | ------------------------------------------------------ |
| base\_url | <https://api.arcee.ai/api/v1/chat/completions>         |
| api\_key  | [Generate API key](https://chat.arcee.ai/api/api-keys) |

#### **1. Generate an API Key**

Create an API key from your [**Arcee Platform**](https://chat.arcee.ai/login) dashboard. This key authenticates all API requests.

#### **2. Choose a Model**

Specify the model you want to run inference with. Arcee currently provides the following production models:

* **trinity-mini**

#### **3. Run the Code Snippet**

Use your **API key** and **model name** in the sample code below to make your first request.

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST "https://api.arcee.ai/api/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
        "model": "trinity-mini",
        "messages": [
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Greetings!"}
        ],
        "stream": false
      }'
```

{% endtab %}

{% tab title="Python" %}

```python
from openai import OpenAI 

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.arcee.ai/api/v1"
)

response = client.chat.completions.create(
    model="trinity-mini",
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "What is 25 + 37?"},
    ],
    stream=False
)

print(response.choices[0].message.content)
print(response.choices[0].message.reasoning)

```

{% endtab %}

{% tab title="nodeJS" %}

```javascript
import OpenAI from "openai";

const openai = new OpenAI({
    baseURL: 'https://api.arcee.ai/api/v1',
    apiKey: 'YOUR_API_KEY'
});

async function main() {
  const completion = await openai.chat.completions.create({
    messages: [
      { role: "system", content: "You are a helpful assistant." },
      { role: "user", content: "What is 25 + 37?" }
    ],
    model: "trinity-mini",
  });

  console.log(completion.choices[0].message.content);
  console.log(completion.choices[0].message.reasoning);
}

main();
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arcee.ai/api-reference/your-first-api-call.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
