Athina’s prompt management system allows you to create prompts on the platform.

Create a Prompt on Athina Playground

To create a prompt:

  1. Open https://app.athina.ai.ai/prompt and click New Prompt.

  2. Enter a name for your prompt.

  3. Write your prompt in the editor, and click run to test it out.

  4. When you are done, click Commit to save a new version for your prompt.

Until you commit your prompt, it will not be accessible via API. You can commit your prompt at any time by clicking the Commit button.

Create a Prompt Programmatically

import os
from athina_client.prompt import Prompt, Slug
from athina_client.keys import AthinaApiKey

AthinaApiKey.set_key(os.getenv('ATHINA_API_KEY'))

Prompt.create_prompt(
    slug='test-staging',
    prompt=[{
        "role": "system",
        "content": "You are an AI that answers questions in less than 50 words"
    },
    {
        "role": "user",
        "content": "what does {{company}} does?"
    }],
    model="gpt-4o",
    commit_message="Staging default prompt",
    parameters={
        "temperature": 0.5
    }
)

You can call the API with a prompt_slug that already exists to create a prompt_template with an incremented version.

If the prompt_slug does not exist, a new prompt_template will be created with version 1.

See the Prompt Versioning page for more information on versioning prompts.