Report Card Comments API
Generate Vietnamese report-card comments for a whole class from scores or levels (Circulars 27/2020 and 22/2021), varied, rule-based, no AI.
Send a class as students (array) or csv (header name / họ tên, then one column per subject; optional strengths, improve columns). Primary (level=primary, Circular 27/2020 as amended by 10/2025) takes T / H / C (Hoàn thành tốt / Hoàn thành / Chưa hoàn thành) or periodic test scores, plus the five qualities (yeu_nuoc, nhan_ai, cham_chi, trung_thuc, trach_nhiem) and general competencies (tu_chu, giao_tiep, giai_quyet) rated T / Đ / C. Secondary (level=secondary, Circular 22/2021) takes scores 0–10 or Tốt / Khá / Đạt / Chưa đạt and Đạt / Chưa đạt subjects, and also returns the learning result per Article 9 (Tốt / Khá / Đạt / Chưa đạt) when at least 6 scored subjects are given.
Each subject comment combines an opening matched to the level, a subject-specific skill (about 20 subjects: Toán, Tiếng Việt, Ngữ văn, Tiếng Anh, Khoa học, KHTN, Lịch sử và Địa lí, Tin học, Công nghệ, Âm nhạc, Mĩ thuật, GDTC, HĐTN…), an optional strength (careful, creative, participation, focus, homework, handwriting, teamwork, reading, presentation, punctual, progress, helpful) and advice. Sentences come from a phrase bank written for APIBox and are rotated so that pupils in one class do not get the same text; seed makes the result reproducible; max_length trims to the cell size of the digital school record; address adds "Em" / "Con" / the first name.
format=csv returns a spreadsheet ready to paste (UTF-8 with BOM). No AI model is used and nothing is stored; teachers should read and adjust each comment.
Markdown · OpenAPI · Postman · llms.txt
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
level | body | string | no | primary | primary (TT 27/2020) or secondary (TT 22/2021). |
students | body | array | no | Pupils: {name, subjects: {"Toán": 8.5}, strengths, improve, qualities, competencies} or {name, score|level} with subject. | |
csv | body | string | no | CSV / TSV with a name column and one column per subject. | |
subject | body | string | no | Subject when each pupil has only score / level. | |
address | body | string | no | none | none, em, con or name. |
max_length | body | number | no | 300 | Maximum characters per comment (60–1000). |
seed | body | string | no | Seed for reproducible variation. | |
format | body | string | no | csv for a spreadsheet. |
Example
curl -X POST "https://apibox.io.vn/v1/vn-report-comments" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"level":"primary","subject":"Toán","students":[{"name":"Nguyễn An","level":"T","strengths":"careful"},{"name":"Lê Bình","level":"H","improve":"focus"},{"name":"Trần Chi","score":4.5,"qualities":{"cham_chi":"Đ","trach_nhiem":"T"}}],"seed":"lop-3a"}'const res = await fetch('https://apibox.io.vn/v1/vn-report-comments', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"level": "primary",
"subject": "Toán",
"students": [
{
"name": "Nguyễn An",
"level": "T",
"strengths": "careful"
},
{
"name": "Lê Bình",
"level": "H",
"improve": "focus"
},
{
"name": "Trần Chi",
"score": 4.5,
"qualities": {
"cham_chi": "Đ",
"trach_nhiem": "T"
}
}
],
"seed": "lop-3a"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/vn-report-comments",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"level": "primary", "subject": "Toán", "students": [{"name": "Nguyễn An", "level": "T", "strengths": "careful"}, {"name": "Lê Bình", "level": "H", "improve": "focus"}, {"name": "Trần Chi", "score": 4.5, "qualities": {"cham_chi": "Đ", "trach_nhiem": "T"}}], "seed": "lop-3a"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-report-comments');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"level":"primary","subject":"Toán","students":[{"name":"Nguyễn An","level":"T","strengths":"careful"},{"name":"Lê Bình","level":"H","improve":"focus"},{"name":"Trần Chi","score":4.5,"qualities":{"cham_chi":"Đ","trach_nhiem":"T"}}],"seed":"lop-3a"}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"level": "primary",
"scale": "TT 27/2020/TT-BGDĐT: T / H / C (subjects), T / Đ / C (qualities, competencies)",
"count": 3,
"max_length": 300,
"students": [
{
"name": "Nguyễn An",
"subjects": [
{
"subject": "Toán",
"level": "T",
"comment": "Có tiến bộ rõ, kết quả học tập tốt, biết vận dụng công thức linh hoạt, làm bài cẩn thận. Cố gắng phát huy để đạt kết quả cao hơn."
}
],
"general": "Chăm ngoan, học tập tiến bộ."
},
{
"name": "Lê Bình",
"subjects": [
{
"subject": "Toán",
"level": "H",
"comment": "Tiếp thu bài tương đối tốt, tính toán nhanh, chính xác. Cần rèn thêm cách trình bày bài giải. Cần tập trung hơn trong giờ học."
}
],
"general": "Có ý thức học tập, cần đều tay hơn giữa các môn."
},
{
"name": "Trần Chi",
"subjects": [
{
"subject": "Toán",
"score": 4.5,
"level": "C",
"comment": "Kết quả học tập chưa đạt yêu cầu. Cần rèn thêm việc ghi nhớ công thức, quy tắc tính. Cần được giáo viên và gia đình kèm cặp thêm."
}
],
"qualities_competencies": "Chăm học, chuẩn bị bài đầy đủ; có trách nhiệm với bản thân và tập thể, giữ gìn đồ dùng cẩn thận.",
"general": "Cần sự quan tâm, kèm cặp của gia đình và thầy cô."
}
],
"legal": [
{
"ref": "Thông tư 27/2020/TT-BGDĐT đánh giá học sinh tiểu học (sửa đổi bởi Thông tư 10/2025/TT-BGDĐT)",
"effective_from": "2020-10-20"
}
],
"note": "Sentences come from an APIBox phrase bank and are varied inside the class; the teacher reviews and edits before recording them.",
"reviewed": "2026-11-11"
}
Use cases
- Draft end-of-term comments for a whole class in one call from Google Sheets
- Add a comment generator to school-record or grade-book software
- Write contact-book messages for parents from test results
- Compute the TT 22 learning result together with the comments
FAQ
Is an AI model used?
No. Comments are assembled from a fixed Vietnamese phrase bank with rules and seeded variation, so the output is predictable and contains no invented facts.
Will two pupils get the same comment?
The generator uses each sentence the fewest times possible inside the request, so classes of normal size get varied texts.
Which subjects have specific phrases?
About 20 subjects of the 2018 curriculum; other subjects get the general opening and advice.
Related APIs
Text Diff
Compare two texts by lines, words, characters, sentences or JSON and get the changes, a similarity score and a unified diff patch.
a-bSlugify
Turn titles into clean URL slugs: accents removed (Vietnamese đ included), custom separator, optional case keeping and maximum length.
123Text Statistics
Count words, characters, sentences, paragraphs and lines, estimate reading and speaking time, and list the most frequent words of a text.