Skip to content
Heimdallm
Marketplace/Documentation
Documentation · API reference

Decisions

POST https://api-staging.impossiblecarrot.cc/api/v1/systemone

System One inference answers typed questions about one supplied state. Each question is evaluated in one encoder row and returns probabilities rather than prose. A bearer API key and an explicit marketplace model id are required. The TypeSafe clients default to jev-latest, which is not a marketplace model id.

Request body

FieldTypeNotes
modelstringRequired marketplace model id.
statestring, object or arrayRequired content to judge.
questionsobjectRequired nonempty map of caller chosen ids to typed questions.
questions.*.typechoice, score or noulRequired discriminator.
questions.*.instructionsstring, object or arrayRequired guidance.
questions.*.criteriaobject or arrayChoice keys map to guidance or null; score uses a nonempty array; noul optionally names both true and false.
providerobjectProvider preferences.
user, session_idstringOptional opaque identifiers, at most 256 characters each.
traceobjectOptional trace metadata; the marketplace accepts it and does not forward it to the engine.
curl https://api-staging.impossiblecarrot.cc/api/v1/systemone -H "Authorization: Bearer $HEIMDALL_API_KEY" -H "Content-Type: application/json" -d '{"model":"convaiinnovations/laya","state":"We were billed twice. Please refund the duplicate charge.","questions":{"dept":{"type":"choice","instructions":"Which team?","criteria":{"billing":"Invoices and refunds","engineering":"Bugs and outages"}}}}'
{
  "id": "gen_01J8Z4K6V9",
  "model": "convaiinnovations/laya",
  "provider": "ImpCC",
  "answers": {
    "dept": {
      "type": "choice",
      "choice": "billing",
      "probabilities": { "billing": 0.94, "engineering": 0.06 },
      "confidence": 0.81
    }
  },
  "usage": { "input_tokens": 123, "output_tokens": 0, "cost": 0.0000052 }
}

Response fields

FieldMeaning
answersOne typed answer per submitted question id.
choice, score, noulThe answer value for that question type.
probabilitiesPer-option probabilities on choice and score answers.
confidenceConfidence on choice and score answers.
legendScore level descriptions keyed 0 through the last level.
usage.input_tokensTokens processed across all question rows; the state counts once per question.
usage.output_tokensAlways zero, since no output text is generated.
usage.costUSD charged at the endpoint's prompt-token price, or null if no price is declared.

An endpoint must declare the decisions output. decisions_unsupported and decisions_ask_unsupported appear in a 503 no_route response when no endpoint offers the rail or fits the question types and count. Each row must fit the endpoint's context window. An oversized row is filtered with context_too_small; an engine's exact tokenizer may still refuse it with 400 context_length_exceeded. The state is never silently trimmed.

TypeSafe SDK

The Node and Python TypeSafe clients append /v1/systemone to the configured base URL. Set TYPESAFE_BASE_URL to {apiOrigin()}/api and TYPESAFE_API_KEY to the marketplace key, then pass model explicitly:

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

const client = new TypeSafeClient({
  baseURL: `${API_ORIGIN}/api`,
  apiKey: process.env.HEIMDALL_API_KEY,
});
const reply = await client.systemOne({
  model: 'convaiinnovations/laya',
  state: 'Refund the duplicate charge.',
  questions: { dept: choice('Which team?', { billing: null, engineering: null }) },
});

The Python typesafe-sdk client accepts base_url with the same /api suffix. The SDKs retry 408, 429 and server errors and honour Retry-After.

DiscoverFind your next modelModel libraryAll models, versions, prices and capabilitiesBenchmarksMeasured quality, cost and time by serving configurationShowcaseImages, video and 3D made on the marketplaceProvidersCompare independent inference providersActivityMarketplace traffic and usageNetwork statusAvailability, latency and endpoint healthChatConversations, model settings and filesImage, video & 3DGenerate images, video and 3D assetsScene studioStage a shot in 3D, direct it and render it as a videoCoding playgroundBuild software with an AI agent on a machine of your ownOverview & routingIdentity, workspaces and routing preferencesCredits & billingBalance, deposits, ledger and reserved fundsAPI keysKeys scoped to workspaces, limits and expirationOrganizationsTeams, members and shared workspacesRequest historyRequests, receipts, sandbox sessions and account historyReferralsInvitations and referral earningsPrivacyData settings, exports and deletionDocumentationQuickstart, SDKs, pricing and guidesAPI referenceInteractive endpoint reference