# Codiv

> Codiv (https://codiv.ai) is an inference platform for open System One models. A System One model answers typed questions about a "state" (text or JSON) with a calibrated probability for every option, in milliseconds, instead of generating text. The first model is OpenJev (open weights, open-source server). The API is wire-compatible with TypeSafe's Jev, so TypeSafe's SDKs work unchanged.

Key facts:

- Endpoint: `POST https://api.codiv.ai/v1/systemone` with JSON `{"model": "openjev-latest", "state": ..., "questions": {id: question}}`. `GET https://api.codiv.ai/v1/models` lists models.
- Auth: `Authorization: Bearer sk-codiv-...`. Create keys at https://codiv.ai/dashboard after signing up at https://codiv.ai/signup.
- Question types: `noul` (yes/no, returns P(yes)), `choice` (1–128 named options, returns choice, probabilities, confidence), `score` (2–10 ordered levels, returns expected level, legend, probabilities, confidence).
- SDKs: Python `pip install typesafe-sdk`, TypeScript `npm install @typesafe-ai/sdk`. Set `TYPESAFE_BASE_URL=https://api.codiv.ai` and `TYPESAFE_API_KEY`.
- Free public experiment: 100M input tokens per account; output tokens are 0. 1,200 requests per minute per key by default.

## Docs

### Get started

- [Overview](https://codiv.ai/docs.md): Codiv serves open System One models that answer typed questions with calibrated probabilities, behind a Jev-compatible API.
- [Quickstart](https://codiv.ai/docs/quickstart.md): Create an API key, install an SDK and make your first System One request on Codiv.
- [Models](https://codiv.ai/docs/models.md): The open System One models served by Codiv, starting with OpenJev, and their model ids.

### Guides

- [Writing questions](https://codiv.ai/docs/guides/questions.md): How to write noul, choice and score questions, and what each one returns.
- [Probabilities & confidence](https://codiv.ai/docs/guides/confidence.md): What the probabilities and confidence in each answer mean, and how to set thresholds on them.
- [Jev compatibility](https://codiv.ai/docs/guides/jev-compatibility.md): Codiv implements TypeSafe Jev's wire API; switch with a base URL and key. Lists the differences.
- [Limits & quotas](https://codiv.ai/docs/guides/rate-limits.md): Codiv's free token quota, rate limits, request limits and retry guidance.
- [Self-hosting OpenJev](https://codiv.ai/docs/guides/self-hosting.md): Run the open-source OpenJev server on your own NVIDIA GPU with Docker.

### API reference

- [System One](https://codiv.ai/docs/api-reference/system-one.md): API reference for POST /v1/systemone: request body, question objects, response and answer objects.
- [Models](https://codiv.ai/docs/api-reference/models.md): API reference for GET /v1/models: list the models available to your key.
- [Errors](https://codiv.ai/docs/api-reference/errors.md): HTTP status codes and error bodies returned by the Codiv API.

## Optional

- [Full documentation in one file](https://codiv.ai/llms-full.txt)
- [OpenJev source code](https://github.com/razorback16/openjev)
