How to Send Requests to a Model Using the System One API

Last verified 28 Sep 2026

Inference provides a single control plane for managing inference workflows. It includes a Model Catalog where you can view available foundation models, including both DigitalOcean-hosted and third-party commercial models, compare model capabilities and pricing, use routing to match inference requests to the best-fit model, and run inference using serverless or dedicated deployments.

Jev is a TypeSafe AI System One model on DigitalOcean Serverless Inference. Instead of generating free-form text, it returns a typed decision (a choice, a numeric score, or a yes/no answer) with a calibrated probability attached to each answer, which lets you set explicit thresholds for when your application acts automatically and when it escalates to a person.

Jev uses its own /v1/systemone endpoint rather than the Chat Completions API. It takes a state and a questions object instead of a messages array, and it is not OpenAI compatible. It does not accept image, audio, or video input, and it does not support streaming.

Create a model access key from the Serverless Inference tab of the DigitalOcean Control Panel and save it for use with the API. The examples below read it from a MODEL_ACCESS_KEY environment variable.

Jev is a third-party model, so your account must be on a qualifying tier to use it. If a request returns this model is not available for your subscription tier, raise your tier from the Control Panel. For more information, see Inference Limits. Use of Jev is subject to the TypeSafe AI Master Customer Agreement.

Send a Decision Request

Send a POST request to https://inference.do-ai.run/v1/systemone with the following fields in the body:

  • model: The model ID. Use typesafe-jev-1.13.0, or find it on the available models page.

  • state: The context Jev evaluates each question against. The state can be a string, a JSON object, or an array of text values.

  • questions: An object where each key names a question. Each question sets its type, instructions that tell Jev what to decide, and the fields that the type requires. For a choice question, provide a criteria object that maps each allowed answer to a short description of when it applies.

The following example asks a single choice question about a customer feedback string:

curl -sS -X POST https://inference.do-ai.run/v1/systemone \
  -H "Authorization: Bearer $MODEL_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "typesafe-jev-1.13.0",
    "state": "The customer said the delivery was late but the product quality was excellent.",
    "questions": {
      "sentiment": {
        "type": "choice",
        "instructions": "What is the overall sentiment of this feedback?",
        "criteria": {
          "positive": "Customer is happy overall",
          "negative": "Customer is unhappy overall",
          "mixed": "Customer has both good and bad things to say"
        }
      }
    }
  }'
import os
import requests

response = requests.post(
    "https://inference.do-ai.run/v1/systemone",
    headers={
        "Authorization": f"Bearer {os.environ['MODEL_ACCESS_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "model": "typesafe-jev-1.13.0",
        "state": "The customer said the delivery was late but the product quality was excellent.",
        "questions": {
            "sentiment": {
                "type": "choice",
                "instructions": "What is the overall sentiment of this feedback?",
                "criteria": {
                    "positive": "Customer is happy overall",
                    "negative": "Customer is unhappy overall",
                    "mixed": "Customer has both good and bad things to say",
                },
            }
        },
    },
)
response.raise_for_status()
print(response.json())

The response returns one answer per question key. For a choice question, the answer includes the selected choice, a probabilities object giving the calibrated probability of each option, and an overall confidence score. The usage object reports the input and output token counts for the request. Compare confidence, or a specific option’s probability, against a threshold to decide whether to act on the answer automatically or route it for human review.

The response is similar to the following:

{
  "model": "typesafe-jev-1.13.0",
  "answers": {
    "sentiment": {
      "type": "choice",
      "choice": "mixed",
      "probabilities": {
        "mixed": 1,
        "negative": 0,
        "positive": 0
      },
      "confidence": 1
    }
  },
  "usage": {
    "input_tokens": 349,
    "output_tokens": 39
  }
}

Ask Multiple Questions in One Request

Add more keys to the questions object to evaluate several questions against the same state in a single call. Each question can use a different type, and Jev answers each one independently and returns a result per key.

The following example asks a choice question about sentiment and a noul question about whether the feedback needs a follow-up:

curl -sS -X POST https://inference.do-ai.run/v1/systemone \
  -H "Authorization: Bearer $MODEL_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "typesafe-jev-1.13.0",
    "state": "The customer said the delivery was late but the product quality was excellent.",
    "questions": {
      "sentiment": {
        "type": "choice",
        "instructions": "What is the overall sentiment of this feedback?",
        "criteria": {
          "positive": "Customer is happy overall",
          "negative": "Customer is unhappy overall",
          "mixed": "Customer has both good and bad things to say"
        }
      },
      "needs_followup": {
        "type": "noul",
        "instructions": "Does this feedback require a follow-up from the support team?"
      }
    }
  }'

The response is similar to the following:

{
  "model": "typesafe-jev-1.13.0",
  "answers": {
    "needs_followup": {
      "type": "noul",
      "noul": 0.68
    },
    "sentiment": {
      "type": "choice",
      "choice": "mixed",
      "probabilities": {
        "mixed": 1,
        "negative": 0,
        "positive": 0
      },
      "confidence": 1
    }
  },
  "usage": {
    "input_tokens": 368,
    "output_tokens": 59
  }
}

Question Types

Set each question’s type field to select what kind of answer Jev returns:

  • choice: Jev selects one option from the criteria object you define, where each key is an allowed answer and its value describes when that answer applies. The answer includes the selected choice, a probabilities object over the options, and an overall confidence. Use it for classification, routing, and labeling.

  • score: Jev rates the state against an ordered scale. Provide criteria as an array of levels from lowest to highest, where each level is a descriptive string or an object with a label. The answer includes a numeric score (the probability-weighted average of the level positions), a legend mapping each level index to your criteria, a probabilities object over the levels, and an overall confidence. Use it for ranking, rating, and grading.

  • noul: TypeSafe’s question type for yes/no decisions. Instead of a literal yes or no, Jev returns a calibrated probability between 0 and 1 that the statement in your instructions is true. This type does not require criteria. Use it for yes/no, pass/fail, and gating decisions by thresholding the probability at the level your workflow requires.

The following example sends a score question with an ordered set of levels:

curl -sS -X POST https://inference.do-ai.run/v1/systemone \
  -H "Authorization: Bearer $MODEL_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "typesafe-jev-1.13.0",
    "state": "The customer said the delivery was late but the product quality was excellent.",
    "questions": {
      "satisfaction": {
        "type": "score",
        "instructions": "Rate overall customer satisfaction from low to high.",
        "criteria": ["low", "medium", "high"]
      }
    }
  }'

The response reports the score, the per-level probabilities, and a confidence value:

{
  "model": "typesafe-jev-1.13.0",
  "answers": {
    "satisfaction": {
      "type": "score",
      "score": 1.32,
      "legend": {
        "0": "low",
        "1": "medium",
        "2": "high"
      },
      "probabilities": {
        "0": 0,
        "1": 0.68,
        "2": 0.32
      },
      "confidence": 0.52
    }
  },
  "usage": {
    "input_tokens": 307,
    "output_tokens": 17
  }
}

Understand Context Limits

Jev applies two separate token limits to each request:

  • A total limit of 64K tokens for the whole request.

  • A limit of 32K tokens for the state plus the single longest question.

Requests that exceed either limit are rejected. Because Jev bills per input token and output tokens are free, your cost scales with the size of the state and questions you send rather than the length of the answer. For current rates, see Inference Pricing.

Serverless Inference API Endpoints

Synchronous and asynchronous API endpoints for serverless inference.

Available Models for Serverless Inference

DigitalOcean Inference supports 70+ models including OpenAI GPT, Claude, Llama, DeepSeek, Qwen, and Kimi through an OpenAI-compatible API.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.