Crowdsec Service Api logo

Crowdsec Service Api

Organization
crowdsecurity
crowdsec-service-api

Use when the user wants to drive the CrowdSec Console **Service API (SAPI)** — the premium cloud REST API at admin.api.crowdsec.net — to programmatically manage blocklists (add/remove/bulk IPs, share, subscribe engines), allowlists, firewall/appliance integrations (Palo Alto, Fortinet, Cisco, F5, Sophos, pfSense/OPNsense…), remediation ROI metrics, and org-level decisions. Acts on the user's behalf with their API key. This is the cloud/API skill — for the local engine, cscli, and bouncers use the `crowdsec` skill.

Overview

Publishercrowdsecurity
Repositorycrowdsec-skill
Skill namecrowdsec-service-api
Stars
29
Forks
2
Bundled files
6
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by crowdsecurity on GitHub. Read the source before you install it.

Installation

Install the Crowdsec Service Api AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/crowdsecurity/crowdsec-skill/tree/main/skills/crowdsec-service-api
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/crowdsecurity/crowdsec-skill.git /tmp/crowdsec-skill
mkdir -p .claude/skills
cp -r /tmp/crowdsec-skill/skills/crowdsec-service-api .claude/skills/crowdsec-service-api
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Crowdsec Service Api in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Crowdsec Service Api on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Crowdsec Service Api is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CrowdSec Service API (SAPI) — cloud blocklist / allowlist / integration automation

SAPI is the premium REST API behind the CrowdSec Console. It manages cloud-side objects (private blocklists, allowlists, decisions, firewall integrations) that then push down to enrolled engines and bouncers. It is not the local engine API — there is no cscli here, only HTTPS.

Boundary — this skill vs the crowdsec skill

You want to…Use
Create/manage a private blocklist in the cloud, push IPs to it via APIthis skill
Wire a firewall/appliance (Palo Alto, Fortinet…) to a cloud integrationthis skill
Manage cloud allowlists, subscribe engines/tags/orgs to liststhis skill
Create/manage org-level decisions (targeted or ad-hoc bans, non-IP scopes, per tag/entity)this skill
Pull remediation ROI metricsthis skill
Install / run / debug the local engine, cscli, bouncers, WAFthe crowdsec skill
Enroll an engine into the Console (cscli console enroll)the crowdsec skill → references/install/console.md
Configure a local allowlist/whitelist on one enginethe crowdsec skill → references/configure/allowlists.md

Cloud allowlists/blocklists here only take effect on an engine once that engine is enrolled and subscribed to the list. The enrollment half lives in the crowdsec skill.

Operating contract

Every call here hits production and can change what subscribed engines enforce.

1 — Resolve the key. Never echo it, never write it anywhere but the file below:

bash
KEY="${CROWDSEC_SAPI_KEY:-$(cat ~/.config/crowdsec/sapi_key 2>/dev/null)}"
[ -n "$KEY" ] || echo "No key: export CROWDSEC_SAPI_KEY or store it in ~/.config/crowdsec/sapi_key (chmod 0600)"

2 — Validate before acting — one read call confirms the key and shows which tenant is about to change:

bash
curl -s -H "x-api-key: $KEY" https://admin.api.crowdsec.net/v1/info
# → {"organization_id":"…","subscription_type":"…","api_key_name":"…"}

3 — Classify read vs mutate. GET / download / POST …/search are safe — run them directly. Every POST / PATCH / DELETE that changes state requires explicit confirmation first: present the exact URL and JSON body, then wait for a yes.

4 — Extra-danger operations — spell out the consequence in plain words before the confirm, because subscribed engines enforce these lists, so a change can block or unblock real traffic and is hard to undo:

OperationWhy it's dangerous
POST …/ips/bulk_overwriteReplaces the entire blocklist content.
DELETE /blocklists/{id} · /allowlists/{id} · /integrations/{id}Removes the object and everyone's subscription/feed to it.
POST …/ips/deleteUn-blocks IPs fleet-wide.
POST /decisions with target.type: orgBans fleet-wide across every enrolled engine in the org.
…/shares / unshareGrants/revokes another organization access.
any …/subscribers changeChanges which engines/bouncers enforce the list.

5 — Clean up any object created only to test a recipe. A key that was exposed anywhere in transit must be rotated.

Step — Detect the intent

Cue from userGo to
"test my key", "what org / plan am I on"references/authentication.md
"create a blocklist", "push IPs from my SIEM/SOAR", "expire IPs", "share a blocklist with another org", "subscribe my engine to a list"references/blocklists.md
"cloud allowlist via API", "allow my office/CDN across the fleet"references/allowlists.md
"connect Palo Alto / Fortinet / Cisco / F5 / Sophos / pfSense / OPNsense", "firewall integration", "pull IP list in vendor format", "paginate the feed"references/integrations.md
"remediation metrics", "how much did CrowdSec save / block", "ROI dashboard"references/metrics.md
"org-level decisions via API", "aggregated decisions"references/decisions.md

Step — curl cheat sheet

All assume KEY is set (see operating contract). jq optional for readability.

PurposeCommand
Who am I / validate keycurl -s -H "x-api-key: $KEY" $B/info
List blocklistscurl -s -H "x-api-key: $KEY" "$B/blocklists"
List allowlistscurl -s -H "x-api-key: $KEY" "$B/allowlists"
List integrationscurl -s -H "x-api-key: $KEY" "$B/integrations"
List / find decisionscurl -s -H "x-api-key: $KEY" "$B/decisions" · …?ips=1.2.3.4
Remediation metricscurl -s -H "x-api-key: $KEY" "$B/metrics/remediation?start_date=$FROM&end_date=$TO"
Add IPs to a blocklist (mutating — confirm)curl -s -H "x-api-key: $KEY" -H 'Content-Type: application/json' -X POST "$B/blocklists/$ID/ips" -d '{"ips":["1.2.3.4"]}'
Create a decision (mutating — confirm)curl -s -H "x-api-key: $KEY" -H 'Content-Type: application/json' -X POST "$B/decisions" -d '{"duration":"4h","origin":"cscli","scenario":"manual","scope":"Ip","type":"ban","value":"1.2.3.4","target":{"type":"org","value":"<org>"}}'

where B=https://admin.api.crowdsec.net/v1.

Hard don'ts

  • Don't send a mutating call before the URL + body have been shown and approved (see operating contract §3–4).
  • Don't use …/ips/bulk_overwrite when the user means "add a few IPs" — that's …/ips. bulk_overwrite wipes the list first.
  • Don't print, log, or persist the API key anywhere but ~/.config/crowdsec/sapi_key. Resolve it from there or from the env var only.
  • Don't assume a cloud allowlist/blocklist is enforced just because the API call succeeded — the engine must be enrolled and subscribed, and it pulls on a poll cycle (verify locally via the crowdsec skill).

Docs

Canonical: https://docs.crowdsec.net/u/console/service_api/getting_started. Each references/ file cites the specific upstream page and the live OpenAPI operation it derives from.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Crowdsec Service Api AI skill do?

Use when the user wants to drive the CrowdSec Console **Service API (SAPI)** — the premium cloud REST API at admin.api.crowdsec.net — to programmatically manage blocklists (add/remove/bulk IPs, share, subscribe engines), allowlists, firewall/appliance integrations (Palo Alto, Fortinet, Cisco, F5, Sophos, pfSense/OPNsense…), remediation ROI metrics, and org-level decisions. Acts on the user's behalf with their API key. This is the cloud/API skill — for the local engine, cscli, and bouncers use the `crowdsec` skill.

Why use Crowdsec Service Api on TypingMind?

Because you install it once and use it with any model. Crowdsec Service Api is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Crowdsec Service Api in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/crowdsecurity/crowdsec-skill/tree/main/skills/crowdsec-service-api. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Crowdsec Service Api?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Crowdsec Service Api?

As many as you like. As long as a model supports skills, you can use Crowdsec Service Api with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Crowdsec Service Api AI skill free?

Yes. It is published on GitHub by crowdsecurity under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇