LINKORA
OverviewQuickstart

Jev SDK for TypeScript and Python (TypeSafe SDK)

Point the official TypeSafe JavaScript or Python SDK at Linkora to call Jev with your Linkora API key

TypeSafe SDK

You can point an existing TypeSafe client at Linkora by changing its base URL. Requests to System One models such as Jev are then billed to your Linkora account and routed through Linkora's System One API. The TypeSafe SDK is available for JavaScript and TypeScript (@typesafe-ai/sdk) and for Python (typesafe_sdk).

If you would rather call Jev without the TypeSafe SDK, use the Decisions API directly or through the Linkora TypeScript, Python, or Go SDK. The Jev tutorial walks through that path from the first request to a threshold decision.

Base URL

Linkora's System One API is available at the following base URL:

https://link-ora.net/api

The SDK appends /v1/systemone to the base URL, so requests are sent to https://link-ora.net/api/v1/systemone.

Authentication

Use your Linkora API key as the Authorization: Bearer <token> header. The SDK sets this header from the apiKey option (api_key in Python) or the TYPESAFE_API_KEY environment variable.

Migrating an existing client

Change the base URL and the API key. Everything else stays the same.

import { TypeSafeClient } from '@typesafe-ai/sdk';

const client = new TypeSafeClient({
  apiKey: process.env.LINKORA_API_KEY,
  baseURL: 'https://link-ora.net/api',
});

Both SDKs also read the base URL from the TYPESAFE_BASE_URL environment variable, so you can leave the constructor unchanged and set TYPESAFE_BASE_URL=https://link-ora.net/api and TYPESAFE_API_KEY=<your Linkora API key> instead.

Evaluating state against questions

const result = await client.systemOne({
  model: 'jev-1.13',
  state: 'I was charged twice for my subscription.',
  questions: {
    refund: { type: 'noul', instructions: 'Is the customer asking for money back?' },
    department: {
      type: 'choice',
      instructions: 'Which team should handle this?',
      criteria: { billing: 'Charges and refunds', technical: 'Bugs and outages' },
    },
  },
});

console.log(result.answers.refund); // { type: 'noul', noul: 0.98 }

Model IDs

The System One API accepts TypeSafe's bare System One model IDs and maps them onto Linkora's typesafe/ namespace before routing:

  • jev-1.13 is routed as typesafe/jev-1.13.
  • jev-latest is routed as ~typesafe/jev-latest, Linkora's alias for the newest Jev release.
  • IDs that already carry an author prefix, such as typesafe/jev-1.13, are used as-is.

The model field in the response contains the Linkora model ID of the System One model that served the request.

Supported endpoints

  • POST /api/v1/systemone sends state and typed questions to a System One model and returns its answers.

The TypeSafe SDK's model listing (client.models.list() in JavaScript) calls GET /api/v1/models, which is Linkora's Models API and returns Linkora's response shape rather than TypeSafe's, so the SDK rejects it. Browse Linkora's System One models or call the Models API directly instead.

Request and response format

The System One API implements TypeSafe's request and response shapes. Requests require model, state, and questions, and responses contain model, answers, and usage. Linkora additionally returns id, provider, and usage.cost, which both SDKs pass through without error.

curl https://link-ora.net/api/v1/systemone \
  -H "Authorization: Bearer $LINKORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev-1.13",
    "state": "I was charged twice for my subscription.",
    "questions": {
      "refund": {
        "type": "noul",
        "instructions": "Is the customer asking for money back?"
      }
    }
  }'

Jev resources on Linkora