API reference · CAIN Skills
Create Skill
POST /fabric/skills
Last reviewed 2026-10-02
POST /fabric/skills
Create a new skill.
Request body
CreateSkillRequest (required)
| Field | Type | Meaning |
|---|---|---|
namespace required | string | min length 2 · max length 64 |
name required | string | min length 1 · max length 255 |
skill_type required | string | procedural, tool_skill, workflow_skill, reasoning_skill, domain_skill, learned_skill, composite_skill, human_authored |
description | string | default "" |
content required | string | min length 1 |
inputs | object or null | default {} |
outputs | object or null | default {} |
required_tools | array of string or null | default [] |
required_actions | array of string or null | default [] |
required_resources | array of string or null | default [] |
required_identities | array of string or null | default [] |
risk_level | string | default "medium" |
test_code | string or null | |
dependencies | array of string or null | default [] |
provenance | object or null | |
trace_id | string or null | |
trajectory_id | string or null |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | Successful Response | JSON |
422 | Validation Error | HTTPValidationError |
401 | No key, or a key that is not valid | JSON detail |
429 | Rate limit for your plan reached; retry after the Retry-After seconds | JSON detail |
Try it
This call changes data in the account the key belongs to.
The request goes from your browser straight to this site. Your key is not stored unless you tick the box, and then only in this tab's session storage.
Code
curl -sS -X POST 'https://cainstudio.online/fabric/skills' \
-H "X-API-Key: $CAIN_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"namespace": "namespace", "name": "name", "skill_type": "skill-type", "description": "", "content": "content", "inputs": {}, "outputs": {}, "required_tools": [], "required_actions": [], "required_resources": [], "required_identities": [], "risk_level": "medium", "dependencies": []}'import json, os, urllib.request
req = urllib.request.Request('https://cainstudio.online/fabric/skills', method='POST',
headers={"X-API-Key": os.environ["CAIN_API_KEY"], "Content-Type": "application/json"},
data=json.dumps({
"namespace": "namespace",
"name": "name",
"skill_type": "skill-type",
"description": "",
"content": "content",
"inputs": {},
"outputs": {},
"required_tools": [],
"required_actions": [],
"required_resources": [],
"required_identities": [],
"risk_level": "medium",
"dependencies": []
}).encode())
with urllib.request.urlopen(req, timeout=60) as r:
print(r.status, json.load(r))const res = await fetch("https://cainstudio.online/fabric/skills", {
method: "POST",
headers: {
"X-API-Key": process.env.CAIN_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"namespace": "namespace",
"name": "name",
"skill_type": "skill-type",
"description": "",
"content": "content",
"inputs": {},
"outputs": {},
"required_tools": [],
"required_actions": [],
"required_resources": [],
"required_identities": [],
"risk_level": "medium",
"dependencies": []
}),
});
console.log(res.status, await res.json());Schemas used
CreateSkillRequest · HTTPValidationError · ValidationError
← List Skills · all 20 CAIN Skills calls · Skills Health →
Try CAIN-42 on your own agents
Create a free account and every new account starts with a 7-day trial of the full platform. Or try the sandbox first, with no account at all.
Create a free account → · Try the sandbox · See the whole ecosystem