AI Detection Scans and Reports

Notes
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
Scan for AI and Create Report

API endpoint:

POST
https://codespy.ai/api/v1/reports

Request example:

curl --location --request POST 'https://codespy.ai/api/v1/reports' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'content={content}'
Parameter
Type
Description
content
required string
The content to analyze.
lang
required string
The language to analyze: "py" for Python, "ph" for PHP, "ja" for Java, "cp" for C++, "cs" for C#.
privacy
optional integer
Report page privacy. Possible values are: 0 for Public, 1 for Private, 2 for Password. Defaults to: 1.
password
optional string
The password for the report page. Only works with privacy set to 2.


Response Field
Type
Description
score
number
The score from 0-100 of probability of AI
message
string
The user readable message
paragraphs
list[object]
The individual functions in the code (called paragraphs for compatibility). Each object contains fields { "html" : a marked up version of the code, "txt" : the code, "score" : the AI score of the function, "start" : the start line of the function, "end" : the end line of the function, "color" : the color to mark the function (green, yellow, red) }
List Reports

API endpoint:

GET
https://codespy.ai/api/v1/reports

Request example:

curl --location --request GET 'https://codespy.ai/api/v1/reports' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Description
project
optional string
The project name.
sort_by
optional string
Sort by. Possible values are: id for Date created, generated_at for Date generated. Defaults to: id.
sort
optional string
Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
optional int
Results per page. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Show Report

API endpoint:

GET
https://codespy.ai/api/v1/reports/{id}

Request example:

curl --location --request GET 'https://codespy.ai/api/v1/reports/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Delete

API endpoint:

DELETE
https://codespy.ai/api/v1/reports/{id}

Request example:

curl --location --request DELETE 'https://codespy.ai/api/v1/reports/{id}' \
--header 'Authorization: Bearer {api_key}'