Write your prompt in the editor, and click run to test it out.
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
python
curl
import osfrom athina_client.prompt import Prompt, Slugfrom athina_client.keys import AthinaApiKeyAthinaApiKey.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 })
curl--location 'http://api.athina.ai/api/v1/prompt/[PROMPT_SLUG]' \--header 'athina-api-key: ATHINA_API_KEY' \--header 'Content-Type: application/json' \--data '{"prompt": [{"role": "system","content": "You are an AI that answers questions in less than 50 words"},{"role": "user","content": "{{question}}"}],"model": "gpt-4o","parameters": {"temperature": 1},"commit_message": "Initial commit"}'
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.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Athina","colors":{"primary":"#1976D2","light":"#419BF4","dark":"#1976D2"},"favicon":"/logo/light.svg","logo":{"light":"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/logo/light.svg","dark":"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/logo/dark.svg"},"api":{"mdx":{"server":null,"auth":{"method":"key","name":"athina-api-key"}}},"navbar":{"links":[{"label":"AI Hub","href":"https://hub.athina.ai"},{"label":"Website","href":"https://athina.ai"}],"primary":{"type":"button","label":"Sign-up","href":"https://app.athina.ai/"}},"footer":{"socials":{"twitter":"https://twitter.com/AthinaAI","linkedin":"https://linkedin.com/company/athina-ai"}},"integrations":{"ga4":{"measurementId":"G-KZVC5R2GB1"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"athinaai","hasAudioNarration":false,"actualSubdomain":"athinaai","customDomains":["docs.athina.ai"],"gitSource":{"type":"github","owner":"athina-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":false},"entitlements":{},"buildId":"6ae91e667acc70e71f351389:success","clientVersion":"0.0.4248","searchFilterCounts":[{"language":"default","tag":"Documentation","count":166},{"language":"default","tag":"Docs","count":79},{"language":"default","tag":"API / SDK Reference","count":54},{"language":"default","tag":"Evals","count":52},{"language":"default","tag":"Datasets","count":37},{"language":"default","tag":"Guides","count":23},{"language":"default","tag":"Logging","count":21},{"language":"default","tag":"Preset Evals","count":15},{"language":"default","tag":"Prompts","count":14},{"language":"default","tag":"Logging LLM Inferences","count":13}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"prompts/create-prompt","slug":"/prompts/create-prompt","pageMetadata":{"title":"Create Prompt Template","description":"You can create prompts in Athina's Prompt Playground, or via API","icon":"plus","href":"/prompts/create-prompt"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"You can create prompts in Athina’s Prompt Playground, or via API\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tab,Tabs,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Athina’s prompt management system allows you to create prompts on the platform.`}),`\n`,_jsx(Heading,{level:`3`,id:`create-a-prompt-on-athina-playground`,children:`Create a Prompt on Athina Playground`}),`\n`,_jsx(_components.p,{children:`To create a prompt:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Open `,_jsx(_components.a,{href:`https://app.athina.ai.ai/prompt`,children:`https://app.athina.ai.ai/prompt`}),` and click `,_jsx(_components.code,{children:`New Prompt`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Enter a name for your prompt.`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Write your prompt in the editor, and click run to test it out.`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`When you are done, click `,_jsx(_components.code,{children:`Commit`}),` to save a new version for your prompt.`]}),`\n`]}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Until you commit your prompt, it will not be accessible via API. You can\ncommit your prompt at any time by clicking the `,_jsx(_components.code,{children:`Commit`}),` button.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`create-a-prompt-programmatically`,children:`Create a Prompt Programmatically`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`python`,id:`python`,children:_jsx(CodeBlock,{numberOfLines:`22`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` athina_client.prompt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Prompt, Slug`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` athina_client.keys `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AthinaApiKey`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AthinaApiKey.set_key(os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ATHINA_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Prompt.create_prompt(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` slug`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'test-staging'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` prompt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"system\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"You are an AI that answers questions in less than 50 words\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"what does `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`company`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` does?\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-4o\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` commit_message`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Staging default prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` parameters`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.5`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})}),_jsx(Tab,{title:`curl`,id:`curl`,children:_jsx(CodeBlock,{numberOfLines:`20`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`--location`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'http://api.athina.ai/api/v1/prompt/[PROMPT_SLUG]'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'athina-api-key: ATHINA_API_KEY'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--header `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`--data `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\": [{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\": \"system\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\": \"You are an AI that answers questions in less than 50 words\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\": \"{{question}}\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"model\": \"gpt-4o\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parameters\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"temperature\": 1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"commit_message\": \"Initial commit\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})})})]}),`\n`,_jsxs(Tip,{children:[_jsxs(_components.p,{children:[`You can call the API with a `,_jsx(_components.code,{children:`prompt_slug`}),` that already exists to create a `,_jsx(_components.code,{children:`prompt_template`}),` with an incremented `,_jsx(_components.code,{children:`version`}),`.`]}),_jsxs(_components.p,{children:[`If the `,_jsx(_components.code,{children:`prompt_slug`}),` does not exist, a new `,_jsx(_components.code,{children:`prompt_template`}),` will be created with version `,_jsx(_components.code,{children:`1`}),`.`]}),_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/prompts/prompt-versioning`,children:`Prompt Versioning`}),` page for more information on versioning prompts.`]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Prompt Template","description":"You can create prompts in Athina's Prompt Playground, or via API","icon":"plus","href":"/prompts/create-prompt"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Create a Prompt on Athina Playground","slug":"create-a-prompt-on-athina-playground","depth":3,"children":[]},{"title":"Create a Prompt Programmatically","slug":"create-a-prompt-programmatically","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"athinaai","siteName":"Athina","title":"Create Prompt Template - Athina","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"prompts/create-prompt.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"You can create prompts in Athina\u0026#x27;s Prompt Playground, or via API\">\u003cmeta data-mint-head name=\"application-name\" content=\"Athina\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Prompt Template - Athina\">\u003cmeta data-mint-head property=\"og:description\" content=\"You can create prompts in Athina\u0026#x27;s Prompt Playground, or via API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Athina\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.athina.ai/prompts/create-prompt\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://athinaai.mintlify.site/_mintlify/api/og/v2?division=Prompts\u0026amp;title=Create+Prompt+Template\u0026amp;description=You+can+create+prompts+in+Athina%27s+Prompt+Playground%2C+or+via+API\u0026amp;theme=64652801f93e763e814fdf35\u0026amp;signature=40fe78fa8a06e466096a88b1395ad883ed0a4250ce906482b9fd1334d08ef706\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Prompt Template - Athina\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"You can create prompts in Athina\u0026#x27;s Prompt Playground, or via API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://athinaai.mintlify.site/_mintlify/api/og/v2?division=Prompts\u0026amp;title=Create+Prompt+Template\u0026amp;description=You+can+create+prompts+in+Athina%27s+Prompt+Playground%2C+or+via+API\u0026amp;theme=64652801f93e763e814fdf35\u0026amp;signature=40fe78fa8a06e466096a88b1395ad883ed0a4250ce906482b9fd1334d08ef706\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Athina\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1976D2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.athina.ai/prompts/create-prompt\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/prompts/create-prompt.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.athina.ai/#organization\",\"name\":\"Athina\",\"url\":\"https://docs.athina.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintlify.s3.us-west-1.amazonaws.com/athinaai/logo/light.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.athina.ai#website\",\"name\":\"Athina\",\"url\":\"https://docs.athina.ai\",\"publisher\":{\"@id\":\"https://docs.athina.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.athina.ai/prompts/create-prompt#webpage\",\"url\":\"https://docs.athina.ai/prompts/create-prompt\",\"name\":\"Create Prompt Template\",\"description\":\"You can create prompts in Athina's Prompt Playground, or via API\",\"isPartOf\":{\"@id\":\"https://docs.athina.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.athina.ai/prompts/create-prompt#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.athina.ai/prompts/create-prompt#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prompts\",\"item\":\"https://docs.athina.ai/prompts/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Prompt Template\",\"item\":\"https://docs.athina.ai/prompts/create-prompt\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.athina.ai/prompts/create-prompt#article\",\"headline\":\"Create Prompt Template\",\"name\":\"Create Prompt Template\",\"description\":\"You can create prompts in Athina's Prompt Playground, or via API\",\"url\":\"https://docs.athina.ai/prompts/create-prompt\",\"mainEntityOfPage\":{\"@id\":\"https://docs.athina.ai/prompts/create-prompt#webpage\"},\"publisher\":{\"@id\":\"https://docs.athina.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.athina.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Athina\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Athina\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/prompts/create-prompt.md","siteName":"Athina","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","tabs":[{"tab":"Docs","groups":[{"group":"Getting Started","pages":[{"title":"Athina AI","icon":"hand-wave","sidebarTitle":"Introduction","mode":"wide","href":"/overview"},{"title":"Getting Started with Athina","sidebarTitle":"Getting Started","icon":"rocket","href":"/getting-started"}]},{"group":"Datasets","pages":[{"title":"Introduction","sidebarTitle":"Introduction","icon":"table","href":"/datasets/overview"},{"group":"Creating a dataset","icon":"plus","pages":[{"title":"Create a Dataset","icon":"table","href":"/datasets/create-dataset/create-dataset"},{"title":"From Logs","icon":"bars","href":"/datasets/create-dataset/create-dataset-from-logs"},{"title":"Upload File","icon":"file-lines","href":"/datasets/create-dataset/create-dataset-from-file"},{"title":"Via Python SDK","icon":"code","href":"/datasets/create-dataset/create-dataset-via-python-sdk"},{"title":"Via API","icon":"code","href":"/datasets/create-dataset/create-dataset-via-api"},{"title":"Import a HuggingFace Dataset","icon":"face-smiling-hands","href":"/datasets/create-dataset/import_huggingface_dataset"},{"title":"Generate a Synthetic Dataset","icon":"wand-magic-sparkles","href":"/datasets/create-dataset/generate-synthetic-dataset"}]},{"group":"Dynamic Columns","icon":"play","pages":[{"title":"Overview","icon":"play","href":"/datasets/dynamic-columns/dynamic-columns"},{"title":"Run Prompt","icon":"wand-magic-sparkles","href":"/datasets/dynamic-columns/dynamic-columns-run-prompt"},{"title":"API Call","icon":"globe","href":"/datasets/dynamic-columns/dynamic-columns-api-call"},{"title":"Classification","icon":"split","href":"/datasets/dynamic-columns/dynamic-columns-classification"},{"title":"Extract Entities","icon":"play","href":"/datasets/dynamic-columns/dynamic-columns-extract-entities"},{"title":"Code Execution","icon":"square-code","href":"/datasets/dynamic-columns/dynamic-columns-code-execution"}]},{"title":"Run evaluations (UI)","icon":"bolt-lightning","href":"/datasets/run-eval"},{"title":"View Metrics","icon":"chart-line","href":"/datasets/metrics"},{"title":"Run Experiments","icon":"flask","href":"/datasets/run-experiment"},{"title":"Compare datasets","icon":"columns-3","href":"/datasets/compare-datasets"},{"title":"Join Datasets","icon":"file-import","href":"/datasets/join-datasets"},{"title":"Export / Download Datasets","icon":"file-export","href":"/datasets/export-datasets"},{"title":"SQL Notebook","sidebarTitle":"SQL Notebook","icon":"database","href":"/datasets/sql"},{"title":"Dataset Automations","sidebarTitle":"Automations","icon":"diagram-nested","href":"/datasets/automations"},{"title":"Manage Datasets","sidebarTitle":"Manage Datasets","icon":"folders","href":"/datasets/management"},{"title":"Delete a Dataset","icon":"trash","href":"/datasets/delete-dataset"}]},{"group":"Evals","pages":[{"title":"Athina Evals","sidebarTitle":"Overview","icon":"hand-wave","href":"/evals/overview"},{"title":"Quick Start","icon":"rocket","href":"/evals/quickstart"},{"title":"Online Evals","sidebarTitle":"Online Evals","icon":"circle-check","href":"/evals/online-evals"},{"title":"Offline Evals","icon":"bolt-lightning","href":"/evals/offline-evals"},{"title":"Preset Evaluators","sidebarTitle":"Preset Evaluators","icon":"grid","href":"/evals/preset-evals"},{"sidebarTitle":"Custom Evals","title":"Custom Evals","icon":"wrench","href":"/evals/custom-evals"},{"title":"Running Evals in UI","icon":"bolt-lightning","href":"/evals/running-evals-in-ui"},{"title":"Running Evals via SDK","icon":"code","href":"/evals/running-evals-via-sdk"},{"title":"Running Evals in CI/CD","icon":"code-commit","href":"/evals/running-evals-ci-cd"},{"group":"Why Athina Evals?","icon":"book","pages":[{"title":"Open Source Evaluations","icon":"github","href":"/evals/why-athina/open-source-evals"},{"title":"Why Athina Evals","icon":"face-thinking","href":"/evals/why-athina/why-athina-evals"}]},{"title":"Eval Cookbooks","sidebarTitle":"Cookbooks","icon":"code","href":"/evals/cookbooks"}]},{"group":"Flows","pages":[{"title":"Flows","sidebarTitle":"Overview","icon":"arrow-progress","href":"/flows/overview"},{"title":"Concepts","sidebarTitle":"Concepts","icon":"cube","href":"/flows/concepts"},{"title":"Variables in Flows","sidebarTitle":"Variables","icon":"brackets-curly","href":"/flows/variables"},{"title":"Sharing Flows","sidebarTitle":"Sharing Flows","icon":"share","href":"/flows/share-flows"},{"title":"Flow Templates","sidebarTitle":"Flow Templates","icon":"cube","href":"/flows/templates"},{"group":"Blocks","pages":[{"title":"Blocks","sidebarTitle":"Overview","icon":"cube","href":"/flows/blocks/overview"},{"title":"Search","sidebarTitle":"Search","icon":"magnifying-glass","href":"/flows/blocks/search"},{"title":"Code Execution","sidebarTitle":"Code Execution","icon":"rectangle-code","href":"/flows/blocks/code_execution"},{"title":"Knowledge Retrieval","sidebarTitle":"Knowledge Retrieval","icon":"book","href":"/flows/blocks/knowledge"}]}]},{"group":"Annotation","pages":[{"title":"Annotation","sidebarTitle":"Overview","icon":"highlighter-line","href":"/annotations/overview"},{"title":"Annotation Metrics","sidebarTitle":"Metrics","icon":"chart-line","href":"/annotations/metrics"},{"title":"Configure an Annotation Project","sidebarTitle":"Configure Project","icon":"clipboard-list","href":"/annotations/configure-project"},{"title":"View Annotated Data","sidebarTitle":"View Data","icon":"eye","href":"/annotations/view-annotated-data"},{"title":"Review Annotation Entries","sidebarTitle":"Review Entries","icon":"table","href":"/annotations/review-entries"},{"title":"Export Annotated Data","sidebarTitle":"Export Data","icon":"download","href":"/annotations/export-data"},{"title":"Annotation Permissions","sidebarTitle":"Permissions","icon":"shield-check","href":"/annotations/permissions"}]},{"group":"Prompts","pages":[{"title":"Overview","icon":"input-text","href":"/prompts/overview"},{"title":"Concepts","icon":"book","href":"/prompts/concepts"},{"title":"Prompt Syntax","description":"Learn how to write prompts in Athina's Playground.","icon":"code","href":"/prompts/syntax"},{"title":"Create Prompt Template","icon":"plus","href":"/prompts/create-prompt"},{"title":"Prompt Versioning","description":"You can version your prompts in Athina's Prompt Playground, or via API.","icon":"code-branch","href":"/prompts/prompt-versioning"},{"title":"Delete Prompt Slug","icon":"trash","href":"/prompts/delete-prompt"},{"title":"List Prompt Slugs","icon":"list","href":"/prompts/list-prompts"},{"title":"Duplicate Prompt Slug","icon":"copy","href":"/prompts/duplicate-prompt"},{"title":"Run Prompt","icon":"play","href":"/prompts/run-prompt"},{"title":"Multi-Prompt Playground","icon":"layer-group","href":"/prompts/run-multiple-prompts"},{"title":"Run Evaluations on a Prompt Response","icon":"check","href":"/prompts/prompt-evals"},{"title":"Organize Prompts","icon":"folder","href":"/prompts/organization"}]},{"group":"Monitoring","pages":[{"title":"Athina Monitoring","sidebarTitle":"Overview","icon":"bars","href":"/monitoring/overview"},{"title":"Inference Trace","icon":"magnifying-glass","href":"/monitoring/inference-trace"},{"title":"Analytics and Insights","sidebarTitle":"Analytics","icon":"chart-line","href":"/monitoring/analytics"},{"title":"Query Topic Classification","sidebarTitle":"Topic Classification","icon":"tag","href":"/monitoring/topic-classification"},{"title":"How can I export my logged inferences?","sidebarTitle":"Export Data from Athina","icon":"file-export","href":"/monitoring/export-data"},{"title":"Continuous Evaluation","icon":"circle-check","href":"/monitoring/continuous-eval"},{"title":"Model Performance Metrics","icon":"chart-line","href":"/monitoring/performance-metrics"}]},{"group":"Settings","pages":[{"title":"Custom Models","icon":"cube","href":"/settings/custom-models"},{"title":"Sampling Evals","icon":"circle-check","href":"/settings/sampling-evals"},{"title":"Credits","icon":"coin","href":"/settings/credits"}]},{"group":"Integrations","pages":[{"title":"Integrations","icon":"plug","href":"/integrations"}]},{"group":"Self Hosting","pages":[{"title":"Self-Hosting","icon":"cloud","href":"/self-hosting/on-AWS"},{"title":"Self-Hosting On Azure","icon":"cloud","href":"/self-hosting/on-Azure"}]},{"group":"Datasets","pages":[{"title":"Import a HuggingFace Dataset","icon":"face-smiling-hands","href":"/datasets/create-dataset/import_huggingface_dataset"}]}]},{"tab":"API / SDK Reference","pages":[{"title":"API / SDK Reference","href":"/api-reference/logging/overview"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/overview"}]},{"tab":"FAQs","pages":[{"title":"FAQs","href":"/faqs/data-policy"}]}]},{"anchor":"Open-Source Evals","href":"https://github.com/athina-ai/athina-evals","icon":"github"},{"anchor":"Blog","href":"https://blog.athina.ai/","icon":"book"},{"anchor":"Email us","href":"mailto:hello@athina.ai","icon":"envelope"},{"anchor":"Book a call","href":"https://cal.com/shiv-athina/30min","icon":"calendar"}]},"basePath":"","title":"Create Prompt Template - Athina","deploymentId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","buildId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","dynamics":[],"chunks":[]}