jev / gallery

JEV GUIDE

Jev API quickstart: send and validate your first request

This walkthrough uses synthetic feedback about an empty exported file. The example follows the documented interface; it has not been sent to the API and contains no invented model response.

Prepare a server-side environment

Obtain an API credential from the TypeSafe console and provide TYPESAFE_API_KEY through your environment or server secret store. Keep it out of public HTML, browser scripts and Git.

The example uses curl; a Python SDK path is also documented. Check your account’s access and current billing before execution.

Source: TypeSafe · Quick start ↗

Save the input first

Save this JSON as request.json. The state contains the feedback, reproducible_bug is the response key used by your application, and instructions contains the full judgment to make.

JSON
{
  "model": "jev-latest",
  "state": {
    "report": "The preview loads, but clicking Export produces a blank file."
  },
  "questions": {
    "reproducible_bug": {
      "type": "noul",
      "instructions": "Does `report` describe a specific software action and an unexpected result?"
    }
  }
}

Source: TypeSafe · API reference ↗

Send one small request

Run this command only after configuring the environment variable. It has a 30-second timeout and no automatic retry loop. Executing it contacts the TypeSafe API and may consume paid usage or your account quota.

Shell
# TYPESAFE_API_KEY must already be set in your shell.
# Save the JSON example below as request.json.
curl --fail-with-body --max-time 30 \
  https://api.typesafe.ai/v1/systemone \
  -H "Authorization: Bearer $TYPESAFE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @request.json

Source: TypeSafe · API reference ↗

Validate more than the status code

Check that answers contains reproducible_bug, its type is noul, and its value is a number between zero and one. Record the returned model and usage; the latest alias is not a pinned version.

Display the decision in a development view before connecting it to a production action. A valid response can still disagree with your expected label.

  • Authentication failure: inspect account configuration without printing the secret.
  • Validation failure: compare the fields and question type with the API reference.
  • Rate limits, service failures or timeouts: bound retries and preserve the final error.
  • Before batching: inspect measured usage and set concurrency and spending limits.

Turn the fixture into a regression set

Add feature requests, incomplete reports and successful exports as contrasting inputs. Define expected handling and rerun comparisons when instructions or model versions change. Then consider a backend wrapper or one of the projects below.

Download request.json fixture ↓

Explore these projects next

Continue reading