---
title: "Run command"
method: POST
path: "/v1/command"
tags: ["Command"]
---

# Run command

`POST /v1/command`

Run a command to generate an AI Output

## Request body

- CommandDto
  - `inputs` CommandInputs, required
    - `command` string, required — Your command for Jasper
    - `context` string — Do you have any background information for Jasper?
    - `knowledgeIds` string[] — A list of knowledge items to use when generating content. Up to 3 knowledge items are allowed.
    - `styleId` string — The style to use when generating a command
    - `toneId` string — Tone to use when generating a command
    - `audienceId` string — The primary audience ID to use when generating a command.
    - `additionalAudienceIds` string[] — Additional audience IDs to include alongside the primary `audienceId` when generating a command.
    - `retrievalAddOn` 'webScraper' | 'webSearch' — The add-on to use to further enhance your generation with information that lives outside of Jasper. You can further customize the behavior of the add-on with the associated parameter in the options portion of your request body.
  - `options` CommandOptions
    - `outputCount` number — Number of outputs to generate.
    - `outputLanguage` 'English' | 'French' | 'Spanish' | 'Italian' | 'Portuguese' | 'German' — The language in which outputs should be returned.
    - `inputLanguage` 'English' | 'French' | 'Spanish' | 'Italian' | 'Portuguese' | 'German' — The language in which inputs will be given.
    - `languageFormality` 'default' | 'more' | 'less' — The formality of the outputs, for the languages where formality applies.
    - `webScraper` WebScraperOptions
      - `urls` string[] — An optional list of URLs for Jasper to scrape during generation to use as context. Max of 3 per request. If nothing is provided, Jasper will automatically detect URLs in the request inputs to use as context for the generation.
    - `webSearch` WebSearchOptions
      - `siteBlockList` string[] — An optional list of domains for Jasper to omit from the search results. For example, providing mycompetor.com will filter out results returned with that domain and it’s subdomains, such as blog.mycompetitor.com. If nothing is provided, all search results will be used for the generation.
      - `searchQuery` string — A query to override the default behavior for how Jasper searches the web. If nothing is provided, Jasper will automatically define an appropriate query based on the inputs supplied.
      - `maxResults` 1 | 2 | 3 | 4 | 5 — The number of search results to use for additional context when generating a response
    - `completionType` 'performance' | 'quality' — How would you like Jasper to optimize your output? With quality, Jasper will take more time to generate the highest quality output possible. With performance, Jasper will prioritize generating outputs faster.

## Response `201`

Created. The command ran successfully.

- CommandResponseDto
  - `requestId` string
  - `resource` string
  - `data` GeneratedText[]
    - `text` string
    - `id` string

## Other responses

- `400` — Bad request. May be missing required inputs or may have badly formatted inputs or options.
- `500` — Internal server error. Unable to run command.

---

[API](https://skmtc.net/jasper/apis/jasper-api.md) · [All operations](https://skmtc.net/jasper/apis/jasper-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jasper/jasper-api/revisions/438914d9525e/schema)
