Quickstart

Three steps of setup, then one request. Nothing here needs a sales call or a subscription.

View as Markdown

Set up

  1. Create an account and add credit on the credit page. Credit is spent per request.
  2. Create an API key under API keys. The secret is shown once and never again.
  3. Pick a model id from the live catalog, which shows prices and how many providers are online right now.

Make a request

POST /v1/decisionsDECISIONS · mayhem_decisions +

Working request

curl https://api.openmayhem.ai/v1/decisions \
  -H "Authorization: Bearer $OPENMAYHEM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "convaiinnovations/laya",
  "state": {
    "message": "The checkout failed and I need help now"
  },
  "questions": {
    "intent": {
      "type": "choice",
      "instructions": "What is the request about?",
      "criteria": {
        "support": "support request",
        "other": "another topic"
      }
    },
    "urgent": {
      "type": "noul",
      "instructions": "Is the request urgent?"
    }
  },
  "checkpoint": "english",
  "task": "typed_decisions",
  "lang": "value"
}'

Parameters

ParameterRequiredTypeDefaultAllowed valuesLimits and shape
modelRequiredstring
questionsRequiredobject{"intent":{"type":"choice","instructions":"What is the request about?","criteria":{"support":"support request","other":"another topic"}},"urgent":{"type":"noul","instructions":"Is the request urgent?"}}
stateRequiredstring | object | array{"message":"The checkout failed and I need help now"}
auto_task_detectionOptionalbooleanfalse
checkpointOptionalstringenglish, multilingual, typed-decisions
emailOptionalobjectJSON object; use the endpoint-specific schema shown in the examples
langOptionalstringmin length 1; max length 128
limitsOptionalobjectJSON object; use the endpoint-specific schema shown in the examples
shortlistOptionalobjectJSON object; use the endpoint-specific schema shown in the examples
taskOptionalstringtyped_decisions
temperatureOptionalobjectJSON object; use the endpoint-specific schema shown in the examples
userOptionalstringmin length 1; max length 512

Use this model through MCP

These calls use this model’s exact live request contract. First estimate the unchanged request, then pass the returned estimate ID and maximum cost to the paid tool. Read the complete MCP guide.

decideDECISIONS +

Send this object to estimate_request. Review the result, then send the next object to the named paid tool without changing request.

estimate_request · DECISIONS

{
  "endpoint": "DECISIONS",
  "model": "convaiinnovations/laya",
  "request": {
    "state": {
      "message": "The checkout failed and I need help now"
    },
    "questions": {
      "intent": {
        "type": "choice",
        "instructions": "What is the request about?",
        "criteria": {
          "support": "support request",
          "other": "another topic"
        }
      },
      "urgent": {
        "type": "noul",
        "instructions": "Is the request urgent?"
      }
    },
    "checkpoint": "english",
    "task": "typed_decisions",
    "lang": "value"
  }
}

decide

{
  "model": "convaiinnovations/laya",
  "request": {
    "state": {
      "message": "The checkout failed and I need help now"
    },
    "questions": {
      "intent": {
        "type": "choice",
        "instructions": "What is the request about?",
        "criteria": {
          "support": "support request",
          "other": "another topic"
        }
      },
      "urgent": {
        "type": "noul",
        "instructions": "Is the request urgent?"
      }
    },
    "checkpoint": "english",
    "task": "typed_decisions",
    "lang": "value"
  },
  "estimate_id": "<estimate_id from estimate_request>",
  "max_cost_usd": "<maximum_cost_usd from estimate_request>"
}

Agent drop-ins

This is a media endpoint, so it cannot replace the text model that drives a coding agent. Call the request above from the agent’s HTTP or tool layer.

Routing and trust: Catalog filters, provider constraints, attestation and retail cost limits.