The Simple ChatGPT API provides a straightforward interface for integrating conversational AI capabilities into various applications. This API utilizes OpenAI’s ChatGPT model to generate human-like text responses based on the input provided. It’s perfect for creating chatbots, automating customer support, and enhancing user interaction.
The base URL for all API requests is:
https://simple-chatgpt-api.p.rapidapi.com
To authenticate with the Simple ChatGPT API, you will need to include your RapidAPI key in the header of each request. You can find your key in your RapidAPI Developer Dashboard.
headers: {
'content-type': 'application/json',
'X-RapidAPI-Key': 'Your_RapidAPI_Key',
'X-RapidAPI-Host': 'simple-chatgpt-api.p.rapidapi.com'
}
Generates a response based on the input text provided.
/ask
/ask/gpt4
POST
Content-Type
: application/json
X-RapidAPI-Key
: Your_RapidAPI_Key
X-RapidAPI-Host
: simple-chatgpt-api.p.rapidapi.com
{
"question": "Your input text"
}
{
"answer": "Generated text response from the ChatGPT model."
}
curl -X POST \
https://simple-chatgpt-api.p.rapidapi.com/ask \
-H 'Content-Type: application/json' \
-H 'X-RapidAPI-Key: Your_RapidAPI_Key' \
-H 'X-RapidAPI-Host: simple-chatgpt-api.p.rapidapi.com' \
-d '{"question": "Hello, how can I help you today?"}'
{
"answer": "Hello! I'm here to assist you. What do you need help with today?"
}
Errors are returned using standard HTTP response codes. In addition to the HTTP code, responses will also include a brief description of the error.
Please be aware that the API is subject to rate limiting. The limits are designed to ensure equitable distribution of services to all users. If you exceed these limits, your requests will be throttled until the limit resets.
For more detailed information on specific limits, refer to your API subscription details in your RapidAPI dashboard.