Skill Gap Identification API
Upload a professional document, give a target role, or both. The API extracts the person's technical and soft skills, compares them against the competencies the role demands, and returns the exact skills they're missing - so you can pinpoint what to develop. Results come back in the language you choose.
When to use this API
Use this API when you need to know what skills a person is missing for a specific role - for a promotion, an internal move, or a hiring decision.
Send a document, a target role, or both. With a document and a role, the person's skills are matched against the role and the missing ones are returned as gaps. With just a role (no document), the role's expected skills come back as gaps. The response also includes the matched skills, any additional skills detected, and the person's soft skills - each carrying a 1-4 proficiency level.
Results are returned in English by default. Pass an optional
language field (e.g. French, Spanish,
German, Hindi) to receive them in that language.
Authentication
All requests require a user-scoped API key passed as a bearer token.
Generate one in the platform under Settings → API Keys.
Keys are prefixed ok_ and expire after 90 days.
Authorization: Bearer ok_xxxxxxxxxxxxxxxxxxxxxxxx
401 unauthorized.
Parameters
Form fields
| Name | Type | Required | Description |
|---|---|---|---|
| file | file | conditional |
A single resume or document. Accepted formats:
.pdf, .doc, .docx. Up to 10 MB.
Either file or role (or both) must be provided.
|
| role | string | conditional |
Target role to compare the skills against, e.g.
Software Engineer. Sent with just a role (no file), the role's
expected skills are returned as gaps. Either file or
role (or both) must be provided.
|
| language | string | optional |
Output language for the results. Defaults to English.
Examples: French, Spanish, German,
Italian, Portuguese, Hindi, Arabic.
|
file or role is required.
Sending neither returns 400.
Request
# Document + role
curl -X POST https://platform.openknowra.ai/api/bff/v1/skill-gap/analyze \
-H "Authorization: Bearer $OPENKNOWRA_API_KEY" \
-F "file=@/path/to/resume.pdf" \
-F "role=Software Engineer" \
-F "language=English"
# Role only (no document)
curl -X POST https://platform.openknowra.ai/api/bff/v1/skill-gap/analyze \
-H "Authorization: Bearer $OPENKNOWRA_API_KEY" \
-F "role=Software Engineer" \
-F "language=English"import os
import requests
API_KEY = os.environ["OPENKNOWRA_API_KEY"]
API_URL = "https://platform.openknowra.ai/api/bff/v1/skill-gap/analyze"
with open("./resume.pdf", "rb") as f:
res = requests.post(
API_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": f},
data={"role": "Software Engineer", "language": "English"},
)
res.raise_for_status()
data = res.json()
print("Missing skills:", [g["skill"] for g in data["gapSkills"]])import fs from "fs";
const API_KEY = process.env.OPENKNOWRA_API_KEY!;
const API_URL = "https://platform.openknowra.ai/api/bff/v1/skill-gap/analyze";
const form = new FormData();
form.append("file", new Blob([fs.readFileSync("./resume.pdf")]), "resume.pdf");
form.append("role", "Software Engineer");
form.append("language", "English");
const res = await fetch(API_URL, { method: "POST", headers: { Authorization: `Bearer ${API_KEY}` }, body: form });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data.matchedSkills, data.gapSkills);Response
200 OK - Every skill list is an array of
{ skill, level } objects, where level is a 1-4 proficiency
(see the table below). Any list with nothing to report comes back as an empty array.
role is echoed only when one was provided.
{
"success": true,
"role": "Software Engineer",
"matchedSkills": [
{ "skill": "java", "level": 4 },
{ "skill": "sql", "level": 2 }
],
"additionalSkills": [
{ "skill": "redis", "level": 3 }
],
"gapSkills": [
{ "skill": "Docker", "level": 3 },
{ "skill": "Kubernetes", "level": 3 },
{ "skill": "CI/CD", "level": 2 }
],
"softSkills": [
{ "skill": "leadership", "level": 4 }
],
"gappedSoftSkills": [
{ "skill": "communication", "level": 4 },
{ "skill": "stakeholder management", "level": 3 }
],
"creditsUsed": 35,
"newBalance": 965
}
Response fields
| Field | Type | Description |
|---|---|---|
| matchedSkills | array | Technical skills the person has, with proficiency level. |
| additionalSkills | array | Extra skills detected beyond the core matched set. |
| gapSkills | array | Skills the role expects that the person is missing. |
| softSkills | array | Soft skills the person demonstrates. |
| gappedSoftSkills | array | Soft skills the role expects that are missing. |
| creditsUsed | number | Credits charged for this call. |
| newBalance | number | Credit balance after the charge. |
Proficiency levels
| Level | Label |
|---|---|
| 4 | Expert |
| 3 | Advanced |
| 2 | Proficient |
| 1 | Beginner |
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_input | Neither a document nor a target role was provided. |
| 401 | unauthorized | Missing, invalid, expired, or revoked API key. |
| 402 | insufficient_credits | Account balance too low. Response includes required and balance. |
| 413 | file_too_large | The file exceeds the 10 MB per-file size limit. |
| 502 | upstream_error | The analysis engine returned an error. Safe to retry after a short delay. |
| 503 | service_unavailable | The analysis service is briefly unavailable or not configured. Safe to retry. |
{
"error": {
"code": "insufficient_credits",
"required": 25,
"balance": 10
}
}