# Quickstart

Celeris provides **`celeris-1`**, a diffusion language model for short,
structured responses, through an **OpenAI-compatible API**. Existing OpenAI
clients can connect by using the Celeris base URL and API key.

## 1. Create an account

Sign up at the [Customer Console](https://console.celeris.ai) with
Google or an email address and password (email signups get a verification
code).

## 2. Activate your workspace

A workspace must be **activated** before it can serve requests. In the
Console, open the account menu in the bottom-left, select
[**Settings → Billing**](https://console.celeris.ai/settings/billing), and add
a payment method. This requests activation, at no charge, and is usually
immediate; if it is not, the Console tells you and we email you once the
workspace is activated. Then add credit.

## 3. Reveal your API key

Activating the workspace gives you a private API key named **Default**. In the
Console, open **API keys** and reveal it. Store the full `ck_` value in a
secret manager and keep it out of source control:

```bash
export CELERIS_API_KEY="ck_..."
```

You can create additional private keys, or reveal, rotate, and revoke your
existing keys from the Console. See
[Authentication](/authentication).

## 4. Make your first request

The API base URL includes the model's name (see [Models](/models)):

```text
https://inference.celeris.ai/celeris-1/v1
```

**cURL**

```bash
curl https://inference.celeris.ai/celeris-1/v1/chat/completions \
  -H "Authorization: Bearer $CELERIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "celeris-1",
    "messages": [
      {"role": "user", "content": "What is the capital of France? Reply with one word."}
    ],
    "max_tokens": 256
  }'
```

**Python**

```python
# pip install openai

from openai import OpenAI

client = OpenAI(
    base_url="https://inference.celeris.ai/celeris-1/v1",
    api_key=os.environ["CELERIS_API_KEY"],
)

response = client.chat.completions.create(
    model="celeris-1",
    messages=[
        {
            "role": "user",
            "content": "What is the capital of France? Reply with one word.",
        }
    ],
    max_tokens=256,
)
print(response.choices[0].message.content)
```

**TypeScript**

```typescript
// npm install openai

const client = new OpenAI({
  baseURL: 'https://inference.celeris.ai/celeris-1/v1',
  apiKey: process.env.CELERIS_API_KEY,
});

const response = await client.chat.completions.create({
  model: 'celeris-1',
  messages: [
    {
      role: 'user',
      content: 'What is the capital of France? Reply with one word.',
    },
  ],
  max_tokens: 256,
});
console.log(response.choices[0].message.content);
```

> **[Synced language tabs]**
Selecting a language updates the examples on other pages.
> **`celeris-1` accepts any positive `max_tokens`. Prompt tokens plus `max_tokens`**
must be at most 131,072, so the accepted input limit is `131,072 - max_tokens`.

## 5. Read the response

Responses use the standard OpenAI chat-completion shape. The quickstart returns
one complete JSON response; OpenAI-compatible token streaming is also supported
([Making requests](/making-requests#streaming)):

```json
{
  "id": "chatcmpl-9f2e41c0",
  "object": "chat.completion",
  "created": 1751673600,
  "model": "celeris-1",
  "choices": [
    {
      "index": 0,
      "message": {"role": "assistant", "content": "Paris"},
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 27,
    "completion_tokens": 2,
    "total_tokens": 29,
    "prompt_tokens_details": {"cached_tokens": 0}
  }
}
```

`prompt_tokens_details.cached_tokens` reports how much of the prompt used the
[cached input token rate](/pricing#rates). It is part of
`prompt_tokens`, not an additional token count.

Every successful response includes a
[`Server-Timing` header](/measuring-latency) with server-side latency
durations. Error responses may omit `usage` and `Server-Timing`; see
[Errors](/errors).

## Next steps

- [Authentication](/authentication): key lifecycle, rotation, and handling.
- [Models](/models): what celeris-1 is good at, and its limits.
- [Prompt engineering](/prompting): how to prompt a diffusion LLM for
  reliable structured output.
- [Agentic workloads](/agentic-workloads): request patterns the model
  excels at, such as classify, extract, judge, and rewrite.
- [Rate limits](/rate-limits): what's limited and how to back off cleanly.
- [Pricing](/pricing): token rates and prepaid credits.
- [Going to production](/going-to-production): the production-readiness checklist.
- Use the **Playground** in the
  [Console](https://console.celeris.ai) to test prompts without writing
  client code.
