API Documentation
Endpoint
URL: https://api.badstudent.ai/v1/humanize
Method: POST
Note: This endpoint is rate-limited to 30 calls per 60 seconds.
Headers
Header | Type | Description | Example |
---|---|---|---|
Authorization | String | API key for authentication. Passed in the Bearer <API_KEY> format. | Bearer your-api-key-here |
x-api-key | String | Alternative header for passing the API key. | your-api-key-here |
Request Body
The request body should be in JSON format and include the following fields:
Field | Type | Description | Required |
---|---|---|---|
content | String | The input content to be processed (must be between 50 and 2000 characters). | Yes |
userId | String | Optional identifier for the user. | No |
Response
Success Response
For every successful request that returns a successfully humanized output, credits will be deducted based on the number of tokens used in the input and output content combined. The credit system follows a 1:1 ratio, meaning 1 credit is deducted for each token processed by the model. 1 token is approximately equivalent to 0.75 English words. This differs from the standard credit plan on our website.
The response will be in JSON format and includes the following fields:
{
"message": "Request processed successfully",
"answer": "Processed content...",
"taskId": "unique-task-id",
"creditUsed": 100
}
Error Responses
Note: Sample responses. There may be error responses different from the ones displayed below.
{
"error": "Unauthorized"
},
{
"error": "Bad Request"
},
{
"error": "Insufficient credits"
},
{
"error": "Internal Server Error"
}
Example Request
curl -X POST https://api.badstudent.ai/v1/humanize \
-H "Authorization: Bearer your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"content": "Input content here",
"userId": "optional-user-id"
}'
Endpoint
URL: https://api.badstudent.ai/v1/re-humanize
Method: POST
Note: This endpoint is rate-limited to 30 calls per 60 seconds.
Headers
Header | Type | Description | Example |
---|---|---|---|
Authorization | String | API key for authentication. Passed in the Bearer <API_KEY> format. | Bearer your-api-key-here |
x-api-key | String | Alternative header for passing the API key. | your-api-key-here |
Request Body
The request body should be in JSON format and include the following fields:
Field | Type | Description | Required |
---|---|---|---|
taskId | String | The task ID of the original request. | Yes |
Response
Success Response
For every successful request that returns a successfully humanized output, credits will be deducted based on the number of tokens used in the input and output content combined. The credit system follows a 1:1 ratio, meaning 1 credit is deducted for each token processed by the model. 1 token is approximately equivalent to 0.75 English words. This differs from the standard credit plan on our website.
The response will be in JSON format and includes the following fields:
{
"message": "Re-humanize successful",
"newAnswer": "Processed content...",
"taskId": "unique-task-id",
"creditUsed": 100
}
Error Responses
Note: Sample responses. There may be error responses different from the ones displayed below.
{
"error": "Unauthorized"
},
{
"error": "Bad Request"
},
{
"error": "Insufficient credits"
},
{
"error": "Internal Server Error"
}
Example Request
curl -X POST https://api.badstudent.ai/v1/re-humanize \
-H "Authorization: Bearer your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"taskId": "unique-task-id"
}'
Endpoint
URL: https://api.badstudent.ai/v1/task?taskId=unique-task-id
Method: GET
Note: This endpoint is rate-limited to 30 calls per 60 seconds.
Headers
Header | Type | Description | Example |
---|---|---|---|
Authorization | String | API key for authentication. Passed in the Bearer <API_KEY> format. | Bearer your-api-key-here |
x-api-key | String | Alternative header for passing the API key. | your-api-key-here |
Query Parameters
The following query parameter is required for the request:
Parameter | Type | Description | Required |
---|---|---|---|
taskId | String | The ID of the task to retrieve. | Yes |
Response
Success Response
The response will be in JSON format and includes the following fields:
{
"message": "Task retrieved successfully",
"task": {
"id": "unique-task-id",
"user_id": null,
"input": "Input text here",
"outputs": {
"output_1": "1st generated output here",
"output_2": "2nd generated output here",
"output_3": "3rd generated output here"
},
"output_generated": 3,
"credits_used": 123,
"created_at": "2024-01-01T00:00:00.000Z",
"latest_update_time": "2024-01-01T00:00:00.000Z"
}
}
Error Responses
Note: Sample responses. There may be error responses different from the ones displayed below.
{
"error": "Unauthorized"
},
{
"error": "Bad Request"
},
{
"error": "Task not found"
},
{
"error": "Internal Server Error"
}
Example Request
curl -X GET "https://api.badstudent.ai/v1/task?taskId=unique-task-id" \
-H "Authorization: Bearer your-api-key-here"