Get your first AI response in under 5 minutes.
Sign in to Freddy, go to Settings → API Keys, and create a key. Your key starts with ak_.
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
{
"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"].
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.
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."Assistants add persistent instructions, a default model, and optional file context to every conversation:
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"])- Authentication guide — Bearer tokens, API keys, refresh flow
- Models reference — Available models and selection guide
- Threads — Stateful conversations
- Streaming — Real-time responses
- Create a Response endpoint — Full parameter reference