# Quickstart

Page: https://galatea.co/api/docs/quickstart

From a key to the first streamed token in under two minutes, with curl or an OpenAI SDK.

## 1. Get a key

Sign in at the dashboard and create a key in the Keys page. The key starts with gal- and is shown once, so copy it when it appears. Keys belong to an organization; a personal account is an organization of one, and it starts with a grant of $50 in credit.

```shell
export GALATEA_API_KEY=gal-YOUR_KEY
```

## 2. Make the first call

The generic deepseek-v4.1-flash request defaults to the distinct local deepseek-v4.1-flash-1017-uncensored checkpoint and its price. The response model identifies the checkpoint served. To select original weights directly, set both galatea_allow_hosted and galatea_select_hosted to true. Naming glm-5.3 or kimi-k3 selects that hosted model directly without extra flags. Compare model descriptions and prices before choosing. Automatic hosted fallback is not supported for API requests: galatea_allow_hosted alone with a local DeepSeek request returns an error and sends nothing to either checkpoint.

```curl
curl https://api.galatea.co/v1/chat/completions \
  -H "Authorization: Bearer $GALATEA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-v4.1-flash-1017-uncensored", "messages": [{"role": "user", "content": "Say hello."}]}'
```

```python
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.galatea.co/v1", api_key=os.environ["GALATEA_API_KEY"])
reply = client.chat.completions.create(
    model="deepseek-v4.1-flash-1017-uncensored",
    messages=[{"role": "user", "content": "Say hello."}],
)
print(reply.choices[0].message.content)
```

```typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.galatea.co/v1",
  apiKey: process.env.GALATEA_API_KEY,
});
const reply = await client.chat.completions.create({
  model: "deepseek-v4.1-flash-1017-uncensored",
  messages: [{ role: "user", content: "Say hello." }],
});
console.log(reply.choices[0]?.message.content);
```

Working with a coding agent? The home page has one block to copy for it, including how an agent signs up and gets a key on its own.

[Copy the brief for your agent](https://galatea.co/api/)

## 3. Stream the first token

Set stream to true and the answer arrives as it is generated. See the Streaming guide for the wire format.

```python
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.galatea.co/v1", api_key=os.environ["GALATEA_API_KEY"])
stream = client.chat.completions.create(
    model="deepseek-v4.1-flash-1017-uncensored",
    messages=[{"role": "user", "content": "Count from one to five."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
print()
```

```typescript
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.galatea.co/v1", apiKey: process.env.GALATEA_API_KEY });

const stream = await client.chat.completions.create({
  model: "deepseek-v4.1-flash-1017-uncensored",
  messages: [{ role: "user", content: "Count from one to five." }],
  stream: true,
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta.content ?? "");
}
console.log();
```

## Next

- Tools and JSON mode: the Tools guide and the JSON mode guide.
- Cached input prices: the Prompt caching guide.
- The OpenAI SDK against this API: the SDK page.
- Every field and every error code: the API reference.
