Command
Run command
Changed onRun a command to generate an AI Output
post/v1/command
Request
- Base URLhttps://api.jasper.ai
- URLhttps://api.jasper.ai/v1/command
- Auth
- API key in header X-API-Key
- or OAuth 2Authorization code: https://api.jasper.ai/oauth2/authorizeToken URL: https://api.jasper.ai/oauth2/token scopes: user
Request body
Example request
{
"inputs": {
"command": "Write a haiku about rabbits",
"context": "All rabbits eat kale",
"attachmentIds": [
"tmp_2ee766eaa4ef48e59da1d9602bfecf2d"
],
"products": [
{
"productId": "prd_073D2D49094A4AED991A47B614522579",
"attributeIds": [
"atr_535B1EC15F5F41EAB1B400E9ED4077B6"
]
}
],
"styleId": "sty_2ee766eaa4ef48e59da1d9602bfecf2d",
"toneId": "ton_2ee766eaa4ef48e59da1d9602bfecf2d",
"audienceId": "aud_2ee766eaa4ef48e59da1d9602bfecf2d",
"audienceIds": {
"primary": "aud_2ee766eaa4ef48e59da1d9602bfecf2d",
"secondary": [
"aud_7c1f0b9d2e4a4f6b8d3c5a1e9f0b2c4d"
]
}
},
"options": {
"outputCount": 3,
"outputLanguage": "English",
"inputLanguage": "English",
"languageFormality": "default",
"webScraper": {
"urls": [
"https://en.wikipedia.org/wiki/Rabbit",
"https://en.wikipedia.org/wiki/Lagomorpha"
]
},
"webSearch": {
"siteBlockList": [
"https://en.wikipedia.org"
],
"searchQuery": "Recent bear attacks in Alaska"
}
}
}Response
Created. The command ran successfully.
Example response
{
"requestId": "bce766ea-a4ef-48e5-9da1-d9602bfecf2d",
"resource": "content",
"data": [
{
"text": "\n\nFurry friends so sweet,\nNibbling on fresh kale leaves,\nSoft hops fill the breeze.",
"id": "txt_bce766eaa4ef48e59da1d9602bfecf2d"
}
]
}Changes
- warning
removed the request property
///// - info
added the new optional request property
///// - info
added the new optional request property
///// - info
added the new optional request property
///// - info
added the new optional request property
/////
- warning