Overview
Thecreate()
and acreate()
methods allow you to create a new prompt in Keywords AI. A prompt serves as a container for multiple versions with different configurations. Use create()
for synchronous operations and acreate()
for asynchronous operations.
Usage example
Parameters
Thecreate()
and acreate()
methods do not require any parameters. They create a new prompt with default values that can be updated later using the update()
method.
Returns
Returns aPromptCreateResponse
object containing the created prompt information:
Examples
Basic Synchronous Example
Asynchronous Example
Creating and Updating a Prompt
Creating Multiple Prompts
Convenience Functions
You can also use the convenience function to create a PromptAPI client:Next Steps
After creating a prompt, you’ll typically want to:- Update the prompt with a meaningful name and description using the
update()
method - Create prompt versions with specific configurations using the
create_version()
method - Deploy versions to make them available for use in your applications