Detect License
code.detect_license
Overview
When you supply license text or declared metadata, we match it against a pinned SPDX phrase dataset and return identifiers with confidence, method, and evidence counts. This is best-effort identification — not legal advice, and no match does not prove absence of obligations. We do not fetch remote license lists or run probabilistic models — do not use this as a substitute for legal review or full composition scanning.
License calls should be evidence-based and repeatable. We fingerprint text against a pinned dataset so your policy gates see the same answer every time.
Reliability
Best-effort and deterministic for a pinned datasetVersion. Domain error (not retryable; shrink input): LICENSE_DOCUMENT_LIMIT_EXCEEDED (too many documents or combined text too large). Low confidence and not-detected cases return in-band warnings — absence of a match is not proof of no obligations.
Context footprint
Returns detected matches, warnings, and the datasetVersion applied. A successful call costs 1 execution credit.
When to use it
When you have license text or declared metadata and need a likely SPDX id.
As legal sign-off or as a full composition-analysis substitute.
Scope
Non-goals
- Does not give legal advice
- Does not declare licenses compatible or safe
- Does not fetch remote license lists
- Does not use probabilistic AI scoring
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- Output may reveal sensitive derived information
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| documents | array | Yes | From 1 through 100 closed license documents, each with a path label and the license text; 101 is LICENSE_DOCUMENT_LIMIT_EXCEEDED. |
| packageMetadata | object | No | Closed package metadata containing only an optional declaredLicense property; omit it for text-only detection. |
| options | object | No | Closed confidence and evidence options; omit it to apply every documented default. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| declaredLicense | object | No | Closed declared-license validation receipt with the exact SPDX raw string and whether it parsed. |
| detected | array | Yes | From 0 through 10,000 unique SPDX matches ordered by confidence. |
| warnings | array | Yes | From 0 through 102 bounded warning objects with a stable code and a safe message. |
| datasetVersion | string | Yes | Pinned license phrase-dataset version. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"code.detect_license","input":{"documents":[{"path":"LICENSE","content":"..."}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("code.detect_license", {"documents":[{"content":"MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction.\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, express or implied.","path":"LICENSE"}]});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| LICENSE_DOCUMENT_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not give legal advice
- Does not declare licenses compatible or safe
- Does not fetch remote license lists
- Does not use probabilistic AI scoring
- Legal compliance conclusions
- Full-repo software composition analysis
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "code.detect_license",
"input": {
"documents": [
{
"content": "MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction.\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, express or implied.",
"path": "LICENSE"
}
]
}
}Examples
MIT license text matches with full confidence
{
"documents": [
{
"content": "MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction.\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, express or implied.",
"path": "LICENSE"
}
]
}{
"warnings": [],
"detected": [
{
"method": "normalized_fingerprint",
"spdxId": "MIT",
"path": "LICENSE",
"matchedPhraseCount": 3,
"name": "MIT License",
"missingPhraseCount": 0,
"confidence": 1
}
],
"datasetVersion": "spdx-phrase-2026-07"
}Unrecognized prose yields a not-detected warning
{
"documents": [
{
"content": "This is just some random text.",
"path": "README"
}
]
}{
"warnings": [
{
"code": "LICENSE_NOT_DETECTED",
"message": "No license matched with sufficient confidence; absence is not proof of no obligations",
"severity": "warning"
}
],
"detected": [],
"datasetVersion": "spdx-phrase-2026-07"
}Recommended use cases
- Tag a LICENSE file with an SPDX id before policy checks
- Flag metadata conflicts between declared and detected licenses
- Pre-screen text before human legal review
Avoid for
- Legal compliance conclusions
- Full-repo software composition analysis
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.