Developer Docs
CheckAI API v2 Docs
This page documents the current direct commercial API only: `/api/v2/*`, `ak_` keys, and API units billing.
Important: do not integrate against the legacy /api/* docs
Legacy examples such as `/api/detect`, `/api/detect/video`, and `/api/instruct` belong to the old credit lane or old capability surface. Direct commercial integrations should use `/api/v2/*` with an `ak_` key in the request header.
Create an ak_ key
Create your commercial API key in Dashboard > API.
Set request headers
x-api-key + Content-Type: application/json
Call /api/v2/*
Use `/api/v2/detect` for detection and `/api/v2/instruct` for rewriting.
Endpoint Overview
Confirm the path, key type, and supported modes before you integrate.
/api/v2/detectSend `text` and get a detection result plus units consumed.
/api/v2/detectInspect current balance and detection billing metadata.
/api/v2/instructDefault mode. Rewrites and re-scores in one call.
/api/v2/instructUse `mode: "batch"` with `batch_index` and prior replacements to advance a long-text rewrite workflow.
Auth and Scope
Quick Start
curl -X POST https://checkai.space/api/v2/detect \
-H "x-api-key: ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello from API v2"
}'/api/v2/detectThe public v2 detect endpoint currently supports text only.
Parameters
textRequiredText content to analyze. Empty text returns 400.
Examples
POST detect request
curl -X POST https://checkai.space/api/v2/detect \
-H "x-api-key: ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"text": "This paragraph will be scored for AI-generated text patterns."
}'GET balance and billing info
curl -X GET https://checkai.space/api/v2/detect \
-H "x-api-key: ak_your_api_key"Response Fields
result-Detection result object with `score`, `label`, `confidence`, and `details`.units_used-API units consumed by this request.units_remaining-Remaining available units for the account.billing-Returned on GET only. Shows block size and detect billing rate.Response
POST response
{
"success": true,
"result": {
"score": 45.64,
"label": "ai",
"confidence": 1,
"details": {
"overall": {
"score": 45.64,
"ai_prob": 1,
"ai_label": "ai"
},
"per_token": [
{
"position": 0,
"token": "This",
"score": 4.28,
"offset": [0, 4]
}
],
"type": {
"probs": {
"polish_rewrite": 0.47,
"generate": 0.53
},
"label": "generate"
}
}
},
"units_used": 1,
"units_remaining": 299
}GET response
{
"success": true,
"units_remaining": 299,
"units_used": 1,
"billing": {
"unit_block_size_chars": 1000,
"detect_units_per_block": 1
}
}/api/v2/instructsingle by default, batch optionalOmit `mode` for single-step rewriting, or set `mode: "batch"` for long-text batched rewriting.
Rewrite Parameters
textRequiredThe text you want to rewrite.
styleOptionalOptional: `neutral`, `academic`, `formal`, `casual`, or `professional`.
modeOptionalOptional. Omit it for single-step rewrite, or set it to `batch` for batched workflow.
Style Options
neutralDefault style. Natural and restrained for most general writing.
academicMore suitable for papers, reports, and research writing.
formalMore formal and structured for official communication.
casualMore conversational and relaxed for blogs and social writing.
professionalMore concise and business-friendly for work emails and product copy.
Batch Parameters
modeRequiredMust be `batch`.
batch_indexOptionalCurrent batch index. Optional on the first request and defaults to `0`.
prior_sentence_replacementsOptionalSend back prior `suggestions.sentence_replacements` from earlier batches so the service can continue merging the full rewrite.
styleOptionalOptional fixed style. If omitted, the system can choose the best candidate style per batch.
Examples
Single rewrite request
curl -X POST https://checkai.space/api/v2/instruct \
-H "x-api-key: ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"text": "Artificial intelligence has fundamentally transformed the landscape of modern technology.",
"style": "professional"
}'Batch request
curl -X POST https://checkai.space/api/v2/instruct \
-H "x-api-key: ak_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"text": "Sentence one. Sentence two is too robotic. Sentence three also needs work.",
"mode": "batch",
"batch_index": 0,
"style": "academic",
"prior_sentence_replacements": []
}'Response Fields
result.rewritten_text-The full rewritten text returned by single-step mode.result.original_score / result.rewritten_score-In single-step mode, the AI score before and after rewriting.suggestions.full_rewrite / suggestions.sentence_replacements-In batch mode, these represent the merged full rewrite so far and the replacements returned by the current batch.progress / preview-In batch mode, `progress` shows current workflow progress and `preview` shows the estimated total batches and total units.units_used / units_remaining-Shows units consumed and remaining balance. Single-step rewrite bills by character blocks; batch bills 4 units per processed batch.Response
Single rewrite response
{
"success": true,
"result": {
"rewritten_text": "Modern technology has changed quickly as AI systems have become more capable.",
"original_score": 70.96,
"rewritten_score": 35.42,
"sentences_changed": 1,
"total_sentences": 1
},
"units_used": 4,
"units_remaining": 295
}Batch response
{
"success": true,
"suggestions": {
"overview": "Batch 1/3 completed.",
"quick_tips": [
"Processed 2 sentences in this batch",
"Updated 2 sentences in this batch",
"More sentence suggestions will appear as each batch finishes"
],
"sentence_replacements": [
{
"sentence_index": 1,
"original_sentence": "Sentence two is too robotic.",
"rewritten_sentence": "The second sentence sounds overly mechanical.",
"sentence_score_delta": 14.2,
"replaced_tokens": []
}
],
"full_rewrite": "Sentence one. The second sentence sounds overly mechanical. Sentence three also needs work."
},
"preview": {
"total_batches": 3,
"total_sentences": 3,
"total_high_score_tokens": 11,
"batch_unit_cost": 4,
"estimated_total_units": 12,
"original_sentences": [
"Sentence one.",
"Sentence two is too robotic.",
"Sentence three also needs work."
]
},
"progress": {
"batch_index": 0,
"completed_batches": 1,
"total_batches": 3,
"total_sentences": 3,
"batch_unit_cost": 4,
"estimated_total_units": 12,
"done": false
},
"units_used": 4,
"units_remaining": 291
}Billing Rules
1 unit per 1000 input characters, rounded up by block.
4 units per 1000 input characters, rounded up by block.
Each processed batch costs 4 units. The estimated total workflow cost is returned as `preview.estimated_total_units` in the batch response.