# Quick Start

Get your first AI response in under 5 minutes.

## 1. Get an API key

Sign in to [Freddy](https://chat.aitronos.com), go to **Settings → API Keys**, and create a key. Your key starts with `ak_`.

## 2. Make your first request

Python SDK

```python
from aitronos import Aitronos

client = Aitronos(api_key="your-api-key")

result = client.responses.create_response(
    organization_id="org_your_org_id",
    model="gpt-4o",
    inputs=[{"role": "user", "content": "Hello, world!"}],
)

print(result.response[0]["text"])
```

Install the SDK: `pip install aitronos-sdk`

cURL

```bash
curl https://api.aitronos.com/v1/model/response \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "org_your_org_id",
    "model": "gpt-4o",
    "inputs": [{"role": "user", "content": "Hello, world!"}]
  }'
```

Python

```python
import os
import requests

response = requests.post(
    "https://api.aitronos.com/v1/model/response",
    headers={"X-API-Key": os.environ["FREDDY_API_KEY"]},
    json={
        "organization_id": "org_your_org_id",
        "model": "gpt-4o",
        "inputs": [{"role": "user", "content": "Hello, world!"}],
    },
)
data = response.json()
print(data["response"][0]["text"])
```

JavaScript

```javascript
const response = await fetch("https://api.aitronos.com/v1/model/response", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.FREDDY_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    organization_id: "org_your_org_id",
    model: "gpt-4o",
    inputs: [{ role: "user", content: "Hello, world!" }],
  }),
});
const data = await response.json();
console.log(data.response[0].text);
```

## 3. Response structure


```json
{
  "success": true,
  "thread_id": "thrd_abc123",
  "response_id": "msg_abc123",
  "response": [
    {
      "type": "text",
      "text": "Hello! How can I help you today?"
    }
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 10,
    "output_tokens": 9
  }
}
```

The `response` array contains one or more content blocks. For plain text responses, read `response[0]["text"]`.

## 4. Keep conversation context with threads

Pass a `thread_id` to maintain conversation state across requests. Threads are created automatically on first use — pass the `thread_id` returned in the response to continue the conversation.


```python
from aitronos import Aitronos

client = Aitronos(api_key="your-api-key")

# First message — no thread_id, one gets created
first = client.responses.create_response(
    organization_id="org_your_org_id",
    model="gpt-4o",
    inputs=[{"role": "user", "content": "My name is Alice."}],
)
thread_id = first.thread_id

# Follow-up message — pass the thread_id
second = client.responses.create_response(
    organization_id="org_your_org_id",
    model="gpt-4o",
    thread_id=thread_id,
    inputs=[{"role": "user", "content": "What is my name?"}],
)
print(second.response[0]["text"])  # "Your name is Alice."
```

## 5. Use an assistant

Assistants add persistent instructions, a default model, and optional file context to every conversation:


```python
result = client.responses.create_response(
    organization_id="org_your_org_id",
    assistant_id="asst_your_assistant_id",
    inputs=[{"role": "user", "content": "Summarize our return policy."}],
)
print(result.response[0]["text"])
```

## Next steps

- [Authentication guide](/docs/documentation/auth/login-flow) — Bearer tokens, API keys, refresh flow
- [Models reference](/docs/documentation/getting-started/models) — Available models and selection guide
- [Threads](/docs/documentation/core-concepts/threads) — Stateful conversations
- [Streaming](/docs/documentation/running-methods/streaming-mode) — Real-time responses
- [Create a Response endpoint](/docs/api-reference/responses/create) — Full parameter reference