Getting Started
This guide describes how to get started generating meaningful content with the Jasper API.
Before you startAccess to Jasper's API is currently only available for customers on the Jasper Business plan. If you'd like to signup for the Business plan, please go here and request a demo to contact Jasper: https://www.jasper.ai/api
This guide walks through how to get started generating your first few piece of content with the Jasper API.
Step 1: Generate an API Key
The Jasper API uses API Keys to authenticate requests. Management of API Tokens are scoped to users with the Admin or Developer role.
You can generate a token after navigating to the API Tokens page:
- Go to the settings section in the Jasper application
- Click on the API Tokens page in the left hand navigation
Or visit the API Tokens page directly: https://app.jasper.ai/settings/dev-tools/tokens.
Step 2: Run your first Command
The /commands endpoint provides a flexible way to generate content by passing in a command(prompt) and context (background information) for Jasper to work from. You can think of the command input as what remains constant for a given job, and the context input as a dynamic variable to further improve the output.
In this example, we will use the commands endpoint to create a product description, and pass in data we have internally about the product as context (i.e. Guitar specs).
- Copy the curl in the above recipe
- Replace your API key in the
X-API-KEYheader - Make the API request in whatever tool you prefer (e.g. paste and run in your terminal, import into Postman, etc).
Example output:
{
"requestId": "4cfeeb0c-7dd3-4118-876a-f1da9acd2545",
"resource": "content",
"data": [
{
"id": "txt_54bdfbd7a0064953ae42f1f6f68069de",
"text": "Discover the perfect 8-string electric guitar for heavy metal and hard rock! The Primal Reverberations Medusa M-1 is a headless semi-hollow with a swamp ash body, Pale Moon 4A top, ebony neck and fingerboard, and two humbucking pickups. Enjoy it's high-performance Kaiju tuners, unbleached bone nut, 5-way pickup selector plus push/pull capacitance selection for alternate pick up mix variations. Unleash your inner beast today!"
}
]
}Next Steps
Now that you have made your first API call, we recommend you check out the following guides:
We also offer Tools & Integrations to make getting started with the Jasper API easier:
Updated 5 days ago
