logo
Feature Endpoint
Instruct Prompt
POST

/custom/api/generate/instruct

Headers

Authorizationrequired
string

Input the Authorization Bearer Token to authorize your API request.

Body

textrequired
string

This field is used to input the prompt (text instruction) to generate results.

Example: “Mention 5 popular food places in Mumbai for this text:\” Authentic Indian wine with the French style\””

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”

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/instruct' 
--header 'Content-Type: application/json' 
--header 'Authorization: Bearer <token>' 
--data-raw '{
  "text": ""
}'
{
  "copies": [
    {
      "content": "<Generated Content>"
    }
  ],
  "citations": [],
  "status": "success",
  "message": "copies generated successfully",
  "credits_used": "<Credits>"
}