For the complete documentation index, see llms.txt. This page is also available as Markdown.

Decisions

Create decisions

post

Accepts input and a questions array. Also accepts the System One format (state and a questions object). Responses use the submitted format. Use one format per request.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
or
Responses
200

Typed answers and token usage. Example costs are illustrative.

application/json
or
post/decisions
curl https://api.cortecs.ai/v1/decisions \
  -H "Authorization: Bearer $CORTECS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "clef",
  "input": "Cold storage is at 9 C; the maximum allowed temperature is 5 C.",
  "questions": [
    {
      "type": "predicate",
      "name": "inspect",
      "instructions": "Does the room need a temperature inspection?"
    }
  ]
}'
{
  "model": "clef",
  "answers": [
    {
      "type": "predicate",
      "name": "inspect",
      "probability": 0.97
    }
  ],
  "usage": {
    "input_tokens": 100,
    "output_tokens": 0,
    "cost": 20,
    "cost_details": {
      "prompt_cost": 20,
      "completion_cost": 0
    },
    "total_tokens": 100
  }
}

Answer System One questions

post

Accepts state and a named questions object and returns a named answers object. Use /decisions for input and a questions array. Use one format per request.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
modelstringRequired

Choose an available model tagged Decision.

stateone ofRequired

Application state as text, an object, or an array.

stringOptional
or
or
preferencestring · enumOptional

The provider preference for handling the request.

Possible values:
allowed_providersstring[] · nullableOptional

Provider IDs allowed to process the request, subject to project settings.

eu_nativeboolean · nullableOptional

Whether to use only providers based and regulated within the EU.

provider_orderstring · enum · nullableOptional

Set to custom to try allowed_providers in the listed order instead of using preference-based routing.

Example: customPossible values:
allow_zero_data_retentionboolean · nullableOptional

Whether to use only zero-data-retention providers.

enable_model_fallbackboolean · nullableOptional

Allow automatic model fallback. Project settings may override this value.

fallbacksstring[] · nullableOptional

Explicit fallback model IDs, tried in order. A nonempty list takes precedence over automatic fallback settings.

Responses
200

Typed answers and token usage.

application/json
modelstring · nullableOptional
post/systemone
curl https://api.cortecs.ai/v1/systemone \
  -H "Authorization: Bearer $CORTECS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "clef",
  "state": "Cold storage is at 9 C; the maximum allowed temperature is 5 C.",
  "questions": {
    "inspect": {
      "type": "noul",
      "instructions": "Does the room need a temperature inspection?"
    }
  }
}'
{
  "model": "clef",
  "answers": {
    "inspect": {
      "type": "noul",
      "noul": 0.97
    }
  },
  "usage": {
    "input_tokens": 100,
    "output_tokens": 0,
    "cost": 20,
    "cost_details": {
      "prompt_cost": 20,
      "completion_cost": 0
    }
  }
}

Last updated