Articles on: Developer API

Humanization API v2

Authentication



Undetectable.AI uses API keys to allow access to the API. You can get your API key at our developer portal.

UD expects for the API key to be included in all API requests to the server in a header that looks like the following:

apikey: YOUR API KEY GOES HERE

You must replace YOUR API KEY GOES HERE with your personal API key.


Testing



Go here to test out your API calls https://humanize.undetectable.ai/docs

Click on an endpoint and then click "try it out".


Humanization



Submit Document



This endpoint allows you to submit text for humanization. We refer to all types of these text inputs as a "document".

POST https://humanize.undetectable.ai/submit

Query Parameters



ParameterRequiredDescription
contentYesThe text you want to humanize Minimum 50 characters. Maximum 15,000 characters.
readabilityYesOne of the following values: "High School", "University", "Doctorate", "Journalist", "Marketing"
purposeYesOne of the following values: "General Writing", "Essay", "Article", "Marketing Material", "Story", "Cover Letter", "Report", "Business Material", "Legal Material"
strengthNoOne of the following values: "Quality", "Balanced", "More Human". Increases aggressiveness of humanization algorithms. Default is "Balanced".
modelNoDefault: v2. The version of AI model used to handle humanization. Valid values are: "v2" and "v11"


Remember — the returned document object will not be instantly processed. You should query the document ID every 5-10 seconds to check if the status is flagged as done.

Example Request



curl --location 'https://humanize.undetectable.ai/submit' \
--header 'apikey: YOUR API KEY GOES HERE' \
--header 'Content-Type: application/json' \
--data '{
    "content": "YOUR TEXT GOES HERE. PLEASE MAKE SURE IT IS AT LEAST 50 CHARACTERS LONG.",
    "readability": "High School",
    "purpose": "General Writing",
    "strength": "More Human",
    "model": "v11"
}'


Example Response



{
    "status": "Document submitted successfully",
    "id": "68e4d7e3-5f04-416e-b0d1-9fcf059ea277"
}


Status 400 Payment Required when insufficient word credit balance:



{
       "error": "Insufficient credits"
}



Retrieve Document



This endpoint allows you to retrieve the document object for a submitted piece of content. It is recommended you save locally the ID of the document you submitted to prevent unnecessary calls of the list endpoint.

POST https://humanize.undetectable.ai/document

Query Parameters



ParameterRequiredDescription
idYesThe ID of the document object submitted for humanization.


Example Request



curl --location 'https://humanize.undetectable.ai/document' \
--header 'apikey: YOUR API KEY GOES HERE' \
--header 'Content-Type: application/json' \
--data '{
    "id": "DOCUMENT ID GOES HERE"
}'


Example Response



javascript{
        "id": "aaada2c6-6c3c-40ec-930b-8dd97a2dfa93",
    "output": "Ranked as the AI detector according to Forbes magazine! Utilize our AI detector to inspect whether your text will be identified as AI generated material by algorithms.. Afterwards select 'humanize' to erase any traces of AI detection and guarantee that your text sails through all AI detectors, without a hitch.. Our AI text humanizer achieves this by refining your content to align with the standards of human created writing. ",
    "input": "Rated #1 Best AI Detector by Forbes! Use our AI detector to check if your text will be flagged as AI-written content. Then, click 'humanize' to remove AI detection and ensure your text will bypass all major AI detectors. Our AI text humanizer does this by enhancing your content to match the quality of human writing.",
    "readability": "High School",
    "createdDate": "2024-08-28T08:11:32.166000",
    "purpose": "Essay"
}



Rehumanize Document



This endpoint allows you to rehumanize a document once.

POST https://humanize.undetectable.ai/rehumanize

Query Parameters



ParameterRequiredDescription
idYesThe ID of the document object submitted for humanization.


Example Request



curl --location 'https://humanize.undetectable.ai/rehumanize' \
--header 'apikey: YOUR API KEY GOES HERE' \
--header 'Content-Type: application/json' \
--data '{
    "id": "DOCUMENT ID GOES HERE"
}'


Example Response



javascript{
    "status": "Document submitted successfully",
    "id": "5e1e4d7d-df9d-4756-81ad-63fc5e1e7a7d"
}


You can now query the /document endpoint with the new id.


List Documents



This endpoint allows you to query all your documents.

POST https://humanize.undetectable.ai/list

Query Parameters



ParameterRequiredDescription
offsetOptionalBy default the request returns 10 newest documents sorted by createdDate


Example Request



curl --location 'https://humanize.undetectable.ai/list' \
--header 'apikey: YOUR API KEY GOES HERE' \
--header 'Content-Type: application/json' \
--data '{
    // "offset": 20 <- optional
}'


Example Response



javascript{
    "pagination": false,
    "documents": [
        {
            "id": "22e6ac97-c79d-4a09-989d-ea091ab6ecf2",
            "output": "One of the takeaways from the Scientific Method Tutorial is the importance placed on crafting a precise and testable hypothesis and grasping the difference between independent and dependent variables thoroughly. When setting up experiments accurately to explore relationships this clarity proves invaluable. On the side a significant hurdle in applying the scientific method lies in guarantee that all potential confounding variables are managed effectively. Even slight deviations, in conditions can influence outcomes significantly highlighting the need to carefully structure experiments to address these variables meticulously. Conducting research studies to verify dependability may require a significant investment of resources. ",
            "input": "Most Useful Part: The most useful part of the Scientific Method Tutorial is the emphasis on forming a clear and testable hypothesis and understanding the distinction between independent and dependent variables. This clarity helps in structuring experiments effectively to focus on specific relationships. Most Challenging Aspect: One of the more challenging aspects of the scientific method is ensuring that all potential confounding variables are controlled. Even minor variations in external factors can impact results, making it critical to design experiments that meticulously account for these variables. Additionally, replicating studies to ensure reliability can be resource-intensive.",
            "readability": "University",
            "createdDate": "2024-08-17T07:44:15.688000",
            "purpose": "General Writing"
        },
        {
            "id": "aaada2c6-6c3c-40ec-930b-8dd97a2dfa93",
            "output": "Ranked as the AI detector according to Forbes magazine! Utilize our AI detector to inspect whether your text will be identified as AI generated material by algorithms.. Afterwards select 'humanize' to erase any traces of AI detection and guarantee that your text sails through all AI detectors, without a hitch.. Our AI text humanizer achieves this by refining your content to align with the standards of human created writing. ",
            "input": "Rated #1 Best AI Detector by Forbes! Use our AI detector to check if your text will be flagged as AI-written content. Then, click 'humanize' to remove AI detection and ensure your text will bypass all major AI detectors. Our AI text humanizer does this by enhancing your content to match the quality of human writing.",
            "readability": "High School",
            "createdDate": "2024-08-28T08:11:32.166000",
            "purpose": "Essay"
        },
        {
            "id": "65b148fa-4396-49fe-9462-4f6a7ce520f8",
            "output": "Ranked as the number one AI detection tool according to Forbes! Utilize our AI detector to verify if your text is at risk of being identified as machine generated content by algorithms. Afterward simply select 'transform into human text' to eliminate any traces of AI detection and guarantee that your writing will go undetected, by all leading AI detectors. Our tool enhances your content to reflect the authenticity and quality of human authored writing. ",
            "input": "Rated #1 Best AI Detector by Forbes! Use our AI detector to check if your text will be flagged as AI-written content. Then, click 'humanize' to remove AI detection and ensure your text will bypass all major AI detectors. Our AI text humanizer does this by enhancing your content to match the quality of human writing.",
            "readability": "High School",
            "createdDate": "2024-08-28T08:11:29.928000",
            "purpose": "Essay"
        },
        {
            "id": "5e1e4d7d-df9d-4756-81ad-63fc5e1e7a7d",
            "output": "Ranked as the AI detection tool according to Forbes magazine! Utilize our AI detector to assess whether your text might be identified as AI generated material by algorithms in use today. Tap on 'humanize’ to eliminate any AI flags and ensure that your content sails, through AI detectors seamlessly. Our AI text enhancer will refine your content to emulate the quality of human authored writing. ",
            "input": "Rated #1 Best AI Detector by Forbes! Use our AI detector to check if your text will be flagged as AI-written content. Then, click 'humanize' to remove AI detection and ensure your text will bypass all major AI detectors. Our AI text humanizer does this by enhancing your content to match the quality of human writing.",
            "readability": "High School",
            "createdDate": "2024-08-23T08:00:16.157000",
            "purpose": "Essay"
        }
    ]
}


If pagination returns with True, it means the user has more than 10 documents, and you can get those by changing the offset parameter.
A simple loop logic could be
pulling all documents without an offset parameter,
if pagination is True, send requests like
i+10
until pagination is False 
to get all documents



Errors



Most errors will be from incorrect parameters being sent to the API. Double check the parameters of each API call to make sure it's properly formatted, and try running the provided example code.

The generic error codes we use conform to the REST standard:

Error CodeMeaning
400Bad Request -- Your request is invalid.
401Unauthorized -- Your API key is wrong.
402Payment Required -- You're out of words.
403Forbidden -- The API key doesn't have permission to access the requested resource.
404Not Found -- The specified resource doesn't exist.
405Method Not Allowed -- You tried to access a resource with an invalid method.
406Not Acceptable -- You requested a format that isn't JSON.
410Gone -- The resource at this end point has been removed.
429Too Many Requests -- You're sending too many requests! Slow it down!
500Internal Server Error -- We had a problem with our server. Try again later.
503Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

Updated on: 29/11/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!