> ## Documentation Index
> Fetch the complete documentation index at: https://www.usenotra.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Notra Labs Platform quickstart

> Sign in to the Notra Labs Platform, add credits, create an API key and call writer-0.1 with curl, the OpenAI SDK for TypeScript or Python, or the AI SDK.

**1. Sign in**

Sign in at [platform.usenotra.com](https://platform.usenotra.com). The platform is invite-only, so use the account your invite was sent to. If you don't have one yet, ask your Notra contact.

**2. Add credits**

Your personal workspace starts with \$5 in credits. To add more, open **Billing** and click **Add credits**. See [Credits and billing](https://www.usenotra.com/docs/platform/account/credits-and-billing.md).

**3. Create an API key**

Open **API keys**, click **Create API key**, name it and pick an environment. Copy the key: the console shows it only once. See [API keys](https://www.usenotra.com/docs/platform/account/api-keys.md).

**4. Set the key in your environment**

```bash theme={"system"}
export NOTRA_LABS_API_KEY="nl_live_..."
```

Read the key from the environment in your code, and never commit it.

**5. Send your first request**

```bash curl theme={"system"}
curl https://platform.usenotra.com/v1/chat/completions \
  -H "Authorization: Bearer $NOTRA_LABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "writer-0.1",
    "messages": [{ "role": "user", "content": "Write a changelog entry for faster search." }]
  }'
```

```ts TypeScript theme={"system"}
// npm i openai
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://platform.usenotra.com/v1",
  apiKey: process.env.NOTRA_LABS_API_KEY,
  timeout: 750_000,
});

const response = await client.responses.create({
  model: "writer-0.1",
  input: "Write a changelog entry for faster search.",
});
console.log(response.output_text);
```

```python Python theme={"system"}
# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://platform.usenotra.com/v1",
    api_key=os.environ["NOTRA_LABS_API_KEY"],
    timeout=750,
)
stream = client.responses.create(
    model="writer-0.1",
    input="Write a changelog entry for faster search.",
    stream=True,
)
for event in stream:
    if event.type == "response.output_text.delta":
        print(event.delta, end="", flush=True)
```

```ts AI SDK theme={"system"}
// npm i ai @ai-sdk/openai-compatible
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { streamText } from "ai";

const notra = createOpenAICompatible({
  name: "notra",
  baseURL: "https://platform.usenotra.com/v1",
  apiKey: process.env.NOTRA_LABS_API_KEY,
});

const { textStream } = streamText({
  model: notra("writer-0.1"),
  prompt: "Write a changelog entry for faster search.",
});
for await (const delta of textStream) process.stdout.write(delta);
```

The TypeScript example sets the client timeout above the gateway's 720-second model deadline, so long answers don't time out in the SDK. The Python example streams the answer as it is written.

**6. Find it in Logs**

Open **Logs** in the console. The request is there with its prompt, the model's plan, the answer, tokens, cost and timings.

> [!TIP]
>
> The first request after the model has been idle can get 503 `model_starting` while it starts. Retry after the `retry-after` header. See [Cold starts and retries](https://www.usenotra.com/docs/platform/guides/cold-starts-and-retries.md).

## Next steps

> [card] [Stream answers](https://www.usenotra.com/docs/platform/guides/streaming.md)
>
> Show text as it is written, on both APIs.

> [card] [Call functions](https://www.usenotra.com/docs/platform/guides/function-calling.md)
>
> Let writer-0.1 call your tools.

> [card] [Set up a coding agent](https://www.usenotra.com/docs/platform/guides/coding-agents.md)
>
> Use writer-0.1 in OpenCode, or let your agent wire it into your app.

> [card] [Handle errors](https://www.usenotra.com/docs/platform/api-reference/errors.md)
>
> Every error code and what to do about it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.