> For the complete documentation index, see [llms.txt](https://docs.appmixer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appmixer.com/connector-configuration/typesafe.md).

# TypeSafe AI

https\://console.typesafe.ai

The Appmixer TypeSafe AI connector uses **API key** authentication. No OAuth app registration is required — you only need an API key from the TypeSafe console.

TypeSafe's Jev model does not generate text. You send it content together with typed questions (pick one of these options, rate on this scale, is this statement true) and it returns a decision limited to the options you supplied, with probabilities and a confidence score.

***

## 1. Generate an API Key

1. Open the [TypeSafe console](https://console.typesafe.ai) and sign in with Google or with a code sent to your e-mail.
2. In the left sidebar, go to **API Keys** (<https://console.typesafe.ai/keys>).
3. Click **Create key** and give the key a descriptive name (e.g. `Appmixer Integration`).
4. Copy the key. It starts with `apikey_`.

![API keys in the TypeSafe console](https://802996127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIAGKHlIqVKJe9agnFr14%2Fuploads%2Fgit-blob-2a3b1be476d500fe5c53e70bb028194a61d4968d%2Ftypesafe-api-keys.png?alt=media)

The list shows every key with its status and a masked value, so you can always check which key a connection in Appmixer uses — Appmixer labels the connection with the same masked form.

{% hint style="warning" %}
Treat the API key like a password. Anyone who has it can run requests that are billed to your TypeSafe account. Store it securely and do not expose it in client-side code.
{% endhint %}

{% hint style="info" %}
Requests are billed by input tokens. Check **Usage** and **Billing** in the TypeSafe console to see what your flows consume.
{% endhint %}

***

## 2. Connect in Appmixer

When adding a TypeSafe AI component in Appmixer, you will be prompted to authenticate. Provide:

* **API Key** — the key generated in Step 1.

Appmixer verifies the key by calling `GET https://api.typesafe.ai/v1/models`. TypeSafe has no profile endpoint, so the connection is labelled with the masked key (for example `api...efd8`).

***

## 3. Try It Out

The connector's components map one to one to what you can test in the TypeSafe console **Playground**:

* **Content** is the Playground's *State* — the text (or JSON) the questions are about.
* **Classify Text** is a *Choice* question, **Score Text** is a *Score* question and **Verify Statement** is a *Noul* question.
* **Ask Questions** sends several questions about the same content in one request. You add one row per question (an ID, the type, the question and its options or levels) and every answer becomes its own output variable, named after the question ID.

{% hint style="info" %}
Need more than one answer about the same content? Put all the questions into a single **Ask Questions** component instead of chaining Classify Text, Score Text and Verify Statement. The content is sent and billed only once, so the flow is both faster and cheaper.
{% endhint %}

The **Model** input offers the models available to your account. `jev-latest` is the default; a version such as `jev-1.13.0` pins the model.

***

## Troubleshooting

### "Invalid TypeSafe API key" / 401 Unauthorized

* Make sure the key was copied completely, including the `apikey_` prefix.
* Check in the console under **API Keys** that the key has not been deleted, and create a new one if needed.

### "TypeSafe rejected the request (400)"

* `Unknown model` — the **Model** input holds a name your account does not have. Pick one from the list or use `jev-latest`.
* `Too many score levels` — **Score Text** accepts 2 to 10 levels.

### 429 Too Many Requests / 529 Overloaded

* These are temporary. Appmixer retries the request automatically; the connector already stays below TypeSafe's documented rate limit.

***

## Resources

* [TypeSafe API reference](https://docs.typesafe.ai/api)
* [Question types (primitives)](https://docs.typesafe.ai/primitives)
* [Models](https://docs.typesafe.ai/models)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appmixer.com/connector-configuration/typesafe.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
