> ## 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.

# API reference

> The Notra Labs Platform API: base URL, Bearer API key auth, OpenAI compatibility, the four endpoints, and which parameters each generation API accepts.

The API follows OpenAI's Chat Completions and Responses APIs, so OpenAI's SDKs work with only the base URL changed. The endpoint pages are generated from the OpenAPI document at [https://platform.usenotra.com/openapi.json](https://platform.usenotra.com/openapi.json).

## Base URL

`https://platform.usenotra.com/v1`

## Authentication

Send an [API key](https://www.usenotra.com/docs/platform/account/api-keys.md) as a Bearer token:

```bash theme={"system"}
Authorization: Bearer $NOTRA_LABS_API_KEY
```

A missing, invalid or revoked key gets 401 `invalid_api_key`.

## Endpoints

| Endpoint | Purpose |
| - | - |
| [`POST /v1/chat/completions`](https://www.usenotra.com/docs/platform/api-reference/chat-completions/create-a-chat-completion) | Chat Completions. Returns the plan as `reasoning_content`. |
| [`POST /v1/responses`](https://www.usenotra.com/docs/platform/api-reference/responses/create-a-response) | The Responses API, without server-side conversation state. Leaves the plan out. |
| [`GET /v1/models`](https://www.usenotra.com/docs/platform/api-reference/models/list-models) | The models you can call. |
| [`GET /v1/models/{id}`](https://www.usenotra.com/docs/platform/api-reference/models/retrieve-a-model) | One model. |

Both generation endpoints stream with `stream: true`. See [Streaming](https://www.usenotra.com/docs/platform/guides/streaming.md).

The Responses API doesn't keep conversation state for you: `previous_response_id` and `conversation` are rejected, `store: true` doesn't make responses retrievable, and past responses can't be fetched by ID, so send the full history with each request. Notra still stores every request to either endpoint, with its prompt, the model's plan and answer, and the information your SDK sends about itself, in your workspace's [Logs](https://www.usenotra.com/docs/platform/account/logs-and-usage.md). See [Data and privacy](https://www.usenotra.com/docs/platform/account/data-and-privacy.md).

## Request limits

* Up to 500 messages and 1.45 MB of JSON per request.
* Text only: images, files and audio are rejected.
* Output limits are bounded by the model's maximum and the room left in the context window. See [Long context](https://www.usenotra.com/docs/platform/guides/long-context.md).

## Chat Completions parameters

| Parameter | Behaviour |
| - | - |
| `model` | `writer-0.1`. |
| `messages` | Up to 500 messages with roles system, developer, user, assistant and tool. Text content only. |
| `max_tokens`, `max_completion_tokens` | Caps the output, plan included. Without it the model can write up to 32,768 tokens. Larger values are lowered to 32,768 and to the room left in the 262,144-token context window. |
| `stream`, `stream_options` | Streams server-sent events. The last chunk carries usage only with `stream_options: { include_usage: true }`. |
| `stop` | A string or up to 4 strings, applied to the answer and never to the plan. |
| `response_format` | `text`, `json_object` or `json_schema`. A `json_schema` format needs a `name` (1 to 64 letters, digits, `_` or `-`) and a `schema` object. |
| `tools`, `tool_choice`, `parallel_tool_calls` | Function tools; other tool types are ignored. `tool_choice` is `auto`, `none`, `required` or a named function. |
| `presence_penalty`, `frequency_penalty`, `seed`, `user` | Passed to the model. |
| `temperature`, `top_p` | Range-checked (`temperature` 0 to 2, `top_p` 0 to 1) but no effect: writer-0.1 samples with its own fixed settings. |
| `n` | Must be 1. |
| `logprobs`, `top_logprobs`, `logit_bias`, `audio`, `modalities`, `prediction` | Rejected with 400 `unsupported_parameter`, as is a legacy `function_call` that names a function. Legacy `functions` are ignored. |

## Responses parameters

| Parameter | Behaviour |
| - | - |
| `model` | `writer-0.1`. |
| `input` | A string, or a list of messages (roles user, assistant, system and developer, text content), `function_call` items and `function_call_output` items. |
| `instructions` | The system prompt. |
| `max_output_tokens` | Caps the output, plan included. Without it the model can write up to 32,768 tokens. Larger values are lowered to 32,768 and to the room left in the 262,144-token context window. |
| `stream` | Streams server-sent events in the Responses format. |
| `text.format` | `text`, `json_object` or `json_schema`. A `json_schema` format needs a `name` (1 to 64 letters, digits, `_` or `-`) and a `schema` object. |
| `tools`, `tool_choice`, `parallel_tool_calls` | Function tools as `{type: "function", name, description, parameters, strict}`. `tool_choice` is `auto`, `none`, `required` or `{type: "function", name}`. `parallel_tool_calls: false` asks for at most one call. |
| `user`, `safety_identifier` | Passed to the model as `user`. |
| `temperature`, `top_p` | Range-checked (`temperature` 0 to 2, `top_p` 0 to 1) but no effect: writer-0.1 samples with its own fixed settings. |
| `stop`, `logit_bias`, `previous_response_id`, `conversation`, `background`, `prompt` | Rejected with 400 `unsupported_parameter`, as are tools other than functions, like built-in and custom tools. Other fields are ignored. |

## Request IDs

Every response has an `x-request-id` header. Find the request in [Logs](https://www.usenotra.com/docs/platform/account/logs-and-usage.md) by its ID, and include it when you contact support.


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