logo
Feature Endpoint
Fact GPT
POST

/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

Authorizationrequired
string

Input the Authorization Bearer Token to authorize your API request.

Body

instructionrequired
string

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. 1.  English (United States)
  2. 2.  English (United Kingdom)
  3. 3.  Spanish / Español
  4. 4.  French / Français
  5. 4.  Italian / Italiano
  6. 5.  Dutch / Nederlands
  7. 6.  Portuguese / Português
  8. 7.  German / Deutsch
  9. 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”

moderequired
Default: "serp"
string

This field is used to decide the mode of the generation.

Modes are as follows:

  1. 1.  serp
  2. 2.  domain
  3. 3.  url
  4. 4.  file
domain_list
array

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"]

topic
string

This field is used to input the text as an instructional prompt for generating content.

url_list
string

This field is used to input the array of the URLs you want to provide as a reference, while generating the content.

file_id
string

This field is used to input the file id when you're using the file mode.

Response

status
string

Indicates whether the call was successful. It prompts success if working, otherwise not.

copies
object

The generated content.

citations
string

This array provides the links of the sources considered while generating content.

message
string

This information is attached to the call and offers meaningful details when errors occur.

credits_used
number

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>"
}