Skip to main content
StrikeStrike
Overview

Quickstart

Install strike-ai, set your API key, and make your first strike-1 decision.

strike-1 answers a question with fixed options and returns a probability for every option. Strike is in beta, so read Probabilities in beta before you route real work on those numbers.

Install

bash
pip install strike-ai

strike-ai (opens in a new tab) is the Python client. It needs Python 3.10 or later and depends only on httpx. It wraps one endpoint, POST /v1/systemone. You can call that endpoint from any HTTP client. The API reference has the full request and response schema.

Set your API key

Create a key on the API keys page of the console. You need to sign in first. Then export it:

bash
export STRIKE_API_KEY="your_key_here"

The client sends requests to https://strike-ai.eu unless you set STRIKE_API_URL.

First decision

Python
from strike_ai import Client

client = Client()  # reads STRIKE_API_KEY and STRIKE_API_URL
result = client.decide(
    "Customer reports a duplicate charge on invoice 4411.",
    {
        "refund": {
            "type": "noul",
            "instructions": "Should we refund this charge?",
        }
    },
)
answer = result["answers"]["refund"]
print(answer["noul"], answer["confidence"])

decide returns the JSON body as a dict. answers.refund.noul is the probability of "yes", from 0 to 1. confidence is the probability of the more likely answer.

The two other question types:

Python
from strike_ai import Client

client = Client()
result = client.decide(
    "I was charged twice for invoice 4411.",
    {
        "team": {"type": "choice", "instructions": "Which team handles this?",
                 "criteria": {"billing": None, "tech": None, "sales": None}},
        "urgency": {"type": "score", "instructions": "How urgent is this?",
                    "criteria": ["low", "medium", "high"]},
    },
)
print(result["answers"]["team"]["choice"], result["answers"]["team"]["probabilities"])
print(result["answers"]["urgency"]["score"], result["answers"]["urgency"]["probabilities"])

A choice answer has choice and probabilities keyed by your option names. Pass criteria as a dict so the keys are your option names. A score answer has score (the expected level) and probabilities keyed by level label. See Typed decisions.

Client.decide also takes model (default strike-1), options (for example {"retain": True}), and idempotency_key, sent as the Idempotency-Key header. GET /v1/models lists the ids you can send. strike-1 is the pinned release. Any other listed id is a release that is being served. See Authentication.

On any 4xx or 5xx the client raises httpx.HTTPStatusError. See Errors.

Agents

pip install strike-ai also installs the MCP server: python -m strike_ai.mcp (or strike-mcp). See strike-ai package and MCP decision tool.

Next steps

  • Billing: 100 free decisions per day, then EUR 0.018 per 1M input tokens.
  • Concepts: choice, score and yes/no.
  • MCP: python -m strike_ai.mcp for Claude and Cursor.
  • Decision tools: give an LLM agent a strike_decision tool.
Strike AI | Quickstart