Feature Endpoint
Fact GPT
This endpoint allows you to generate factually accurate content on the latest topics backed by credible sources. You can choose between SERP, your uploaded file(s), domain(s), and URL(s) as your knowledge source.
/custom/api/generate/factgpt/custom
If no response is received here due to the extended generation time required by this API, we suggest utilizing a local API platform such as Postman or directly accessing the API through your project.
Headers
Input the Authorization Bearer Token to authorize your API request.
Body
This field is used to input the text as an instructional prompt for generating content.
Example: “Generate a list of 5 frequently asked questions for this text: “Mumbai is a city with many bright tourist spots,” OR "Bard: Google's answer to ChatGPT"
You can specify the language in the instruction to generate content in that language. We support all languages but better quality in following:
- 1. English (United States)
- 2. English (United Kingdom)
- 3. Spanish / Español
- 4. French / Français
- 4. Italian / Italiano
- 5. Dutch / Nederlands
- 6. Portuguese / Português
- 7. German / Deutsch
- 8. Polish / Polski
Example: “Generate a list of 5 frequently asked questions for this text: “Is AI is boon or bane?”
Write the respone in spanish”
This field is used to decide the mode of the generation.
Modes are as follows:
- 1. serp
- 2. domain
- 3. url
- 4. file
This field is used to input the array of the domains you want to provide as a reference, while generating the content. This field needs to be passed if mode is “domain”.
Example: ["wikipedia.org", "medium.com"]
This field is used to input the text as an instructional prompt for generating content.
This field is used to input the array of the URLs you want to provide as a reference, while generating the content.
This field is used to input the file id when you're using the file mode.
Response
Indicates whether the call was successful. It prompts success if working, otherwise not.
The generated content.
This array provides the links of the sources considered while generating content.
This information is attached to the call and offers meaningful details when errors occur.
This field informs you about the credits consumed for this particular request. It varies on the generated content.
curl --location --request POST 'https://api-az.longshot.ai/custom/api/generate/factgpt/custom'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer <token>'
--data-raw '{
"instruction": "",
"mode": "serp",
"domain_list": [],
"url_list": [],
"file_id": ""
}'
{
"copies": [
{
"content": "<Generated Shredded Paragraph>"
}
],
"citations": [],
"status": "success",
"message": "Generated successfully",
"credits_used": "<Credits>"
}