{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Portkey (Prisma AIRS AI Gateway) Docs","description":"Comprehensive documentation for AI Gateway, Guardrails, Observability, and Governance features.","colors":{"primary":"#0891B2","light":"#0891B2","dark":"#0891B2"},"logo":{"light":"https://mintcdn.com/portkey-docs/tHk-hgNjLbEj4dhh/images/portkey-PANW-company-logo-positive.png?fit=max\u0026auto=format\u0026n=tHk-hgNjLbEj4dhh\u0026q=85\u0026s=c5fb09014ff79616583b1d3bffe27450","dark":"https://mintcdn.com/portkey-docs/tHk-hgNjLbEj4dhh/images/portkey-PANW-company-logo-negative.png?fit=max\u0026auto=format\u0026n=tHk-hgNjLbEj4dhh\u0026q=85\u0026s=6025ca49ef544522f58ff471b7f75f8f"},"favicon":"https://mintcdn.com/portkey-docs/Hf1XgyjG_b79ym4Q/favicon.png?fit=max\u0026auto=format\u0026n=Hf1XgyjG_b79ym4Q\u0026q=85\u0026s=cbaa1bfc49bb6e3fd6cf499a5da313a3","api":{"openapi":"https://raw.githubusercontent.com/Portkey-AI/openapi/refs/heads/master/openapi.yaml","examples":{"prefill":true},"url":"full"},"navbar":{"links":[{"href":"https://portkey.ai/models","label":"Models"},{"href":"https://support.portkey.ai/forms/customer-portal-ticket-form","label":"Support"},{"href":"https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\u0026utm_medium=referral\u0026utm_campaign=prisma_airs\u0026utm_content=docs_nav#contact","label":"Contact Us"}],"primary":{"type":"button","label":"Sign in","href":"https://stratacloudmanager.paloaltonetworks.com/"}},"footer":{"socials":{"x":"https://twitter.com/PortkeyAI","linkedin":"https://www.linkedin.com/company/portkey-ai","github":"https://git.new/portkey"},"links":[{"header":"For LLMs","items":[{"label":"llms.txt","href":"https://portkey.ai/docs/llms.txt"},{"label":"llms-full.txt","href":"https://portkey.ai/docs/llms-full.txt"}]},{"header":"Products","items":[{"label":"Observability","href":"https://portkey.ai/features/observability"},{"label":"AI Gateway","href":"https://portkey.ai/features/ai-gateway"},{"label":"Guardrails","href":"https://portkey.ai/features/guardrails"},{"label":"Prompt Management","href":"https://portkey.ai/features/prompt-management"},{"label":"Agents","href":"https://portkey.ai/features/agents"},{"label":"MCP Gateway","href":"https://portkey.ai/docs/product/mcp-gateway"},{"label":"Security","href":"https://portkey.ai/features/security-and-compliance"},{"label":"Auto-Instrumentation","href":"https://portkey.ai/features/auto-instrumentation"}]},{"header":"Resources","items":[{"label":"API Status","href":"https://status.portkey.ai/"},{"label":"Helm Charts","href":"https://github.com/portkey-ai/helm"},{"label":"AI Grants Finder","href":"https://grantsfinder.portkey.ai/"},{"label":"Events Calendar","href":"https://lu.ma/portkey"},{"label":"Blog","href":"https://portkey.ai/blog"},{"label":"Error Library","href":"https://portkey.ai/error-library"},{"label":"Models \u0026 Pricing","href":"https://portkey.ai/models"}]},{"header":"Company","items":[{"label":"Pricing","href":"https://portkey.ai/pricing"},{"label":"Compliances","href":"https://trust.portkey.ai/"},{"label":"Privacy Policy","href":"https://portkey.ai/privacy-policy"},{"label":"Terms of Service","href":"https://portkey.ai/terms"},{"label":"DPA","href":"https://portkey.ai/dpa"},{"label":"Cookie Policy","href":"https://portkey.ai/cookie-policy"}]}]},"seo":{"metatags":{"og:type":"website","og:site_name":"Portkey AI Gateway Docs"},"indexing":"navigable"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"system","latex":true},"integrations":{"ga4":{"measurementId":"G-JJMXYE4DRL"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"toc"},"interaction":{"drilldown":true},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"portkey-docs","hasAudioNarration":false,"actualSubdomain":"portkey-docs","customDomains":["docs.portkey.ai","portkey.ai"],"gitSource":{"type":"github","owner":"portkey-ai","repo":"docs-core","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ada570f8a2555e6c46fb38b","collectionId":"da62057f-6bc1-4bcc-8cdf-81cc023c9f30","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ada570f8a2555e6c46fb38b"},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ada570f8a2555e6c46fb38b","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"Integrations","count":697},{"language":"default","tag":"Product","count":381},{"language":"default","tag":"Docs","count":318},{"language":"default","tag":"LLM Integrations","count":307},{"language":"default","tag":"More","count":176},{"language":"default","tag":"Admin APIs","count":172},{"language":"default","tag":"Guardrails","count":101},{"language":"default","tag":"AI Gateway","count":99},{"language":"default","tag":"Admin API","count":95},{"language":"default","tag":"Documentation","count":91}],"searchSettings":{"isFiltersEnabled":true,"showContentSnippets":true}},"assistantConfig":{"enableAskAiButton":true,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@portkey.ai","showHelpButton":true}},"hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"editor-v7-file-tree","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#banner{background:linear-gradient(90deg,#0d1b2e 0,#1a1040 40%,#2d0f22 100%);border-bottom:1px solid rgba(255,255,255,.08)}#banner a{color:#f0f0f0;text-decoration:none;font-weight:600;border-bottom:1px solid rgba(240,240,240,.5);padding-bottom:1px;transition:border-color .2s ease}#banner a:hover{border-bottom-color:#fff}"}],"page":{"pagePath":"guides/use-cases/emotions-with-gpt-4o","slug":"/guides/use-cases/emotions-with-gpt-4o","pageMetadata":{"title":"Detecting Emotions with GPT-4o","description":null,"href":"/guides/use-cases/emotions-with-gpt-4o"},"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`,hr:`hr`,p:`p`,pre:`pre`,span:`span`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Card,CodeBlock,Frame,Heading,OptimizedImage,Table}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-2.jpg?fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=2fec951be8d0c8da999916a5735862b2`,\"data-og-width\":`1200`,width:`1200`,\"data-og-height\":`675`,height:`675`,\"data-path\":`images/guides/use-case-2.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-2.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=3b95ffa2f05e085e9915181cf756b897 280w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-2.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=da64dddb0a4e601dba1b4f44854289f1 560w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-2.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=9663d959adaa717e8a92b84aa4e4d5e5 840w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-2.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=9b01db08d594c83412e61046feeea3b4 1100w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-2.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=4efda69f02d6e050614d8bb65ff3bcc5 1650w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-2.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=5b7df5e52ad8792303c52db1f9108f1f 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`first-grab-the-api-keys`,children:`First, grab the API keys`}),`\n`,_jsx(Table,{children:_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.a,{href:`https://app.portkey.ai/`,children:`Portkey API Key`})}),_jsx(_components.th,{children:_jsx(_components.a,{href:`https://platform.openai.com/api-keys`,children:`OpenAI API Key`})})]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -qU`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` portkey-ai`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` openai`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`let’s-make-a-request`,children:`Let’s make a request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`41`,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:`41`,children:[_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:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\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:` portkey_ai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` PORTKEY_GATEWAY_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, createHeaders`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`portkey `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'OPENAI_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` PORTKEY_GATEWAY_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` createHeaders(`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` provider`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"openai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'PORTKEY_API_KEY'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_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:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`emotions `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` portkey.chat.completions.create(`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_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:` [`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://i.insider.com/602ee9d81a89f20019a377c6?width=1136\u0026format=jpeg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}},`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What expression is this person expressing?\"`}),_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:` ]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_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:` ]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(emotions.choices[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].message.content)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`get-observability-over-the-request`,children:`Get Observability over the request`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-3.png?fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=e16de536cc94a67f0dda1b730e4eda9d`,\"data-og-width\":`1262`,width:`1262`,\"data-og-height\":`2614`,height:`2614`,\"data-path\":`images/guides/use-case-3.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-3.png?w=280\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=65acb0cec7dcc200428f7cfa77082d6a 280w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-3.png?w=560\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=c397d611aa1c809f024ff2f55503af05 560w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-3.png?w=840\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=00cea4082f9c652037f1a949221c90b5 840w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-3.png?w=1100\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=8abd4729f7c70763283507709b1b501d 1100w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-3.png?w=1650\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=4acb909301402aa398e1bb371cdc98dc 1650w, https://mintcdn.com/portkey-docs/T0lFtdapIPX8YtCI/images/guides/use-case-3.png?w=2500\u0026fit=max\u0026auto=format\u0026n=T0lFtdapIPX8YtCI\u0026q=85\u0026s=94923dacbc6ba702ea70274907964062 2500w`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Card,{title:`Portkey is now PRISMA AIRS AI Gateway. See it in action.`,href:`https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\u0026utm_medium=referral\u0026utm_campaign=prisma_airs\u0026utm_content=docs_nav#contact`,icon:`arrow-up-right-from-square`,children:_jsx(_components.p,{children:`Contact Us`})})]})}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":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Detecting Emotions with GPT-4o","description":null,"href":"/guides/use-cases/emotions-with-gpt-4o"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"First, grab the API keys","slug":"first-grab-the-api-keys","depth":2,"children":[]},{"title":"Let’s make a request","slug":"let’s-make-a-request","depth":2,"children":[]},{"title":"Get Observability over the request","slug":"get-observability-over-the-request","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"portkey-docs","siteName":"Portkey (Prisma AIRS AI Gateway) Docs","title":"Detecting Emotions with GPT-4o - Portkey (Prisma AIRS AI Gateway) Docs","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"contextualStarterQuestions":[{"_id":"6ad311613dddcea99d2f920b","deploymentId":"67086365a151447bf2fa5021","questionText":"How do I make emotion requests?","status":"active","generatedBy":"contextual","path":"guides/use-cases/emotions-with-gpt-4o","createdAt":"2026-10-17T06:10:41.666Z","updatedAt":"2026-10-17T06:10:41.666Z","__v":0},{"_id":"6ad311613dddcea99d2f920a","deploymentId":"67086365a151447bf2fa5021","questionText":"What API keys do I need?","status":"active","generatedBy":"contextual","path":"guides/use-cases/emotions-with-gpt-4o","createdAt":"2026-10-17T06:10:41.666Z","updatedAt":"2026-10-17T06:10:41.666Z","__v":0},{"_id":"6ad311613dddcea99d2f9209","deploymentId":"67086365a151447bf2fa5021","questionText":"How do I set up emotion detection?","status":"active","generatedBy":"contextual","path":"guides/use-cases/emotions-with-gpt-4o","createdAt":"2026-10-17T06:10:41.666Z","updatedAt":"2026-10-17T06:10:41.666Z","__v":0}],"navMaps":{"firstHrefInVersion":{"Latest":{"href":"/guides/use-cases/emotions-with-gpt-4o","matchLevel":0},"Prisma AIRS":{"href":"/aigw/introduction/welcome","matchLevel":4},"Virtual Keys (Deprecated)":{"href":"/guides/use-cases/emotions-with-gpt-4o","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-10-17T06:10:04.124Z","gitLastModified":"2026-08-06T05:55:04.000Z","originalFileLocation":"guides/use-cases/emotions-with-gpt-4o.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=\"application-name\" content=\"Portkey (Prisma AIRS AI Gateway) Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Detecting Emotions with GPT-4o - Portkey (Prisma AIRS AI Gateway) Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Portkey AI Gateway Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://portkey-docs.mintlify.app/_mintlify/api/og/v2?division=Use+Cases\u0026amp;title=Detecting+Emotions+with+GPT-4o\u0026amp;theme=262137c9f2583e48984715e7\u0026amp;signature=d7ba3232896282ad7893e9036abc85368ca81d03018f8c427f3a396752836628\">\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=\"Detecting Emotions with GPT-4o - Portkey (Prisma AIRS AI Gateway) Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://portkey-docs.mintlify.app/_mintlify/api/og/v2?division=Use+Cases\u0026amp;title=Detecting+Emotions+with+GPT-4o\u0026amp;theme=262137c9f2583e48984715e7\u0026amp;signature=d7ba3232896282ad7893e9036abc85368ca81d03018f8c427f3a396752836628\">\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=\"/docs/mintlify-assets/_mintlify/favicons/portkey-docs/9Whrk-8bCE6hyGSn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Portkey (Prisma AIRS AI Gateway) Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0891B2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/guides/use-cases/emotions-with-gpt-4o.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.portkey.ai/#organization\",\"name\":\"Portkey (Prisma AIRS AI Gateway) Docs\",\"url\":\"https://docs.portkey.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/portkey-docs/tHk-hgNjLbEj4dhh/images/portkey-PANW-company-logo-positive.png?fit=max\u0026auto=format\u0026n=tHk-hgNjLbEj4dhh\u0026q=85\u0026s=c5fb09014ff79616583b1d3bffe27450\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.portkey.ai/docs#website\",\"name\":\"Portkey (Prisma AIRS AI Gateway) Docs\",\"url\":\"https://docs.portkey.ai/docs\",\"publisher\":{\"@id\":\"https://docs.portkey.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o#webpage\",\"url\":\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o\",\"name\":\"Detecting Emotions with GPT-4o\",\"dateModified\":\"2026-08-06T05:55:04.000Z\",\"isPartOf\":{\"@id\":\"https://docs.portkey.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Use Cases\",\"item\":\"https://docs.portkey.ai/docs/guides/use-cases\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Detecting Emotions with GPT-4o\",\"item\":\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o#article\",\"headline\":\"Detecting Emotions with GPT-4o\",\"name\":\"Detecting Emotions with GPT-4o\",\"url\":\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o\",\"mainEntityOfPage\":{\"@id\":\"https://docs.portkey.ai/docs/guides/use-cases/emotions-with-gpt-4o#webpage\"},\"dateModified\":\"2026-08-06T05:55:04.000Z\",\"publisher\":{\"@id\":\"https://docs.portkey.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.portkey.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Portkey (Prisma AIRS AI Gateway) Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Portkey (Prisma AIRS AI Gateway) Docs","nav":{"global":null,"versions":[{"version":"Latest","tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/introduction/what-is-portkey"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/ecosystem"}]},{"tab":"Gateway APIs","pages":[{"title":"Gateway APIs","href":"/api-reference/inference-api/introduction"}]},{"tab":"Admin APIs","pages":[{"title":"Admin APIs","href":"/api-reference/admin-api/introduction"}]},{"tab":"Cookbooks","groups":[{"group":"Evals","pages":[{"title":"How to Run Structured Output Evals at Scale","href":"/guides/use-cases/run-batch-evals"},{"title":"Building an LLM-as-a-Judge System for AI (Customer Support) Agent","href":"/guides/prompts/llm-as-a-judge"}]},{"group":"Prompt Engineering","pages":[{"title":null,"href":"/guides/prompts"},{"title":"Ultimate AI SDR","href":"/guides/prompts/ultimate-ai-sdr"},{"title":"Build a chatbot using Portkey's Prompt Templates","href":"/guides/prompts/build-a-chatbot-using-portkeys-prompt-templates"},{"title":"Building an LLM-as-a-Judge System for AI (Customer Support) Agent","href":"/guides/prompts/llm-as-a-judge"},{"title":"Optimizing Prompts for Customer Support using Portkey | LLama Prompt Ops Integration","href":"/guides/prompts/llama-prompts"}]},{"group":"Whitepapers","pages":[{"group":"Optimizing LLM Costs","pages":[{"title":"Executive Summary","href":"/guides/whitepapers/optimizing-llm-costs/executive-summary"},{"title":"1. Introduction","href":"/guides/whitepapers/optimizing-llm-costs/introduction"},{"title":"2. Understanding LLM Cost Drivers","href":"/guides/whitepapers/optimizing-llm-costs/llm-cost-drivers"},{"title":"3. FrugalGPT Techniques for Cost Optimization","href":"/guides/whitepapers/optimizing-llm-costs/frugalgpt-techniques"},{"title":"4. Advanced Strategies for Performance Improvement","href":"/guides/whitepapers/optimizing-llm-costs/advanced-strategies"},{"title":"5. Architectural Considerations","href":"/guides/whitepapers/optimizing-llm-costs/architectural-considerations"},{"title":"6. Operational Best Pracitces","href":"/guides/whitepapers/optimizing-llm-costs/operational-best-practices"},{"title":"7. Cost Effective Development Practices","href":"/guides/whitepapers/optimizing-llm-costs/cost-effective-development"},{"title":"8. User Education and Change Management","href":"/guides/whitepapers/optimizing-llm-costs/user-education"},{"title":"9. Future Trends in LLM Cost Optimization","href":"/guides/whitepapers/optimizing-llm-costs/future-trends"},{"title":"10. Conclusion and Key Takeaways","href":"/guides/whitepapers/optimizing-llm-costs/conclusion-and-key-takeaways"}]}]},{"group":"Getting Started","pages":[{"title":"Overview","href":"/guides/getting-started"},{"title":"A/B Test Prompts and Models","href":"/guides/getting-started/a-b-test-prompts-and-models"},{"title":"Tackling Rate Limiting","href":"/guides/getting-started/tackling-rate-limiting"},{"title":"Function Calling","href":"/guides/getting-started/function-calling"},{"title":"Image Generation","href":"/guides/getting-started/image-generation"},{"title":"Getting Started with AI Gateway","href":"/guides/getting-started/getting-started-with-ai-gateway"},{"title":"Llama 3 on Groq","href":"/guides/getting-started/llama-3-on-groq"},{"title":"Return Repeat Requests from Cache","href":"/guides/getting-started/return-repeat-requests-from-cache"},{"title":"Trigger Automatic Retries on LLM Failures","href":"/guides/getting-started/trigger-automatic-retries-on-llm-failures"},{"title":"101 on Portkey's Gateway Configs","href":"/guides/getting-started/101-on-portkey-s-gateway-configs"}]},{"group":"Integrations","pages":[{"title":"Overview","href":"/guides/integrations"},{"title":"Portkey CLI","href":"/guides/coding-agents/agent-cli"},{"title":"Skills Registry","href":"/guides/coding-agents/skills"},{"title":"Llama 3 on Portkey + Together AI","href":"/guides/integrations/llama-3-on-portkey-+-together-ai"},{"title":"Introduction to GPT-4o","href":"/guides/integrations/introduction-to-gpt-4o"},{"title":"Anyscale","href":"/guides/integrations/anyscale"},{"title":"Mistral","href":"/guides/integrations/mistral"},{"title":"Vercel AI","href":"/guides/integrations/vercel-ai"},{"title":"Deepinfra","href":"/guides/integrations/deepinfra"},{"title":"Groq","href":"/guides/integrations/groq"},{"title":"Langchain","href":"/guides/integrations/langchain"},{"title":"Mixtral 8x22b","href":"/guides/integrations/mixtral-8x22b"},{"title":"Segmind","href":"/guides/integrations/segmind"},{"title":"Sync Open WebUI Feedback → Portkey","href":"/guides/integrations/openwebui-to-portkey"}]},{"group":"Use Cases","pages":[{"title":"Overview","href":"/guides/use-cases"},{"title":"Unified LLM API with Automatic Failover \u0026 Error Handling","href":"/guides/use-cases/enterprise-ready-unified-api"},{"title":"Multi-Tenant LLM Access with Enterprise Control for Customer-Facing Apps","href":"/guides/use-cases/multi-tenant-ai-feature"},{"title":"Enforcing Budget, Token \u0026 Rate Limits: Use Cases","href":"/guides/use-cases/enforcing-limits-and-budgets"},{"title":"Testing Application Resilience with Fallbacks","href":"/guides/use-cases/fallbacks-test"},{"title":"How to use Portkey Guardrails for PII Protection","href":"/guides/use-cases/guardrail-pii-use-case"},{"title":"Creating your own partner guardrails","href":"/guides/use-cases/creating-partner-guardrails"},{"title":"Handle streaming output guardrails for client-side decisions","href":"/guides/use-cases/streaming-output-guardrails"},{"title":"Web Search for Any LLM in LibreChat","href":"/guides/use-cases/librechat-web-search"},{"title":"Few-Shot Prompting","href":"/guides/use-cases/few-shot-prompting"},{"title":"Enforcing JSON Schema with Anyscale \u0026 Together","description":"Get the LLM to adhere to your JSON schema using Anyscale \u0026 Together AI's newly introduced JSON modes","href":"/guides/use-cases/enforcing-json-schema-with-anyscale-and-together"},{"title":"Detecting Emotions with GPT-4o","href":"/guides/use-cases/emotions-with-gpt-4o"},{"title":"Build an article suggestion app with Supabase pgvector, and Portkey","description":" Consider that you have list of support articles that you want to suggest it to users when users search for it. You want to suggest as best fit as possible. With the availability of tools like Large Language Model (LLMs) and Vector Databases, the approach towards suggestions \u0026 recommendation systems has significantly evolved.","href":"/guides/use-cases/build-an-article-suggestion-app-with-supabase-pgvector-and-portkey"},{"title":"Setting up resilient Load balancers with failure-mitigating Fallbacks","href":"/guides/use-cases/setting-up-resilient-load-balancers-with-failure-mitigating-fallbacks"},{"title":"Combining Routing Strategies: Conditional, Load Balancing \u0026 Fallbacks","href":"/guides/use-cases/combining-routing-strategies"},{"title":"Run Portkey on Prompts from Langchain Hub","href":"/guides/use-cases/run-portkey-on-prompts-from-langchain-hub"},{"title":"Smart Fallback with Model-Optimized Prompts","href":"/guides/use-cases/smart-fallback-with-model-optimized-prompts"},{"title":"How to use OpenAI SDK with Portkey Prompt Templates","href":"/guides/use-cases/how-to-use-openai-sdk-with-portkey-prompt-templates"},{"title":"Setup OpenAI -> Azure OpenAI Fallback","href":"/guides/use-cases/setup-openai-greater-than-azure-openai-fallback"},{"title":"Fallback from SDXL to Dall-e-3","href":"/guides/use-cases/fallback-from-sdxl-to-dall-e-3"},{"title":"Comparing Top10 LMSYS Models with Portkey","href":"/guides/use-cases/comparing-top10-lmsys-models-with-portkey"},{"title":"Request metadata use cases","href":"/guides/use-cases/metadata-use-cases"},{"title":"Tracking LLM Costs Per User with Portkey","href":"/guides/use-cases/track-costs-using-metadata"},{"title":"Comparing DeepSeek Models Against OpenAI, Anthropic \u0026 More Using Portkey","href":"/guides/use-cases/deepseek-r1"},{"title":"Portkey with OpenAI Computer Use","href":"/guides/use-cases/openai-computer-use"},{"title":"Using Private MCP Servers with Responses API","href":"/guides/use-cases/private-mcp-servers"},{"title":"Converting STDIO to Remote MCP Servers","icon":"globe","href":"/guides/converting-stdio-to-streamable-http"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/2026/september"}]},{"tab":"Help Center","pages":[{"title":"Help Center","href":"/help-center/you-do-not-have-enough-permissions"}]}]},{"version":"Prisma AIRS","pages":[{"title":"Prisma AIRS","href":"/aigw/introduction/welcome"}]},{"version":"Virtual Keys (Deprecated)","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/virtual_key_old/introduction/what-is-portkey"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/virtual_key_old/integrations/ecosystem"}]},{"tab":"Inference API","pages":[{"title":"Inference API","href":"/api-reference/inference-api/introduction"}]},{"tab":"Admin API","pages":[{"title":"Admin API","href":"/api-reference/admin-api/introduction"}]},{"tab":"Cookbooks","groups":[{"group":"Evals","pages":[{"title":"How to Run Structured Output Evals at Scale","href":"/guides/use-cases/run-batch-evals"},{"title":"Building an LLM-as-a-Judge System for AI (Customer Support) Agent","href":"/guides/prompts/llm-as-a-judge"}]},{"group":"Prompt Engineering","pages":[{"title":null,"href":"/guides/prompts"},{"title":"Ultimate AI SDR","href":"/guides/prompts/ultimate-ai-sdr"},{"title":"Build a chatbot using Portkey's Prompt Templates","href":"/guides/prompts/build-a-chatbot-using-portkeys-prompt-templates"},{"title":"Building an LLM-as-a-Judge System for AI (Customer Support) Agent","href":"/guides/prompts/llm-as-a-judge"},{"title":"Optimizing Prompts for Customer Support using Portkey | LLama Prompt Ops Integration","href":"/guides/prompts/llama-prompts"}]},{"group":"Whitepapers","pages":[{"group":"Optimizing LLM Costs","pages":[{"title":"Executive Summary","href":"/guides/whitepapers/optimizing-llm-costs/executive-summary"},{"title":"1. Introduction","href":"/guides/whitepapers/optimizing-llm-costs/introduction"},{"title":"2. Understanding LLM Cost Drivers","href":"/guides/whitepapers/optimizing-llm-costs/llm-cost-drivers"},{"title":"3. FrugalGPT Techniques for Cost Optimization","href":"/guides/whitepapers/optimizing-llm-costs/frugalgpt-techniques"},{"title":"4. Advanced Strategies for Performance Improvement","href":"/guides/whitepapers/optimizing-llm-costs/advanced-strategies"},{"title":"5. Architectural Considerations","href":"/guides/whitepapers/optimizing-llm-costs/architectural-considerations"},{"title":"6. Operational Best Pracitces","href":"/guides/whitepapers/optimizing-llm-costs/operational-best-practices"},{"title":"7. Cost Effective Development Practices","href":"/guides/whitepapers/optimizing-llm-costs/cost-effective-development"},{"title":"8. User Education and Change Management","href":"/guides/whitepapers/optimizing-llm-costs/user-education"},{"title":"9. Future Trends in LLM Cost Optimization","href":"/guides/whitepapers/optimizing-llm-costs/future-trends"},{"title":"10. Conclusion and Key Takeaways","href":"/guides/whitepapers/optimizing-llm-costs/conclusion-and-key-takeaways"}]}]},{"group":"Getting Started","pages":[{"title":"Overview","href":"/guides/getting-started"},{"title":"A/B Test Prompts and Models","href":"/guides/getting-started/a-b-test-prompts-and-models"},{"title":"Tackling Rate Limiting","href":"/guides/getting-started/tackling-rate-limiting"},{"title":"Function Calling","href":"/guides/getting-started/function-calling"},{"title":"Image Generation","href":"/guides/getting-started/image-generation"},{"title":"Getting Started with AI Gateway","href":"/guides/getting-started/getting-started-with-ai-gateway"},{"title":"Llama 3 on Groq","href":"/guides/getting-started/llama-3-on-groq"},{"title":"Return Repeat Requests from Cache","href":"/guides/getting-started/return-repeat-requests-from-cache"},{"title":"Trigger Automatic Retries on LLM Failures","href":"/guides/getting-started/trigger-automatic-retries-on-llm-failures"},{"title":"101 on Portkey's Gateway Configs","href":"/guides/getting-started/101-on-portkey-s-gateway-configs"}]},{"group":"Integrations","pages":[{"title":"Overview","href":"/guides/integrations"},{"title":"Arize with Portkey: Multi-LLM Debate with Traces \u0026 Evals","href":"/guides/integrations/arize-portkey"},{"title":"Llama 3 on Portkey + Together AI","href":"/guides/integrations/llama-3-on-portkey-+-together-ai"},{"title":"Introduction to GPT-4o","href":"/guides/integrations/introduction-to-gpt-4o"},{"title":"Anyscale","href":"/guides/integrations/anyscale"},{"title":"Mistral","href":"/guides/integrations/mistral"},{"title":"Vercel AI","href":"/guides/integrations/vercel-ai"},{"title":"Deepinfra","href":"/guides/integrations/deepinfra"},{"title":"Groq","href":"/guides/integrations/groq"},{"title":"Langchain","href":"/guides/integrations/langchain"},{"title":"Mixtral 8x22b","href":"/guides/integrations/mixtral-8x22b"},{"title":"Segmind","href":"/guides/integrations/segmind"}]},{"group":"Use Cases","pages":[{"title":"Overview","href":"/guides/use-cases"},{"title":"Web Search for Any LLM in LibreChat","href":"/guides/use-cases/librechat-web-search"},{"title":"Few-Shot Prompting","href":"/guides/use-cases/few-shot-prompting"},{"title":"Enforcing JSON Schema with Anyscale \u0026 Together","description":"Get the LLM to adhere to your JSON schema using Anyscale \u0026 Together AI's newly introduced JSON modes","href":"/guides/use-cases/enforcing-json-schema-with-anyscale-and-together"},{"title":"Detecting Emotions with GPT-4o","href":"/guides/use-cases/emotions-with-gpt-4o"},{"title":"Build an article suggestion app with Supabase pgvector, and Portkey","description":" Consider that you have list of support articles that you want to suggest it to users when users search for it. You want to suggest as best fit as possible. With the availability of tools like Large Language Model (LLMs) and Vector Databases, the approach towards suggestions \u0026 recommendation systems has significantly evolved.","href":"/guides/use-cases/build-an-article-suggestion-app-with-supabase-pgvector-and-portkey"},{"title":"Setting up resilient Load balancers with failure-mitigating Fallbacks","href":"/guides/use-cases/setting-up-resilient-load-balancers-with-failure-mitigating-fallbacks"},{"title":"Combining Routing Strategies: Conditional, Load Balancing \u0026 Fallbacks","href":"/guides/use-cases/combining-routing-strategies"},{"title":"Run Portkey on Prompts from Langchain Hub","href":"/guides/use-cases/run-portkey-on-prompts-from-langchain-hub"},{"title":"Smart Fallback with Model-Optimized Prompts","href":"/guides/use-cases/smart-fallback-with-model-optimized-prompts"},{"title":"How to use OpenAI SDK with Portkey Prompt Templates","href":"/guides/use-cases/how-to-use-openai-sdk-with-portkey-prompt-templates"},{"title":"Setup OpenAI -> Azure OpenAI Fallback","href":"/guides/use-cases/setup-openai-greater-than-azure-openai-fallback"},{"title":"Fallback from SDXL to Dall-e-3","href":"/guides/use-cases/fallback-from-sdxl-to-dall-e-3"},{"title":"Comparing Top10 LMSYS Models with Portkey","href":"/guides/use-cases/comparing-top10-lmsys-models-with-portkey"},{"title":"Request metadata use cases","href":"/guides/use-cases/metadata-use-cases"},{"title":"Tracking LLM Costs Per User with Portkey","href":"/guides/use-cases/track-costs-using-metadata"},{"title":"Enforcing Budget, Token \u0026 Rate Limits: Use Cases","href":"/guides/use-cases/enforcing-limits-and-budgets"},{"title":"Comparing DeepSeek Models Against OpenAI, Anthropic \u0026 More Using Portkey","href":"/guides/use-cases/deepseek-r1"},{"title":"Portkey with OpenAI Computer Use","href":"/guides/use-cases/openai-computer-use"},{"title":"Using Private MCP Servers with Responses API","href":"/guides/use-cases/private-mcp-servers"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/2025/may"}]},{"tab":"Help articles","pages":[{"title":"Help articles","href":"/help-center/you-do-not-have-enough-permissions"}]}]}]},"title":"Detecting Emotions with GPT-4o - Portkey (Prisma AIRS AI Gateway) Docs","buildId":"dpl_BtCp1ySSRiZuC61kdwjLNfcZF9iT","deploymentId":"dpl_BtCp1ySSRiZuC61kdwjLNfcZF9iT","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DPnff9jl.js","DynamicMarkdown-CSxQrJZZ.js","zoom-image-lightbox-BMB-XSWA.js","lightbox-handle-r17bVUz3.js"]}