Feature Endpoint
Instruct Prompt
This endpoint allows you to instruct or command AI to generate content based on your prompt. Add escape sequences in the text wherever necessary.
/custom/api/generate/instruct
Headers
Input the Authorization Bearer Token to authorize your API request.
Body
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. 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”
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/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>"
}