# Quick Start

Source: https://staging-docs.aiand.com/getting-started/

This page walks you through getting an API key and making your first call. By the end you'll have streamed a response, and know where to go for tool calling, vision, and structured outputs.

## 1. Get a key and credits

<Steps>

1. Sign in at [console.aiand.com](https://console.aiand.com) — Google, GitHub, or magic link.
2. Create an API key. Keys start with `sk-` and are shown **once** — store it in your secret manager.
3. Add credits on the billing page. Minimum top-up is $1.

</Steps>

## 2. Make your first call

<Tabs>
<TabItem label="Python">

```bash
pip install openai
```

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aiand.com/v1",
    api_key="sk-your-api-key",
)

response = client.chat.completions.create(
    model="openai/gpt-oss-120b",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
```

</TabItem>
<TabItem label="Node.js">

```bash
npm install openai
```

```ts

const client = new OpenAI({
  baseURL: "https://api.aiand.com/v1",
  apiKey: "sk-your-api-key",
});

const response = await client.chat.completions.create({
  model: "openai/gpt-oss-120b",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);
```

</TabItem>
<TabItem label="curl">

```bash
curl https://api.aiand.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-oss-120b",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

</TabItem>
</Tabs>

<Aside type="tip">
  Don't have a model in mind? List what's available to your org with `client.models.list()` — see [Catalog](/models/catalog/).
</Aside>

## 3. Stream the response

Add `stream=True` and iterate. You get tokens as they're produced, plus a final cost and request-id trailer event.

```python
stream = client.chat.completions.create(
    model="openai/gpt-oss-120b",
    messages=[{"role": "user", "content": "Tell me a haiku about Tokyo."}],
    stream=True,
    stream_options={"include_usage": True},
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="", flush=True)
```

Streaming details, including the opt-in `metrics` trailer, are documented at [Streaming](/capabilities/streaming/).

## 4. Pick your next step

| You want to… | Go here |
|--------------|---------|
| Let the model call your functions | [Tool Calling](/capabilities/tool-calling/) |
| Get JSON output that matches a schema | [Structured Outputs](/capabilities/structured-outputs/) |
| Send an image to the model | [Vision](/capabilities/vision/) |
| Build something end-to-end (RAG, agent, extraction…) | [Cookbook](/cookbook/rag/) |
| Wire ai& into LangChain / LlamaIndex / Vercel AI SDK | [Integrations](/integrations/langchain/) |
| Migrate an existing OpenAI / Anthropic project | [Migrating from OpenAI](/migrating-openai/) · [Migrating from Anthropic](/migrating-anthropic/) |

## Authentication beyond API keys

For browser apps and the console, ai& also supports JWT auth with an `X-Org-ID` header. See [Authentication](/authentication/) and [Switching Orgs](/organizations/switching/).
