When creating a new prompt, you can choose from several generation types. Here’s a brief overview and example for each:

Text Generation

Text generation allows you to create prompts that output natural language responses. Use this for chatbots, content generation, or any scenario where the output is text.

Example:

---
name: text-example
text_config:
  model_name: gpt-4o-mini
---

<User>What is the capital of France?</User>

Learn more about Text Generation


Object Generation

Object generation is used when you want the output to be structured data, such as JSON objects. This is useful for API responses, data extraction, or structured workflows.

Example:

---
name: object-example
object_config:
  model_name: gpt-4o-mini
  schema:
    type: object
    properties:
      city:
        type: string
      country:
        type: string
---

<User>Extract the city and country from: "Paris, France"</User>

Learn more about Object Generation


Image Generation

Image generation lets you create prompts that produce images based on your input. Ideal for creative applications, design, or visual content.

Example:

---
name: image-example
image_config:
  model_name: dall-e-3
  num_images: 1
  size: 1024x1024
  aspect_ratio: 1:1
  seed: 12345
---

<ImagePrompt>
A futuristic cityscape at sunset with flying cars and neon lights
</ImagePrompt>

Learn more about Image Generation


Speech Generation

Speech generation allows you to create prompts that output audio responses, converting text to speech. This is useful for voice assistants, accessibility features, or any scenario where spoken output is needed.

Example:

---
name: speech-example
speech_config:
  model_name: tts-1-hd
  voice: "nova"
  speed: 1.0
  output_format: "mp3"
---

<System>
Please read this text aloud.
</System>

<SpeechPrompt>
This is a test for the speech prompt to be spoken aloud.
</SpeechPrompt>

Learn more about Speech Generation


Creating a Prompt

Below is an example of the prompt creation interface, where you can select the generation type:

For more details on all generation types, see the Generation Types Overview.