CINXE.COM

Sentiment Analysis — Deepgram | Documentation

<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preload" href="/api/fern-docs/search/v1/key" as="fetch" crossorigin="anonymous"/><link rel="preload" href="/api/fern-docs/auth/api-key-injection" as="fetch" crossorigin="anonymous"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><title>Sentiment Analysis — Deepgram | Documentation</title><meta name="robots" content="index,follow"/><meta name="description" content="Sentiment Analysis recognizes sentiment throughout the inputed text."/><meta name="theme-color" content="#1a1a1f"/><meta property="og:title" content="Sentiment Analysis — Deepgram | Documentation"/><meta property="og:description" content="Sentiment Analysis recognizes sentiment throughout the inputed text."/><meta property="og:url" content="https://developers.deepgram.com/docs/text-sentiment-analysis"/><meta property="og:site_name" content="Deepgram | Documentation"/><link rel="canonical" href="https://developers.deepgram.com/docs/text-sentiment-analysis"/><meta name="generator" content="buildwithfern.com"/><link rel="icon" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/favicon.ico" crossorigin="anonymous"/><link rel="preload" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/Inter.woff2" as="font" type="font/woff2" crossorigin="anonymous"/><link rel="preload" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/FiraMono.woff2" as="font" type="font/woff2" crossorigin="anonymous"/><link rel="preload" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/Roobert.woff2" as="font" type="font/woff2" crossorigin="anonymous"/><script type="application/ld+json" id="jsonld-breadcrumb">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Deepgram | Documentation","item":"https://developers.deepgram.com/"},{"@type":"ListItem","position":2,"name":"Intelligence","item":"https://developers.deepgram.com/intelligence"},{"@type":"ListItem","position":3,"name":"Text Intelligence","item":"https://developers.deepgram.com/intelligence/text-intelligence"},{"@type":"ListItem","position":4,"name":"Sentiment Analysis","item":"https://developers.deepgram.com/docs/text-sentiment-analysis"}]}</script><link rel="preload" href="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/logo.svg" as="image" fetchpriority="high"/><meta name="next-head-count" content="20"/><link href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css" rel="stylesheet"/><script id="theme-script" data-nscript="beforeInteractive">(e=>{let t=document.documentElement;function n(e){t.classList.remove("light","dark"),t.classList.add(e),t.style.colorScheme=e}if(1===e.length)n(e[0]);else try{let t=localStorage.getItem("theme")??"system",r=e.length>0&&"system"===t?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t;n(r)}catch{}})(["dark"])</script><link rel="preload" href="https://app.ferndocs.com/_next/static/css/b5ef68ada6ac4b07.css?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" as="style"/><link rel="stylesheet" href="https://app.ferndocs.com/_next/static/css/b5ef68ada6ac4b07.css?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" data-n-g=""/><link rel="preload" href="https://app.ferndocs.com/_next/static/css/80bca615e6d01b34.css?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" as="style"/><link rel="stylesheet" href="https://app.ferndocs.com/_next/static/css/80bca615e6d01b34.css?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="https://app.ferndocs.com/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script src="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/dist/output.js" type="module" defer="" data-nscript="beforeInteractive"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/8494.89309af69f67ac9d.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/7191.7664a652cf78e25c.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/45bb0db8.463a392675fecfb0.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/92e66809.393f81705c519a34.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/118f301d.0a7382916ef4ac18.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/52d2be3c.b954481fe5a6d824.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/f29dc6a8.0d3c3c8683df2eda.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/6003.c51da136c4cdc4e2.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/8950.bc07b3e1c13f1432.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/5717.a121432bdbac2575.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/3970.c2fe78b12d70f6c5.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/600.9e9db95b2c541679.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/3551.f273dcadace15afb.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/f136264b.fe05aaa57e22d479.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/4217.08fff909190d4e30.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/2729.42c77bdb2d91a65d.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/9042.326e31070d76df17.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/8326.bde182ef6c372b2f.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/6318.58ee0f53c459a73e.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/8508.7a6ed07aa65989af.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/5119.7fbcb17fea114486.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/5438.9dfc11fa11c8ee42.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/6770.7f324a0184155c4e.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/7708.bec065f6e20bb795.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/a20b1002.4488a96695dd3fd2.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/5653.ba43092f7e682928.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/4471.ccd5aeba70bc8ffb.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/7679.47196e74655aa33f.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/4938.1396ed581cf45ffd.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/1017.33e29a306ce9b285.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/3543.329adf52c784d779.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script defer="" src="https://app.ferndocs.com/_next/static/chunks/7575.924e50684a873f53.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt"></script><script src="https://app.ferndocs.com/_next/static/chunks/webpack-08f362e6cd5268e7.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/framework-66d89474ad83799b.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/main-8bc5002bdb8afd00.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/pages/_app-817872fd2c495d6b.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/2709-cda5da4a8db8de58.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/6053-736813b84433ca4a.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/chunks/pages/static/%5Bdomain%5D/%5B%5B...slug%5D%5D-31f428dae64597dc.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/jigMgAOOAbh4GA_fJkAR-/_buildManifest.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><script src="https://app.ferndocs.com/_next/static/jigMgAOOAbh4GA_fJkAR-/_ssgManifest.js?dpl=dpl_4QpQ8NTiUGorrHCFa7JoGjuJyFCt" defer=""></script><style id="__jsx-1674942132"> :root { --typography-body-font-family: 'Inter', -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif; --typography-heading-font-family: 'Roobert', -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif; --typography-code-font-family: 'FiraMono', ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace; --spacing-page-width: 100%; --spacing-content-width: 44rem; --spacing-content-wide-width: 66.5rem; --spacing-sidebar-width: 18rem; --spacing-header-height: 6.75rem; --spacing-header-height-padded: 5rem; --spacing-header-height-real: 4rem; --grayscale-1: var(--mauve-1); --grayscale-2: var(--mauve-2); --grayscale-3: var(--mauve-3); --grayscale-4: var(--mauve-4); --grayscale-5: var(--mauve-5); --grayscale-6: var(--mauve-6); --grayscale-7: var(--mauve-7); --grayscale-8: var(--mauve-8); --grayscale-9: var(--mauve-9); --grayscale-10: var(--mauve-10); --grayscale-11: var(--mauve-11); --grayscale-12: var(--mauve-12); --grayscale-a1: var(--mauve-a1); --grayscale-a2: var(--mauve-a2); --grayscale-a3: var(--mauve-a3); --grayscale-a4: var(--mauve-a4); --grayscale-a5: var(--mauve-a5); --grayscale-a6: var(--mauve-a6); --grayscale-a7: var(--mauve-a7); --grayscale-a8: var(--mauve-a8); --grayscale-a9: var(--mauve-a9); --grayscale-a10: var(--mauve-a10); --grayscale-a11: var(--mauve-a11); --grayscale-a12: var(--mauve-a12); --accent-1: #f7f7f9; --accent-2: #f1f3f9; --accent-3: #e8ebf7; --accent-4: #dde2f9; --accent-5: #d0d7f8; --accent-6: #c0c8f3; --accent-7: #abb5eb; --accent-8: #8f9be2; --accent-9: #7783f7; --accent-10: #6c77e9; --accent-11: #5158c3; --accent-12: #282c5f; --accent-a1: #7a3b7c04; --accent-a2: #1734c309; --accent-a3: #0926c312; --accent-a4: #0327ea1d; --accent-a5: #0126e92a; --accent-a6: #0322d93b; --accent-a7: #011ec950; --accent-a8: #011cc16d; --accent-a9: #0217f486; --accent-a10: #0214dc91; --accent-a11: #020ca8ad; --accent-a12: #010642d7; --accent-surface: #eff1f9cc; --gray-surface: #ffffffcc; --accent: 119, 131, 247; --accent-aa: 81, 96, 245; --accent-aaa: 32, 52, 243; --accent-tinted: 143, 153, 248; --background: 249, 250, 251; --accent-contrast: rgb(255, 255, 255); --bg-color-card: rgba(255, 255, 255, 0.7); --sidebar-background: transparent; --header-background: transparent; --border: var(--grayscale-a4); --border-concealed: var(--grayscale-a2); --body-text: 0, 0, 0; --body-text-inverted: 255, 255, 255; } @media (max-width: 1024px) { :root { --spacing-header-height: 6.75rem; --spacing-header-height-padded: 5rem; } } :is(.dark) { --grayscale-1: var(--gray-1); --grayscale-2: var(--gray-2); --grayscale-3: var(--gray-3); --grayscale-4: var(--gray-4); --grayscale-5: var(--gray-5); --grayscale-6: var(--gray-6); --grayscale-7: var(--gray-7); --grayscale-8: var(--gray-8); --grayscale-9: var(--gray-9); --grayscale-10: var(--gray-10); --grayscale-11: var(--gray-11); --grayscale-12: var(--gray-12); --grayscale-a1: var(--gray-a1); --grayscale-a2: var(--gray-a2); --grayscale-a3: var(--gray-a3); --grayscale-a4: var(--gray-a4); --grayscale-a5: var(--gray-a5); --grayscale-a6: var(--gray-a6); --grayscale-a7: var(--gray-a7); --grayscale-a8: var(--gray-a8); --grayscale-a9: var(--gray-a9); --grayscale-a10: var(--gray-a10); --grayscale-a11: var(--gray-a11); --grayscale-a12: var(--gray-a12); --accent-1: #050d0a; --accent-2: #0f1a15; --accent-3: #092d21; --accent-4: #003d29; --accent-5: #004b34; --accent-6: #005a40; --accent-7: #006b4d; --accent-8: #00805b; --accent-9: #a1f9d4; --accent-10: #97efca; --accent-11: #66cfa6; --accent-12: #9df5d0; --accent-a1: #00b50003; --accent-a2: #4bfb9c10; --accent-a3: #00fca124; --accent-a4: #00fc9735; --accent-a5: #00ffa543; --accent-a6: #00feac53; --accent-a7: #00fdb165; --accent-a8: #00fdb07b; --accent-a9: #a5ffd9f9; --accent-a10: #a0fed6ef; --accent-a11: #7dffcccd; --accent-a12: #a3ffd8f5; --accent-surface: color(display-p3 0.0863 0.1569 0.1255 / 0.5); --gray-surface: color(display-p3 0 0 0 / 5%); --accent: 161, 249, 212; --accent-aa: 161, 249, 212; --accent-aaa: 161, 249, 212; --accent-tinted: 185, 251, 223; --background: 11, 11, 12; --accent-contrast: rgb(11, 40, 29); --bg-color-card: rgb(26, 26, 31); --bg-color-card-solid: rgb(26, 26, 31); --sidebar-background: rgb(11, 11, 12); --header-background: rgb(26, 26, 31); --border: rgb(44, 44, 51); --border-concealed: rgb(44, 44, 51); --body-text: 255, 255, 255; --body-text-inverted: 0, 0, 0; } @font-face { font-family: 'Inter'; src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/Inter.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; } @font-face { font-family: 'Roobert'; src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/Roobert.woff2') format('woff2'); font-weight: 600 900; font-style: normal; font-display: swap; } @font-face { font-family: 'FiraMono'; src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/FiraMono.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; } html { background-color: #f9fafb; } html.dark { background-color: #0b0b0c; } .fern-button.filled { background: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important; } .fern-header-tab-button[data-state=active] { color: white !important; } .fern-header-tab-button[data-state=active]:after { background: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important; height: 2px !important; } .fern-header-tab-button { padding-left: 24px !important; padding-right: 24px !important; } @media (max-width: 1350px) { .fern-header-tab-button { padding-left: 16px !important; padding-right: 16px !important; } } @media (max-width: 1185px) { .fern-header-tab-button { padding-left: 12px !important; padding-right: 12px !important; } } @media (max-width: 1100px) { .fern-header-tab-button { padding-left: 8px !important; padding-right: 8px !important; } } .fern-mdx-link { color: #79affa !important; text-decoration: none; } .fern-mdx-link svg { color: #79affa !important; } .white .fern-card span { background: white !important; } @media (min-width: 1024px) { .fern-header-right-menu { display: none !important; } } .banner { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; } .banner p { margin-top: .25rem; margin-bottom: .25rem; } .banner h1 { margin-top: .5rem; margin-bottom: 16px; } .fern-sidebar-link-container[data-state="active"] { color: white !important; } .fern-sidebar-link-text { font-size: 16px !important; } .fern-sidebar-link-container[data-state=active] .fern-sidebar-link-indent:after { border: 0px !important; } .fern-sidebar-link-container[data-state="active"] .fern-sidebar-link { background-color: #232329 !important; } .fern-sidebar-link-container[data-state="active"] .fern-sidebar-link:after { background: linear-gradient(177.85deg, #201CFF -102.27%, #13EF95 101.45%) !important; width: 1px !important; position: absolute !important; content: "" !important; right: 0 !important; top: 0 !important; bottom: 0 !important; border-radius: 8px !important; } .fern-sidebar-link { border-radius: 0 !important; } .fern-sidebar-link-content { padding-left: 1rem !important; padding-right: 1rem !important; padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; } .fern-sidebar-content { padding-left: 0 !important; padding-right: 0 !important; } @media (min-width: 1024px) { .fern-sidebar-container:not(.fern-sidebar-fixed) { padding-left: 0rem !important; } } .fern-header-tab-button span { font-weight: 700 !important; font-size: 16px !important; line-height: 17.5px !important; letter-spacing: 2% !important; } .fern-search-bar { --tw-ring-color: #4E4E52 !important; background-color: #0B0B0C !important; } .fern-sidebar-heading-content, .fern-sidebar-link-container .font-semibold .fern-sidebar-link-text { font-weight: 700 !important; font-size: 14px !important; line-height: 17.5px !important; letter-spacing: 2% !important; color: #A1F9D4 !important; } .fern-breadcrumb-item { color: var(--grayscale-a11) !important; font-weight: 400 !important; } button[role="tab"][data-state="active"] { background-color: #1A1A1F !important; } button[role="tab"][data-state="active"]:after { background: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important; height: 2px !important; position: absolute !important; content: "" !important; right: 0 !important; left: 0 !important; bottom: 0 !important; } button[role="tab"] { box-shadow: none !important; position: relative !important; } button[role="tab"]:hover span { background-color: #1A1A1F !important; } div[class*="callout"] { border-left-width: 2px !important; border-color: var(--tw-ring-color) !important; } .fern-search-bar, .callout-outlined, .fern-card .fern-button { border-radius: 8px !important; } .bg-tag-default-soft { background-color: #28282B !important; } .code-block-root span[style*="color: rgb(194, 195, 197);"] { --shiki-dark: #949498 !important; } .callout-outlined { background-color: #1D2A34 !important; --tw-ring-color: #149AFB !important; } .callout-outlined-warning { background-color: #342D1E !important; --tw-ring-color: #FEC84B !important; } .callout-outlined p, .callout-outlined h5, .callout-outlined-warning p, .callout-outlined-warning h5, .callout-outlined-success p, .callout-outlined-success h5, .callout-outlined-danger p, .callout-outlined-danger h5, .callout-outlined-info p, .callout-outlined-info h5, .callout-outlined-tip p, .callout-outlined-tip h5, .callout-outlined-primary p, .callout-outlined-primary h5, .callout-outlined-check p, .callout-outlined-check h5, .callout-outlined-secondary p { color: var(--grayscale-a11) !important; } div[class*="callout"] .mt-0\.5.w-4 { align-self: center !important; } span[data-badge-type="http-method"], span[data-badge-type="status-code"] { border-radius: 50px !important; } .dg-badge { margin-right: 6px !important; color: #bbbbbf !important; padding: 1px 1px !important; text-decoration: none !important; border-radius: 4px !important; background-origin: border-box !important; background-image: linear-gradient(90deg, #201cff -91.5%, #13ef95 80.05%); display: flex; align-items: center; justify-content: center; width: fit-content; height: fit-content; } .dg-badge span { background-color: #1A1A1F !important; padding: 4px 12px !important; border-radius: 4px !important; display: flex; align-items: center; justify-content: center; } .dg-badge .fa-icon { background: linear-gradient(90deg, #201cff -91.5%, #13ef95 80.05%); margin-right: 4px !important; } .fern-card { background-color: #0B0B0C !important; border-radius: 8px !important; } ol li { margin-top: 2rem !important; } .small .fern-card { padding-bottom: 1rem !important; padding-top: 1rem !important; } .small .fern-card .items-start { align-items: center !important; } .small .fern-card .text-base { color: #BBBBBF !important; font-weight: 600 !important; } .fern-card h3 { margin-top: 0px !important; } .fern-sidebar-tabs { padding-left: 10px !important; } .fern-sidebar-heading { padding-left: 28px !important; } .api-playground-call { width: fit-content !important; height: fit-content !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 1px !important; border-radius: 4px !important; background-image: linear-gradient(82.38deg, #ff2eea -99.24%, #4b3cff 99.26%) !important; width: 100% !important; margin-top: 1rem !important; } .api-playground-call span:first-child { display: flex !important; align-items: center !important; gap: 12px !important; background-color: #1A1A1F !important; padding: 4px !important; border-radius: 4px !important; width: 100% !important; flex-direction: row !important; } .api-playground-call p { margin: 0 !important; display: flex !important; align-items: center !important; white-space: nowrap !important; } .api-playground-call p div:first-child { display: inline-flex !important; align-items: center !important; } .api-playground-call img { width: 2.5rem !important; height: 2.5rem !important; display: inline-block !important; margin-top: 4px !important; margin-bottom: 4px !important; transform: scaleX(-1) !important; } .invert-white { filter: invert(1) !important; } .fa-icon, .card-icon { width: 2rem !important; height: 2rem !important; } .dg-badge .fa-icon { width: 1rem !important; height: 1rem !important; } .fern-header, .fern-header-tabs { border-bottom-width: 0px !important; } .fern-header-tabs-list-item span { font-family: 'Roobert' !important; } .fern-header-tabs-list, .fern-header-tabs-list-item { height: 100% !important; } .fern-sidebar-link-indent { margin-left: 20px !important; } .fern-sidebar-link-container[data-state=inactive] .fern-sidebar-link:hover { color: #FBFBFF !important; } .t-muted:is(.dark *) { color: #949498 !important; } .dark\:prose-invert:is(.dark *) { --tw-prose-headings: #FBFBFF !important; color: #E1E1E5 !important; } .fern-page-heading * { color: #FBFBFF !important; } .badge a { text-decoration: none !important; color: unset !important; } .badge svg { display: none !important; } .dep { background: #bbbbbf !important; } .dep .fa-icon { background: #bbbbbf !important; } .dep span { text-decoration: line-through !important; } .pink { background-image: linear-gradient(85deg, #ee028b 5.66%, #ae29ff 99.14%) !important; } .pink .fa-icon { background: linear-gradient(85deg, #ee028b 5.66%, #ae29ff 99.14%) !important; } #fern-header { padding-top: 3rem !important; } .fern-sidebar-container { position: sticky !important; top: 0 !important; margin-top: 10rem !important; overflow-y: auto !important; z-index: 20 !important; height: 100vh !important; } .fern-main { margin-top: calc(var(--header-offset, 0) + 3rem) !important; } .fern-endpoint-content-right .fa-icon, .fern-dropdown-item .fa-icon { width: 1rem !important; height: 1rem !important; } .fern-endpoint-content { padding-top: 3rem !important; } #fern-header { position: absolute !important; } div[id="/reference/speech-to-text-api/listen#request"] .flex.flex-col div:nth-of-type(4) span:nth-of-type(2) { display: none !important; } div[id="/reference/speech-to-text-api/listen#request"] .flex.flex-col div:nth-of-type(4) span:nth-of-type(1):after { content: " binary" !important; color: #949498 !important; font-size: .75rem; line-height: 1rem; font-family: 'Inter' !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); margin-left: .5rem; } #fern-header { position: absolute !important; } .fern-sidebar-fixed+.fern-main { padding-left: 0px !important; } .api-playground-call a { padding-left: 4px !important; padding-right: 4px !important; color: #79affa !important; text-decoration: none !important; } *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.tw-absolute{position:absolute}.tw-relative{position:relative}.tw-inset-x-0{left:0;right:0}.tw-top-0{top:0}.tw-z-30{z-index:30}.tw-mx-auto{margin-left:auto;margin-right:auto}.tw-flex{display:flex}.tw-w-full{width:100%}.tw-max-w-\[var\(--spacing-page-width\)\]{max-width:var(--spacing-page-width)}.tw-items-center{align-items:center}.tw-justify-end{justify-content:flex-end}.tw-gap-2{gap:.5rem}.tw-gap-3{gap:.75rem}.tw-rounded-md{border-radius:.375rem}.tw-bg-\[\#232329\]{--tw-bg-opacity: 1;background-color:rgb(35 35 41 / var(--tw-bg-opacity))}.tw-px-3{padding-left:.75rem;padding-right:.75rem}.tw-px-4{padding-left:1rem;padding-right:1rem}.tw-py-2{padding-top:.5rem;padding-bottom:.5rem}.tw-text-\[\#BBBBBF\]{--tw-text-opacity: 1;color:rgb(187 187 191 / var(--tw-text-opacity))}.tw-backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#fern-header a{font-size:16px!important;font-family:Inter,sans-serif!important}@media (min-width: 768px){.md\:tw-px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 1024px){.lg\:tw-px-8{padding-left:2rem;padding-right:2rem}} </style><style id="__jsx-1533687371">:root{ --header-offset: 108px}@media(max-width:1024px){:root{--header-offset:64px}}</style></head><body class="antialiased"><div id="__next"><div class="fern-background dark:from-transparent"></div><div id="fern-docs" class="fern-container fern-theme-default"><header id="fern-header" role="banner"><div class="fern-header-container width-before-scroll-bar has-background-dark" data-border="hide"><div class="clipped-background"><div class="h-screen opacity-60 dark:opacity-80 fern-background dark:from-transparent"></div></div><div class="fern-header"><nav aria-label="primary" class="fern-header-content max-w-page-width mx-auto"><div class="relative flex h-full min-w-fit flex-1 shrink-0 items-center gap-2 py-1"><div class="flex items-center gap-2"><a href="/"><div class="fern-logo-container"><img alt="Deepgram | Documentation" fetchpriority="high" loading="eager" width="176" height="25" decoding="async" data-nimg="1" class="fern-logo" style="color:transparent;aspect-ratio:7.04;height:24px;width:auto" src="https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/logo.svg"/></div></a></div></div><div class="fern-header-searchbar"><button id="fern-search-button" class="fern-search-bar w-full" disabled=""><span class="search-placeholder"><svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="size-icon-md"><path d="M17 17L21 21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>Search...</span></span><kbd class="keyboard-shortcut-hint">/</kbd></button></div><div class="fern-header-right-menu flex-1"><div class="lg-menu"><span class="fern-button-group"></span></div><div class="max-lg-menu"><button tabindex="0" disabled="" data-state="off" aria-disabled="true" data-selected="false" id="fern-search-button" class="max-sm:block fern-button minimal large disabled rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="!size-icon-md"><path d="M17 17L21 21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button><button tabindex="0" data-state="off" aria-disabled="false" class="fern-button minimal large rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="!size-icon-md"><path d="M3 5H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 12H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 19H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div></nav></div><nav aria-label="tabs" class="fern-header-tabs"><ul class="fern-header-tabs-list"><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/home/introduction"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Home</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/voice-agent"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Voice Agent</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/pre-recorded-audio"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Speech to Text</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/tts-rest"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Text to Speech</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="active" href="/docs/audio-intelligence"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Intelligence</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/reference/deepgram-api-overview"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">API Ref</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/make-your-first-api-request"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Guides</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/deepgram-sdks"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">SDKs</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/self-hosted-introduction"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Self-Hosted Deployments</span></div></a></li><li class="fern-header-tabs-list-item"><a class="fern-header-tab-button" data-state="inactive" href="/docs/security-policy"><div class="flex min-w-0 items-center justify-start space-x-2"><span class="truncate font-medium">Security</span></div></a></li></ul></nav></div></header><style> .fern-sidebar-container { border-right-width: 0px; border-left-width: 0px; } :is(.dark) .fern-sidebar-container { border-right-width: 1px; border-left-width: 1px; } </style><div class="fern-body"><nav aria-label="secondary" class="fern-sidebar-container desktop fern-sidebar-fixed"><div dir="ltr" class="fern-scroll-area flex-1" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport group/sidebar fern-sidebar-content" data-scrollbars="vertical" style="overflow-x:hidden;overflow-y:hidden"><div style="min-width:100%;display:table"><ul class="fern-sidebar-tabs lg:hidden"><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/home/introduction"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Home</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/voice-agent"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Voice Agent</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/pre-recorded-audio"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Speech to Text</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/tts-rest"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Text to Speech</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="active" href="/docs/audio-intelligence"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Intelligence</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/reference/deepgram-api-overview"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">API Ref</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/make-your-first-api-request"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Guides</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/deepgram-sdks"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">SDKs</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/self-hosted-introduction"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Self-Hosted Deployments</span></div></a></li><li><a class="min-h-[32px] lg:min-h-[36px] group/tab-button hover:t-accent flex min-w-0 flex-1 select-none items-center justify-start rounded-lg py-2 text-base group-hover/tab-button:transition lg:px-3 lg:text-sm data-[state=inactive]:t-muted data-[state=active]:t-accent" data-state="inactive" href="/docs/security-policy"><div class="flex min-w-0 items-center justify-start space-x-4"><div class="min-w-fit"><div class="bg-card-surface ring-border-default group-hover/tab-button:bg-tag-primary group-hover/tab-button:ring-accent/70 group-data-[state=active]/tab-button:bg-accent group-hover/tab-button:group-data-[state=active]/tab-button:bg-accent flex size-6 items-center justify-center rounded-md shadow-sm ring-1 group-data-[state=active]/tab-button:ring-0"><span class="bg-faded group-hover/tab-button:bg-accent group-data-[state=active]/tab-button:bg-background group-hover/tab-button:group-data-[state=active]/tab-button:bg-background size-4 fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span></div></div><span class="truncate font-medium group-data-[state=active]/tab-button:font-semibold">Security</span></div></a></li></ul><ul class="fern-sidebar-group"><li class="mt-6"><div class="fern-sidebar-heading"><span class="fern-sidebar-heading-content">Audio Intelligence</span></div><ul class="fern-sidebar-group"><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/audio-intelligence"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Getting Started</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/stt-intelligence-feature-overview"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Feature Overview</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/detect-entities"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Entity Detection</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/intent-recognition"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Intent Recognition</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/sentiment-analysis"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Sentiment Analysis</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/summarization"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Summarization</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/topic-detection"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Topic Detection</span></span></a></div></li></ul></li><li class="mt-6"><div class="fern-sidebar-heading"><span class="fern-sidebar-heading-content">Text Intelligence</span></div><ul class="fern-sidebar-group"><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/text-intelligence"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Getting Started</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/text-intelligence-feature-overview"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Feature Overview</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/text-intention-recognition"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Intent Recognition</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="active"><a class="fern-sidebar-link" href="/docs/text-sentiment-analysis"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Sentiment Analysis</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/text-summarization"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Summarization</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/text-topic-detection"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Topic Detection</span></span></a></div></li><li><div class="fern-sidebar-link-container" data-state="inactive"><a class="fern-sidebar-link" href="/docs/text-intelligence-callback"><span class="fern-sidebar-link-content"><span class="fern-sidebar-link-text">Text Intelligence Callback</span></span></a></div></li></ul></li></ul></div></div></div></nav><div class="fern-main"><main class="fern-guide-layout"><aside class="fern-layout-toc"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport px-4 pb-12 pt-8 lg:pr-8" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden"><div style="min-width:100%;display:table"><div class="text-grayscale-a11 m-0 mb-3 text-sm font-medium">On this page</div><ul class="toc-root not-prose" style="--height:0px;--top:0px"><li class="mb-2 last:mb-0" data-depth="0"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:0px" href="/docs/text-sentiment-analysis#enable-feature">Enable Feature</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/text-sentiment-analysis#basic-text-request">Basic Text Request</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/text-sentiment-analysis#basic-url-request">Basic URL Request</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/text-sentiment-analysis#query-parameters">Query Parameters</a></li><li class="mb-2 last:mb-0" data-depth="0"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:0px" href="/docs/text-sentiment-analysis#analyze-response">Analyze Response</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/text-sentiment-analysis#response-properties">Response Properties</a></li><li class="mb-2 last:mb-0" data-depth="0"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:0px" href="/docs/text-sentiment-analysis#api-error-responses">API Error Responses</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/text-sentiment-analysis#unsupported-language">Unsupported Language</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/text-sentiment-analysis#token-limit-exceeded">Token Limit Exceeded</a></li><li class="mb-2 last:mb-0" data-depth="1"><a class="block hyphens-auto break-words text-sm transition-colors hover:transition-none text-grayscale-a11 hover:text-grayscale-a12" style="padding-left:12px" href="/docs/text-sentiment-analysis#missing-query-parameter">Missing Query Parameter</a></li></ul></div></div></div></aside><article class="fern-layout-content max-w-content-width"><header class="mb-8"><div class="space-y-1"><div><span class="fern-breadcrumb"><a class="fern-breadcrumb-item" href="/docs/text-intelligence">Text Intelligence</a></span></div><h1 class="fern-page-heading"><p>Sentiment Analysis</p></h1></div><div class="prose-p:t-muted mt-2 leading-7"><p>Sentiment Analysis recognizes sentiment throughout the inputed text.</p></div></header><div class="prose dark:prose-invert prose-h1:mt-[1.5em] first:prose-h1:mt-0 max-w-full break-words"><p><code>sentiment</code> <em>boolean</em>   Default: <code>false</code></p> <a href="/docs/models-languages-overview" class="dg-badge pink"><span><span class="fa-icon" style="mask-image:url(&quot;https://icons.ferndocs.com/solid/language.svg&quot;);mask-repeat:no-repeat;mask-position:center center;-webkit-mask-image:url(&quot;https://icons.ferndocs.com/solid/language.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center center"></span> English (all available regions)</span></a> <div class="api-playground-call"><span><p><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><img src="https://res.cloudinary.com/deepgram/image/upload/v1717523786/devex/codey-greeting_rekqe1.svg" alt="Deepgram API Playground"/></span></span> Try this feature out in our <a class="fern-mdx-link" target="_blank" rel="noreferrer" href="https://playground.deepgram.com/?endpoint=read&amp;sentiment=true&amp;language=en">API Playground<svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="external-link-icon"><path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"></path></svg></a>!</p></span></div> <p>Sentiment Analysis accepts an input text, divides it into a list of segments comprised of sections of the text, and identifies the sentiment of each segment. It also assigns an average sentiment to the entire text.</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[&#x27;&#x27;] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">JSON</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>1</span></td><td class="code-block-line-content"><span class="line">&quot;results&quot;: {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>2</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiments&quot;: {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>3</span></td><td class="code-block-line-content"><span class="line"> &quot;segments&quot;: [</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>4</span></td><td class="code-block-line-content"><span class="line"> {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>5</span></td><td class="code-block-line-content"><span class="line"> &quot;text&quot;: &quot;Hi. Thank you for calling from premier phone services.&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>6</span></td><td class="code-block-line-content"><span class="line"> &quot;start_word&quot;: 0,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>7</span></td><td class="code-block-line-content"><span class="line"> &quot;end_word&quot;: 8,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>8</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment&quot;: &quot;positive&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>9</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment_score&quot;: 0.7380304336547852</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>10</span></td><td class="code-block-line-content"><span class="line"> },</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>11</span></td><td class="code-block-line-content"><span class="line"> {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>12</span></td><td class="code-block-line-content"><span class="line"> &quot;text&quot;: &quot;This call may be recorded for quality and training purposes.&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>13</span></td><td class="code-block-line-content"><span class="line"> &quot;start_word&quot;: 9,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>14</span></td><td class="code-block-line-content"><span class="line"> &quot;end_word&quot;: 18,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>15</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment&quot;: &quot;neutral&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>16</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment_score&quot;: 0.057771213352680206</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>17</span></td><td class="code-block-line-content"><span class="line"> }</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>18</span></td><td class="code-block-line-content"><span class="line"> ],</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>19</span></td><td class="code-block-line-content"><span class="line"> &quot;average&quot;: {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>20</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment&quot;: &quot;positive&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>21</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment_score&quot;: 0.39790084145285864</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>22</span></td><td class="code-block-line-content"><span class="line"> }</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <p>A <code>sentiment</code> of <code>positive</code>, <code>negative</code>, or <code>neutral</code> along with a <code>sentiment_score</code> is identified for each segment of the source text, and an <code>average</code> of the entire text’s sentiment is also provided along with the average <code>sentiment_score</code>.</p> <div class="mb-6 mt-4 rounded-lg p-4 first:mt-0 callout-outlined"><div class="flex items-start space-x-3"><div class="mt-0.5 w-4"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="text-intent-default size-icon-md"><path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="prose prose-sm dark:prose-invert -my-4 flex-1 overflow-x-auto before:mb-4 before:block after:mt-4 after:block"><div class="text-intent-default"><h5 class="leading-snug"></h5><p>The break point for a <code>sentiment_score</code> becoming positive or negative is <code>+-0.333333333...</code>.</p></div></div></div></div> <h2 id="enable-feature" data-state="closed">Enable Feature</h2> <p>To enable Sentiment, use the following parameter in the query string when you call Deepgram’s <code>/read</code> endpoint:</p> <p><code>sentiment=true</code></p> <h3 id="basic-text-request" data-state="closed">Basic Text Request</h3> <p>To analyze text from a file on your computer, run the following curl command in a terminal or your favorite API client.</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[&#x27;&#x27;] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">cURL</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>$</span></td><td class="code-block-line-content"><span class="line">curl -vX POST \</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>&gt;</span></td><td class="code-block-line-content"><span class="line"> -H &quot;Authorization: Token YOUR_DEEPGRAM_API_KEY&quot; \</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>&gt;</span></td><td class="code-block-line-content"><span class="line"> -H &quot;Content-Type: application/json&quot; \</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>&gt;</span></td><td class="code-block-line-content"><span class="line"> -d &#x27;{&quot;text&quot;: &quot;YOUR_TEXT_INPUT&quot;}&#x27; \</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>&gt;</span></td><td class="code-block-line-content"><span class="line"> &quot;https://api.deepgram.com/v1/read?sentiment=true&amp;language=en&quot;</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <div class="mb-6 mt-4 rounded-lg p-4 first:mt-0 callout-outlined-warning"><div class="flex items-start space-x-3"><div class="mt-0.5 w-4"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="size-icon-md text-intent-warning"><path d="M18 8.4C18 6.70261 17.3679 5.07475 16.2426 3.87452C15.1174 2.67428 13.5913 2 12 2C10.4087 2 8.88258 2.67428 7.75736 3.87452C6.63214 5.07475 6 6.70261 6 8.4C6 15.8667 3 18 3 18H21C21 18 18 15.8667 18 8.4Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M13.73 21C13.5542 21.3031 13.3019 21.5547 12.9982 21.7295C12.6946 21.9044 12.3504 21.9965 12 21.9965C11.6496 21.9965 11.3054 21.9044 11.0018 21.7295C10.6982 21.5547 10.4458 21.3031 10.27 21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="prose prose-sm dark:prose-invert -my-4 flex-1 overflow-x-auto before:mb-4 before:block after:mt-4 after:block"><div class="text-intent-warning"><h5 class="leading-snug"></h5><p>Replace <code>YOUR_DEEPGRAM_API_KEY</code> with your <a class="fern-mdx-link" target="_blank" rel="noreferrer" href="https://console.deepgram.com/signup?jump=keys">Deepgram API Key<svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="external-link-icon"><path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"></path></svg></a>.</p></div></div></div></div> <h3 id="basic-url-request" data-state="closed">Basic URL Request</h3> <p>To analyze text from a hosted file, run the following curl command in a terminal or your favorite API client. (Try testing it out with the hosted file <a class="fern-mdx-link" target="_blank" rel="noreferrer" href="https://static.deepgram.com/examples/aura.txt">https://static.deepgram.com/examples/aura.txt<svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="external-link-icon"><path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"></path></svg></a>.)</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[&#x27;&#x27;] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">cURL</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>$</span></td><td class="code-block-line-content"><span class="line">curl -vX POST \</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>&gt;</span></td><td class="code-block-line-content"><span class="line"> -H &quot;Authorization: Token YOUR_DEEPGRAM_API_KEY&quot; \</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>&gt;</span></td><td class="code-block-line-content"><span class="line"> -H &quot;Content-Type: application/json&quot; \</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>&gt;</span></td><td class="code-block-line-content"><span class="line"> -d &#x27;{&quot;url&quot;: &quot;https://YOUR_FILE_URL.txt&quot;}&#x27; \</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>&gt;</span></td><td class="code-block-line-content"><span class="line"> &quot;https://api.deepgram.com/v1/read?sentiment=true&amp;language=en&quot;</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <div class="mb-6 mt-4 rounded-lg p-4 first:mt-0 callout-outlined"><div class="flex items-start space-x-3"><div class="mt-0.5 w-4"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="text-intent-default size-icon-md"><path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="prose prose-sm dark:prose-invert -my-4 flex-1 overflow-x-auto before:mb-4 before:block after:mt-4 after:block"><div class="text-intent-default"><h5 class="leading-snug"></h5><p>Read our <a class="fern-mdx-link" href="/docs/text-intelligence">Text Intelligence Getting Started guide</a>, which will walk you through making a basic text request and a basic URL request with the Deepgram SDKs.</p></div></div></div></div> <h3 id="query-parameters" data-state="closed">Query Parameters</h3> <div class="fern-table-root not-prose" data-state="closed"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden"><div style="min-width:100%;display:table"><table class="fern-table"><thead><tr><th>Parameter</th><th>Values</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>sentiment</code></td><td><code>true</code></td><td>boolean</td><td>Enables Sentiment Analysis</td></tr><tr><td><code>language</code></td><td><code>en</code></td><td>string</td><td>The language of your input text (Only English is supported at this time.)</td></tr></tbody></table></div></div></div></div> <h2 id="analyze-response" data-state="closed">Analyze Response</h2> <p>When the file is finished processing, you’ll receive a JSON response that has the following basic structure:</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[&#x27;&#x27;] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">JSON</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>1</span></td><td class="code-block-line-content"><span class="line">{</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>2</span></td><td class="code-block-line-content"><span class="line"> &quot;metadata&quot;: {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>3</span></td><td class="code-block-line-content"><span class="line"> &quot;request_id&quot;: &quot;7dcd719f-344b-4c72-a194-6bd1019d855c&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>4</span></td><td class="code-block-line-content"><span class="line"> &quot;created&quot;: &quot;2023-12-01T15:54:39.681Z&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>5</span></td><td class="code-block-line-content"><span class="line"> &quot;language&quot;: &quot;en&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>6</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment_info&quot;: {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>7</span></td><td class="code-block-line-content"><span class="line"> &quot;model_uuid&quot;: &quot;80ab3179-d113-4254-bd6b-4a2f96498695&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>8</span></td><td class="code-block-line-content"><span class="line"> &quot;input_tokens&quot;: 22,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>9</span></td><td class="code-block-line-content"><span class="line"> &quot;output_tokens&quot;: 22</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>10</span></td><td class="code-block-line-content"><span class="line"> }</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>11</span></td><td class="code-block-line-content"><span class="line"> },</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>12</span></td><td class="code-block-line-content"><span class="line"> &quot;results&quot;: {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>13</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiments&quot;: {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>14</span></td><td class="code-block-line-content"><span class="line"> &quot;segments&quot;: [</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>15</span></td><td class="code-block-line-content"><span class="line"> {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>16</span></td><td class="code-block-line-content"><span class="line"> &quot;text&quot;: &quot;Hi. Thank you for calling from premier phone services.&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>17</span></td><td class="code-block-line-content"><span class="line"> &quot;start_word&quot;: 0,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>18</span></td><td class="code-block-line-content"><span class="line"> &quot;end_word&quot;: 8,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>19</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment&quot;: &quot;positive&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>20</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment_score&quot;: 0.7380304336547852</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>21</span></td><td class="code-block-line-content"><span class="line"> },</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>22</span></td><td class="code-block-line-content"><span class="line"> {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>23</span></td><td class="code-block-line-content"><span class="line"> &quot;text&quot;: &quot;This call may be recorded for quality and training purposes.&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>24</span></td><td class="code-block-line-content"><span class="line"> &quot;start_word&quot;: 9,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>25</span></td><td class="code-block-line-content"><span class="line"> &quot;end_word&quot;: 18,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>26</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment&quot;: &quot;neutral&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>27</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment_score&quot;: 0.057771213352680206</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>28</span></td><td class="code-block-line-content"><span class="line"> }</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>29</span></td><td class="code-block-line-content"><span class="line"> ],</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>30</span></td><td class="code-block-line-content"><span class="line"> &quot;average&quot;: {</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>31</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment&quot;: &quot;positive&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>32</span></td><td class="code-block-line-content"><span class="line"> &quot;sentiment_score&quot;: 0.39790084145285864</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>33</span></td><td class="code-block-line-content"><span class="line"> }</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>34</span></td><td class="code-block-line-content"><span class="line"> }</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>35</span></td><td class="code-block-line-content"><span class="line"> }</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>36</span></td><td class="code-block-line-content"><span class="line">}</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <div class="mb-6 mt-4 rounded-lg p-4 first:mt-0 callout-outlined"><div class="flex items-start space-x-3"><div class="mt-0.5 w-4"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="text-intent-default size-icon-md"><path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></div><div class="prose prose-sm dark:prose-invert -my-4 flex-1 overflow-x-auto before:mb-4 before:block after:mt-4 after:block"><div class="text-intent-default"><h5 class="leading-snug"></h5><p>Use the <a class="fern-mdx-link" href="/reference/pre-recorded">API reference</a> or the <a class="fern-mdx-link" target="_blank" rel="noreferrer" href="https://playground.deepgram.com/">API Playground<svg width="1.5em" height="1.5em" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="external-link-icon"><path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"></path></svg></a> to view the detailed response.</p></div></div></div></div> <p>The <code>sentiment</code> values added to objects are:</p> <ul class="mb-3 list-outside list-disc space-y-2"> <li class=""><code>sentiment</code>: The sentiment of the associated text (<code>positive</code> | <code>negative</code> | <code>neutral</code>).</li> <li class=""><code>sentiment_score</code>: A floating point value between -1 and 1 representing the sentiment of the associated span of text, with -1 being the most negative sentiment, and 1 being the most positive sentiment.</li> </ul> <hr/> <h3 id="response-properties" data-state="closed">Response Properties</h3> <div class="fern-table-root not-prose" data-state="closed"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden"><div style="min-width:100%;display:table"><table class="fern-table"><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>sentiments.segments</code></td><td>Spans of text covering your entire input text that show when the sentiment shifts throughout the text.</td></tr><tr><td><code>sentiments.segments[i].sentiment</code></td><td>A rating for the given span of text. Can be either <code>positive</code>, <code>neutral</code>, or <code>negative</code>.</td></tr><tr><td><code>sentiments.segments[i].sentiment_score</code></td><td>A floating point value between -1 and 1 representing the sentiment of the associated span of text, with -1 being the most negative sentiment, and 1 being the most positive sentiment.</td></tr><tr><td><code>sentiments.average</code></td><td>The average sentiment for the entire text.</td></tr></tbody></table></div></div></div></div> <h2 id="api-error-responses" data-state="closed">API Error Responses</h2> <h3 id="unsupported-language" data-state="closed">Unsupported Language</h3> <p><strong class="font-semibold">Status</strong> 400</p> <p>If you request Sentiment Analysis with an unsupported language by specifying a language code such as <code>sentiment=true&amp;language=es</code> or <code>sentiment=true&amp;detect_language=true</code> where the detected language is unsupported, you will get the error message below.</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[&#x27;&#x27;] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">JSON</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>1</span></td><td class="code-block-line-content"><span class="line">{</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>2</span></td><td class="code-block-line-content"><span class="line"> &quot;err_code&quot;:&quot;INVALID_QUERY_PARAMETER&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>3</span></td><td class="code-block-line-content"><span class="line"> &quot;err_msg&quot;:&quot;Request specified unsupported language: &lt;language_name&gt;. Only English is supported.&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>4</span></td><td class="code-block-line-content"><span class="line"> &quot;request_id&quot;:&quot;XXXX&quot;</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>5</span></td><td class="code-block-line-content"><span class="line">}</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <h3 id="token-limit-exceeded" data-state="closed">Token Limit Exceeded</h3> <p><strong class="font-semibold">Status</strong> 400</p> <p>If the request’s input length exceeded the 150k token rate limit per request, you will get the error message below.</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[&#x27;&#x27;] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">JSON</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>1</span></td><td class="code-block-line-content"><span class="line">{</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>2</span></td><td class="code-block-line-content"><span class="line"> &quot;err_code&quot;: &quot;TOKEN_LIMIT_EXCEEDED&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>3</span></td><td class="code-block-line-content"><span class="line"> &quot;err_msg&quot;: &quot;Text input for &lt;api_name&gt; currently supports up to 150K tokens. Please revise your text input to fit within the defined token limit. For more information, please visit our API documentation.&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>4</span></td><td class="code-block-line-content"><span class="line"> &quot;request_id&quot;: &quot;XXXX&quot;</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>5</span></td><td class="code-block-line-content"><span class="line">}</span></td></tr></tbody></table></div></code></div></div></div></pre></div> <h3 id="missing-query-parameter" data-state="closed">Missing Query Parameter</h3> <p><strong class="font-semibold">Status</strong> 400</p> <p>If the request sent contained only the feature parameter (<code>sentiment</code>) but not the <code>language</code> parameter, you will receive this error.</p> <div class="bg-card after:ring-card-border relative mb-6 mt-4 flex w-full min-w-0 max-w-full flex-col rounded-lg shadow-sm after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-inset after:content-[&#x27;&#x27;] first:mt-0"><div class="bg-tag-default-soft rounded-t-[inherit]"><div class="shadow-border-default mx-px flex min-h-10 items-center justify-between shadow-[inset_0_-1px_0_0]"><div class="flex min-h-10 overflow-x-auto"><div class="flex items-center px-3 py-1.5"><span class="t-muted rounded text-sm font-semibold">JSON</span></div></div><button tabindex="0" data-state="closed" aria-disabled="false" class="fern-copy-button group ml-2 mr-1 fern-button minimal normal rounded square"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M19.4 20H9.6C9.26863 20 9 19.7314 9 19.4V9.6C9 9.26863 9.26863 9 9.6 9H19.4C19.7314 9 20 9.26863 20 9.6V19.4C20 19.7314 19.7314 20 19.4 20Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></button></div></div><pre class="code-block-root not-prose rounded-b-[inherit]" tabindex="0"><div dir="ltr" class="fern-scroll-area" style="position:relative;--radix-scroll-area-corner-width:0px;--radix-scroll-area-corner-height:0px"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" class="fern-scroll-area-viewport" data-scrollbars="both" style="overflow-x:hidden;overflow-y:hidden;max-height:479px"><div style="min-width:100%;display:table"><code class="code-block text-sm"><div class="code-block-inner"><table class="code-block-line-group"><colgroup><col class="w-fit"/><col/></colgroup><tbody><tr class="code-block-line"><td class="code-block-line-gutter"><span>1</span></td><td class="code-block-line-content"><span class="line">{</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>2</span></td><td class="code-block-line-content"><span class="line"> &quot;err_code&quot;:&quot;INVALID_QUERY_PARAMETER&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>3</span></td><td class="code-block-line-content"><span class="line"> &quot;err_msg&quot;:&quot;Failed to deserialize query parameters: missing field `language`&quot;,</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>4</span></td><td class="code-block-line-content"><span class="line"> &quot;request_id&quot;:&quot;XXX&quot;</span></td></tr><tr class="code-block-line"><td class="code-block-line-gutter"><span>5</span></td><td class="code-block-line-content"><span class="line">}</span></td></tr></tbody></table></div></code></div></div></div></pre></div></div><footer class="mt-12"><div class="flex gap-4 max-sm:flex-col sm:justify-between"><div><div><div class="flex w-full flex-wrap items-center justify-between gap-4"><div class="flex items-center justify-start gap-2"><span class="t-muted text-sm font-medium">Was this page helpful?</span><span class="fern-button-group"><button tabindex="0" data-state="closed" aria-disabled="false" data-selected="false" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-:Rpat8um:" class="fern-button outlined normal"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class=""><path d="M16.4724 20H4.1C3.76863 20 3.5 19.7314 3.5 19.4V9.6C3.5 9.26863 3.76863 9 4.1 9H6.86762C7.57015 9 8.22116 8.6314 8.5826 8.02899L11.293 3.51161C11.8779 2.53688 13.2554 2.44422 13.9655 3.33186C14.3002 3.75025 14.4081 4.30635 14.2541 4.81956L13.2317 8.22759C13.1162 8.61256 13.4045 9 13.8064 9H18.3815C19.7002 9 20.658 10.254 20.311 11.5262L18.4019 18.5262C18.1646 19.3964 17.3743 20 16.4724 20Z" stroke="currentColor" stroke-linecap="round"></path><path d="M7 20L7 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="fern-button-text">Yes</span></span></button><button tabindex="0" data-state="closed" aria-disabled="false" data-selected="false" type="button" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-:R19at8um:" class="fern-button outlined normal"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class=""><path d="M16.4724 3.5H4.1C3.76863 3.5 3.5 3.76863 3.5 4.1V13.9C3.5 14.2314 3.76863 14.5 4.1 14.5H6.86762C7.57015 14.5 8.22116 14.8686 8.5826 15.471L11.293 19.9884C11.8779 20.9631 13.2554 21.0558 13.9655 20.1681C14.3002 19.7497 14.4081 19.1937 14.2541 18.6804L13.2317 15.2724C13.1162 14.8874 13.4045 14.5 13.8064 14.5H18.3815C19.7002 14.5 20.658 13.246 20.311 11.9738L18.4019 4.97376C18.1646 4.10364 17.3743 3.5 16.4724 3.5Z" stroke="currentColor" stroke-linecap="round"></path><path d="M7 14.5L7 3.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="fern-button-text">No</span></span></button></span></div></div></div></div><a tabindex="0" aria-disabled="false" data-state="off" class="fern-button outlined normal" target="_blank" rel="noreferrer" href="https://github.com/deepgram/deepgram-fern-config/blob/main/fern/docs/text-sentiment-analysis.mdx?plain=1"><span class="fern-button-content"><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor"><path d="M3 21L12 21H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12.2218 5.82839L15.0503 2.99996L20 7.94971L17.1716 10.7781M12.2218 5.82839L6.61522 11.435C6.42769 11.6225 6.32233 11.8769 6.32233 12.1421L6.32233 16.6776L10.8579 16.6776C11.1231 16.6776 11.3774 16.5723 11.565 16.3847L17.1716 10.7781M12.2218 5.82839L17.1716 10.7781" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="fern-button-text">Edit this page</span></span></a></div><div class="not-prose grid grid-cols-1"><a class="fern-card interactive my-12 flex flex-1 items-center rounded-xl p-6" href="/docs/text-summarization"><div class="flex-1"><div class="text-base font-semibold">Summarization</div></div><span class="sm-4 t-muted sm:border-default inline-flex items-center gap-2 py-2.5 text-sm sm:ml-6 sm:border-l sm:pl-6"><span class="hidden leading-none sm:inline">Up Next</span><svg width="1.5em" height="1.5em" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor" class="size-icon"><path d="M9 6L15 12L9 18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></svg></span></a></div></footer><style> #builtwithfern { display: flex !important; opacity: 100% !important; } #builtwithfern * { display: initial !important; width: unset !important; opacity: 100% !important; } #builtwithfern, #builtwithfern * { visibility: initial !important; overflow: visible !important; position: relative !important; left: unset !important; top: unset !important; right: unset !important; bottom: unset !important; inset: unset !important; }</style><a id="builtwithfern" class="mx-auto flex items-baseline gap-1 mx-auto my-8 w-fit" href="https://buildwithfern.com/?utm_campaign=buildWith&amp;utm_medium=docs&amp;utm_source=developers.deepgram.com" data-state="closed"><span class="t-muted whitespace-nowrap text-xs">Built with</span><svg viewBox="0 0 604 164" fill="none" xmlns="http://www.w3.org/2000/svg" class="transition" style="aspect-ratio:604/164;height:14px;margin-top:-2px"><path fill-rule="evenodd" clip-rule="evenodd" d="M295.294 0H255.861H255.836C234.047 0 221.437 11.4661 221.437 33.483V47.2372H193.242V75.2033H221.437V160.5H253.547V75.2033H288.404V47.2372H253.547V37.3728C253.547 30.7118 257.208 27.9661 263.87 27.9661H295.294V0ZM345.26 43.8081C311.777 43.8081 288.844 67.1979 288.844 103.198H288.87C288.87 139.884 311.802 163.96 346.43 163.96C375.311 163.96 392.727 149.291 399.388 126.816H366.591C363.591 133.02 356.955 137.367 346.633 137.367C331.277 137.367 321.87 129.562 320.497 115.35H400.761C401.219 110.545 401.447 106.401 401.447 102.283C401.447 66.2826 378.744 43.8081 345.26 43.8081ZM369.108 90.5877V91.0453H320.269C321.184 77.7487 329.675 69.0284 345.26 69.0284C360.845 69.0284 369.108 77.7487 369.108 90.5877ZM412.668 47.2321H440.863V67.1898C443.609 54.3508 452.787 47.2321 467.227 47.2321H487.414V51.122C487.414 64.4186 476.634 75.1982 463.338 75.1982C450.727 75.1982 444.753 81.6304 444.753 94.4694V160.52H412.642V47.2321H412.668ZM526.939 47.24H498.744H498.719V160.503H530.829V96.0789C530.829 81.6382 539.321 72.6891 552.16 72.6891C564.999 72.6891 571.889 80.0366 571.889 95.1637V160.528H604V91.7315C604 61.7061 586.559 43.8078 558.821 43.8078C545.753 43.8078 533.601 48.8417 526.939 58.7061V47.24Z" class="fill-grayscale-a10"></path><path d="M149.383 80.2222C138.594 71.101 122.341 67.4445 107.936 78.0925C107.273 78.5747 106.449 77.751 106.952 77.1081C110.367 72.7082 114.325 67.9668 117.519 63.2053C120.774 58.3233 125.636 54.8275 131.241 53.1198C161.076 44.079 152.116 0 152.116 0C152.116 0 106.027 2.97342 111.713 42.7329C112.657 49.3829 110.889 56.1535 106.731 61.4374C101.628 67.8865 95.7008 74.0543 91.4014 78.5144C90.4973 79.4386 88.9705 78.5546 89.3321 77.309C93.4909 63.3058 96.5246 41.648 82.1195 27.685L61.848 10.849L57.9504 15.9922C46.3581 31.2812 49.7534 52.8385 65.0625 64.4108C73.8422 71.0407 77.8201 78.2533 77.1973 86.169C76.8156 90.9104 74.6659 95.3505 71.4514 98.8663C65.4041 105.496 59.7586 112.608 55.3989 120.846C54.7962 121.991 53.0483 121.549 53.1086 120.243C53.7314 106.641 52.4255 75.983 29.5221 65.0336L3.88635 55.1289L1.89737 61.0556C-4.55174 80.182 5.99588 100.614 25.1021 107.104C41.7171 112.749 47.6439 123.457 43.6458 139.51C43.465 140.092 40.572 156.627 40.9738 163.96H59.3969C60.0198 152.589 71.9536 145.115 82.3003 149.756C85.2135 151.062 88.207 152.93 91.2809 155.341C107.755 168.32 132.025 165.246 144.983 148.752L148.68 144.05L125.375 127.315C109.383 114.738 88.0463 120.424 72.255 131.192C70.929 132.096 69.2414 130.65 69.9847 129.203C89.0709 91.7542 113.883 91.8346 123.607 100.152C135.4 110.238 153.261 108.429 163.266 96.5961L166.139 93.2007L149.363 80.2222H149.383Z" class="fill-grayscale-a10"></path></svg></a></article></main></div></div><footer id="fern-footer" class=""></footer></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"baseUrl":{"domain":"developers.deepgram.com"},"layout":{"pageWidth":{"type":"full"},"searchbarPlacement":"HEADER","tabsPlacement":"HEADER","contentAlignment":"CENTER","headerPosition":"FIXED","disableHeader":false},"title":"Deepgram | Documentation","favicon":"4001a744-d9aa-4ec4-bea6-9d71914e6db2","colors":{"dark":{"type":"dark","accentPrimary":{"r":161,"g":249,"b":212,"a":1},"logo":"0ea73e71-b96c-44fe-81d1-96375109a7ac","background":{"type":"solid","r":11,"g":11,"b":12,"a":1},"border":{"r":44,"g":44,"b":51,"a":1},"cardBackground":{"r":26,"g":26,"b":31,"a":1},"sidebarBackground":{"r":11,"g":11,"b":12,"a":1},"headerBackground":{"r":26,"g":26,"b":31,"a":1}}},"js":{"remote":[{"url":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/component.js","strategy":"lazyOnload"},{"url":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/dist/output.js","strategy":"beforeInteractive"}]},"navbarLinks":[],"logo":{"height":24,"href":"/","dark":{"src":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/logo.svg","width":176,"height":25}},"content":{"slug":"docs/text-sentiment-analysis","title":{"engine":"mdx-bundler","code":"var Component=(()=\u003e{var f=Object.create;var s=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var C=(n,t)=\u003e()=\u003e(t||n((t={exports:{}}).exports,t),t.exports),D=(n,t)=\u003e{for(var e in t)s(n,e,{get:t[e],enumerable:!0})},u=(n,t,e,i)=\u003e{if(t\u0026\u0026typeof t==\"object\"||typeof t==\"function\")for(let o of l(t))!_.call(n,o)\u0026\u0026o!==e\u0026\u0026s(n,o,{get:()=\u003et[o],enumerable:!(i=x(t,o))||i.enumerable});return n};var X=(n,t,e)=\u003e(e=n!=null?f(M(n)):{},u(t||!n||!n.__esModule?s(e,\"default\",{value:n,enumerable:!0}):e,n)),h=n=\u003eu(s({},\"__esModule\",{value:!0}),n);var d=C((v,a)=\u003e{a.exports=_jsx_runtime});var y={};D(y,{default:()=\u003ep,frontmatter:()=\u003ej});var c=X(d());var{useMDXComponents:r}=MdxJsReact;var j=void 0;function m(n){let t={p:\"p\",...r(),...n.components};return(0,c.jsx)(t.p,{children:\"Sentiment Analysis\"})}function p(n={}){let{wrapper:t}={...r(),...n.components};return t?(0,c.jsx)(t,{...n,children:(0,c.jsx)(m,{...n})}):m(n)}return h(y);})();\n;return Component;","frontmatter":{},"scope":{},"jsxRefs":[]},"subtitle":{"engine":"mdx-bundler","code":"var Component=(()=\u003e{var x=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var _=(n,t)=\u003e()=\u003e(t||n((t={exports:{}}).exports,t),t.exports),C=(n,t)=\u003e{for(var e in t)s(n,e,{get:t[e],enumerable:!0})},u=(n,t,e,i)=\u003e{if(t\u0026\u0026typeof t==\"object\"||typeof t==\"function\")for(let o of l(t))!M.call(n,o)\u0026\u0026o!==e\u0026\u0026s(n,o,{get:()=\u003et[o],enumerable:!(i=f(t,o))||i.enumerable});return n};var g=(n,t,e)=\u003e(e=n!=null?x(h(n)):{},u(t||!n||!n.__esModule?s(e,\"default\",{value:n,enumerable:!0}):e,n)),D=n=\u003eu(s({},\"__esModule\",{value:!0}),n);var m=_((v,d)=\u003e{d.exports=_jsx_runtime});var j={};C(j,{default:()=\u003ep,frontmatter:()=\u003eX});var r=g(m());var{useMDXComponents:c}=MdxJsReact;var X=void 0;function a(n){let t={p:\"p\",...c(),...n.components};return(0,r.jsx)(t.p,{children:\"Sentiment Analysis recognizes sentiment throughout the inputed text.\"})}function p(n={}){let{wrapper:t}={...c(),...n.components};return t?(0,r.jsx)(t,{...n,children:(0,r.jsx)(a,{...n})}):a(n)}return D(j);})();\n;return Component;","frontmatter":{},"scope":{},"jsxRefs":[]},"tableOfContents":[{"simpleString":"Enable Feature","anchorString":"enable-feature","children":[{"simpleString":"Basic Text Request","anchorString":"basic-text-request","children":[]},{"simpleString":"Basic URL Request","anchorString":"basic-url-request","children":[]},{"simpleString":"Query Parameters","anchorString":"query-parameters","children":[]}]},{"simpleString":"Analyze Response","anchorString":"analyze-response","children":[{"simpleString":"Response Properties","anchorString":"response-properties","children":[]}]},{"simpleString":"API Error Responses","anchorString":"api-error-responses","children":[{"simpleString":"Unsupported Language","anchorString":"unsupported-language","children":[]},{"simpleString":"Token Limit Exceeded","anchorString":"token-limit-exceeded","children":[]},{"simpleString":"Missing Query Parameter","anchorString":"missing-query-parameter","children":[]}]}],"content":{"engine":"mdx-bundler","code":"var Component=(()=\u003e{var f=Object.create;var o=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var b=(t,n)=\u003e()=\u003e(n||t((n={exports:{}}).exports,n),n.exports),w=(t,n)=\u003e{for(var i in n)o(t,i,{get:n[i],enumerable:!0})},c=(t,n,i,s)=\u003e{if(n\u0026\u0026typeof n==\"object\"||typeof n==\"function\")for(let r of _(n))!v.call(t,r)\u0026\u0026r!==i\u0026\u0026o(t,r,{get:()=\u003en[r],enumerable:!(s=y(n,r))||s.enumerable});return t};var A=(t,n,i)=\u003e(i=t!=null?f(x(t)):{},c(n||!t||!t.__esModule?o(i,\"default\",{value:t,enumerable:!0}):i,t)),L=t=\u003ec(o({},\"__esModule\",{value:!0}),t);var u=b((P,g)=\u003e{g.exports=_jsx_runtime});var I={};w(I,{default:()=\u003ep,frontmatter:()=\u003eT});var e=A(u());var{useMDXComponents:l}=MdxJsReact;var T={title:\"Sentiment Analysis\",subtitle:\"Sentiment Analysis recognizes sentiment throughout the inputed text.\",slug:\"docs/text-sentiment-analysis\"};function m(t){let n={a:\"a\",code:\"code\",em:\"em\",h2:\"h2\",h3:\"h3\",hr:\"hr\",li:\"li\",p:\"p\",strong:\"strong\",table:\"table\",tbody:\"tbody\",td:\"td\",th:\"th\",thead:\"thead\",tr:\"tr\",ul:\"ul\",...l(),...t.components},{CodeBlocks:i,Icon:s,Image:r,Info:d,Warning:h}=n;return i||a(\"CodeBlocks\",!0),s||a(\"Icon\",!0),r||a(\"Image\",!0),d||a(\"Info\",!0),h||a(\"Warning\",!0),(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(n.p,{children:[(0,e.jsx)(n.code,{children:\"sentiment\"}),\" \",(0,e.jsx)(n.em,{children:\"boolean\"}),\"\\xA0\\xA0 Default: \",(0,e.jsx)(n.code,{children:\"false\"})]}),`\n`,(0,e.jsx)(\"a\",{href:\"/docs/models-languages-overview\",className:\"dg-badge pink\",children:(0,e.jsxs)(\"span\",{children:[(0,e.jsx)(s,{icon:\"language\"}),\" English (all available regions)\"]})}),`\n`,(0,e.jsx)(\"div\",{className:\"api-playground-call\",children:(0,e.jsx)(\"span\",{children:(0,e.jsxs)(n.p,{children:[(0,e.jsx)(r,{src:\"https://res.cloudinary.com/deepgram/image/upload/v1717523786/devex/codey-greeting_rekqe1.svg\",alt:\"Deepgram API Playground\"}),\" Try this feature out in our \",(0,e.jsx)(n.a,{href:\"https://playground.deepgram.com/?endpoint=read\u0026sentiment=true\u0026language=en\",children:\"API Playground\"}),\"!\"]})})}),`\n`,(0,e.jsx)(n.p,{children:\"Sentiment Analysis accepts an input text, divides it into a list of segments comprised of sections of the text, and identifies the sentiment of each segment. It also assigns an average sentiment to the entire text.\"}),`\n`,(0,e.jsx)(i,{items:[{code:`\"results\": {\n \"sentiments\": {\n \"segments\": [\n {\n \"text\": \"Hi. Thank you for calling from premier phone services.\",\n \"start_word\": 0,\n \"end_word\": 8,\n \"sentiment\": \"positive\",\n \"sentiment_score\": 0.7380304336547852\n },\n {\n \"text\": \"This call may be recorded for quality and training purposes.\",\n \"start_word\": 9,\n \"end_word\": 18,\n \"sentiment\": \"neutral\",\n \"sentiment_score\": 0.057771213352680206\n }\n ],\n \"average\": {\n \"sentiment\": \"positive\",\n \"sentiment_score\": 0.39790084145285864\n }\n`,language:\"json\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"JSON\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,e.jsxs)(n.p,{children:[\"A \",(0,e.jsx)(n.code,{children:\"sentiment\"}),\" of \",(0,e.jsx)(n.code,{children:\"positive\"}),\", \",(0,e.jsx)(n.code,{children:\"negative\"}),\", or \",(0,e.jsx)(n.code,{children:\"neutral\"}),\" along with a \",(0,e.jsx)(n.code,{children:\"sentiment_score\"}),\" is identified for each segment of the source text, and an \",(0,e.jsx)(n.code,{children:\"average\"}),\" of the entire text\\u2019s sentiment is also provided along with the average \",(0,e.jsx)(n.code,{children:\"sentiment_score\"}),\".\"]}),`\n`,(0,e.jsx)(d,{children:(0,e.jsxs)(n.p,{children:[\"The break point for a \",(0,e.jsx)(n.code,{children:\"sentiment_score\"}),\" becoming positive or negative is \",(0,e.jsx)(n.code,{children:\"+-0.333333333...\"}),\".\"]})}),`\n`,(0,e.jsx)(n.h2,{id:\"enable-feature\",children:\"Enable Feature\"}),`\n`,(0,e.jsxs)(n.p,{children:[\"To enable Sentiment, use the following parameter in the query string when you call Deepgram\\u2019s \",(0,e.jsx)(n.code,{children:\"/read\"}),\" endpoint:\"]}),`\n`,(0,e.jsx)(n.p,{children:(0,e.jsx)(n.code,{children:\"sentiment=true\"})}),`\n`,(0,e.jsx)(n.h3,{id:\"basic-text-request\",children:\"Basic Text Request\"}),`\n`,(0,e.jsx)(n.p,{children:\"To analyze text from a file on your computer, run the following curl command in a terminal or your favorite API client.\"}),`\n`,(0,e.jsx)(i,{items:[{code:`curl -vX POST \\\\\n -H \"Authorization: Token YOUR_DEEPGRAM_API_KEY\" \\\\\n -H \"Content-Type: application/json\" \\\\\n -d '{\"text\": \"YOUR_TEXT_INPUT\"}' \\\\\n \"https://api.deepgram.com/v1/read?sentiment=true\u0026language=en\"\n`,language:\"bash\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"cURL\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,e.jsx)(h,{children:(0,e.jsxs)(n.p,{children:[\"Replace \",(0,e.jsx)(n.code,{children:\"YOUR_DEEPGRAM_API_KEY\"}),\" with your \",(0,e.jsx)(n.a,{href:\"https://console.deepgram.com/signup?jump=keys\",children:\"Deepgram API Key\"}),\".\"]})}),`\n`,(0,e.jsx)(n.h3,{id:\"basic-url-request\",children:\"Basic URL Request\"}),`\n`,(0,e.jsxs)(n.p,{children:[\"To analyze text from a hosted file, run the following curl command in a terminal or your favorite API client. (Try testing it out with the hosted file \",(0,e.jsx)(n.a,{href:\"https://static.deepgram.com/examples/aura.txt\",children:\"https://static.deepgram.com/examples/aura.txt\"}),\".)\"]}),`\n`,(0,e.jsx)(i,{items:[{code:`curl -vX POST \\\\\n -H \"Authorization: Token YOUR_DEEPGRAM_API_KEY\" \\\\\n -H \"Content-Type: application/json\" \\\\\n -d '{\"url\": \"https://YOUR_FILE_URL.txt\"}' \\\\\n \"https://api.deepgram.com/v1/read?sentiment=true\u0026language=en\"\n`,language:\"bash\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"cURL\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,e.jsx)(d,{children:(0,e.jsxs)(n.p,{children:[\"Read our \",(0,e.jsx)(n.a,{href:\"/docs/text-intelligence\",children:\"Text Intelligence Getting Started guide\"}),\", which will walk you through making a basic text request and a basic URL request with the Deepgram SDKs.\"]})}),`\n`,(0,e.jsx)(n.h3,{id:\"query-parameters\",children:\"Query Parameters\"}),`\n`,(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:\"Parameter\"}),(0,e.jsx)(n.th,{children:\"Values\"}),(0,e.jsx)(n.th,{children:\"Type\"}),(0,e.jsx)(n.th,{children:\"Description\"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:\"sentiment\"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:\"true\"})}),(0,e.jsx)(n.td,{children:\"boolean\"}),(0,e.jsx)(n.td,{children:\"Enables Sentiment Analysis\"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:\"language\"})}),(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:\"en\"})}),(0,e.jsx)(n.td,{children:\"string\"}),(0,e.jsx)(n.td,{children:\"The language of your input text (Only English is supported at this time.)\"})]})]})]}),`\n`,(0,e.jsx)(n.h2,{id:\"analyze-response\",children:\"Analyze Response\"}),`\n`,(0,e.jsx)(n.p,{children:\"When the file is finished processing, you\\u2019ll receive a JSON response that has the following basic structure:\"}),`\n`,(0,e.jsx)(i,{items:[{code:`{\n \"metadata\": {\n \"request_id\": \"7dcd719f-344b-4c72-a194-6bd1019d855c\",\n \"created\": \"2023-12-01T15:54:39.681Z\",\n \"language\": \"en\",\n \"sentiment_info\": {\n \"model_uuid\": \"80ab3179-d113-4254-bd6b-4a2f96498695\",\n \"input_tokens\": 22,\n \"output_tokens\": 22\n }\n },\n \"results\": {\n \"sentiments\": {\n \"segments\": [\n {\n \"text\": \"Hi. Thank you for calling from premier phone services.\",\n \"start_word\": 0,\n \"end_word\": 8,\n \"sentiment\": \"positive\",\n \"sentiment_score\": 0.7380304336547852\n },\n {\n \"text\": \"This call may be recorded for quality and training purposes.\",\n \"start_word\": 9,\n \"end_word\": 18,\n \"sentiment\": \"neutral\",\n \"sentiment_score\": 0.057771213352680206\n }\n ],\n \"average\": {\n \"sentiment\": \"positive\",\n \"sentiment_score\": 0.39790084145285864\n }\n }\n }\n}\n`,language:\"json\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"JSON\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,e.jsx)(d,{children:(0,e.jsxs)(n.p,{children:[\"Use the \",(0,e.jsx)(n.a,{href:\"/reference/pre-recorded\",children:\"API reference\"}),\" or the \",(0,e.jsx)(n.a,{href:\"https://playground.deepgram.com/\",children:\"API Playground\"}),\" to view the detailed response.\"]})}),`\n`,(0,e.jsxs)(n.p,{children:[\"The \",(0,e.jsx)(n.code,{children:\"sentiment\"}),\" values added to objects are:\"]}),`\n`,(0,e.jsxs)(n.ul,{children:[`\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.code,{children:\"sentiment\"}),\": The sentiment of the associated text (\",(0,e.jsx)(n.code,{children:\"positive\"}),\" | \",(0,e.jsx)(n.code,{children:\"negative\"}),\" | \",(0,e.jsx)(n.code,{children:\"neutral\"}),\").\"]}),`\n`,(0,e.jsxs)(n.li,{children:[(0,e.jsx)(n.code,{children:\"sentiment_score\"}),\": A floating point value between -1 and 1 representing the sentiment of the associated span of text, with -1 being the most negative sentiment, and 1 being the most positive sentiment.\"]}),`\n`]}),`\n`,(0,e.jsx)(n.hr,{}),`\n`,(0,e.jsx)(n.h3,{id:\"response-properties\",children:\"Response Properties\"}),`\n`,(0,e.jsxs)(n.table,{children:[(0,e.jsx)(n.thead,{children:(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.th,{children:\"Property\"}),(0,e.jsx)(n.th,{children:\"Description\"})]})}),(0,e.jsxs)(n.tbody,{children:[(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:\"sentiments.segments\"})}),(0,e.jsx)(n.td,{children:\"Spans of text covering your entire input text that show when the sentiment shifts throughout the text.\"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:\"sentiments.segments[i].sentiment\"})}),(0,e.jsxs)(n.td,{children:[\"A rating for the given span of text. Can be either \",(0,e.jsx)(n.code,{children:\"positive\"}),\", \",(0,e.jsx)(n.code,{children:\"neutral\"}),\", or \",(0,e.jsx)(n.code,{children:\"negative\"}),\".\"]})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:\"sentiments.segments[i].sentiment_score\"})}),(0,e.jsx)(n.td,{children:\"A floating point value between -1 and 1 representing the sentiment of the associated span of text, with -1 being the most negative sentiment, and 1 being the most positive sentiment.\"})]}),(0,e.jsxs)(n.tr,{children:[(0,e.jsx)(n.td,{children:(0,e.jsx)(n.code,{children:\"sentiments.average\"})}),(0,e.jsx)(n.td,{children:\"The average sentiment for the entire text.\"})]})]})]}),`\n`,(0,e.jsx)(n.h2,{id:\"api-error-responses\",children:\"API Error Responses\"}),`\n`,(0,e.jsx)(n.h3,{id:\"unsupported-language\",children:\"Unsupported Language\"}),`\n`,(0,e.jsxs)(n.p,{children:[(0,e.jsx)(n.strong,{children:\"Status\"}),\" 400\"]}),`\n`,(0,e.jsxs)(n.p,{children:[\"If you request Sentiment Analysis with an unsupported language by specifying a language code such as \",(0,e.jsx)(n.code,{children:\"sentiment=true\u0026language=es\"}),\" or \",(0,e.jsx)(n.code,{children:\"sentiment=true\u0026detect_language=true\"}),\" where the detected language is unsupported, you will get the error message below.\"]}),`\n`,(0,e.jsx)(i,{items:[{code:`{\n \"err_code\":\"INVALID_QUERY_PARAMETER\",\n \"err_msg\":\"Request specified unsupported language: \u003clanguage_name\u003e. Only English is supported.\",\n \"request_id\":\"XXXX\"\n}\n`,language:\"json\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"JSON\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,e.jsx)(n.h3,{id:\"token-limit-exceeded\",children:\"Token Limit Exceeded\"}),`\n`,(0,e.jsxs)(n.p,{children:[(0,e.jsx)(n.strong,{children:\"Status\"}),\" 400\"]}),`\n`,(0,e.jsx)(n.p,{children:\"If the request\\u2019s input length exceeded the 150k token rate limit per request, you will get the error message below.\"}),`\n`,(0,e.jsx)(i,{items:[{code:`{\n \"err_code\": \"TOKEN_LIMIT_EXCEEDED\",\n \"err_msg\": \"Text input for \u003capi_name\u003e currently supports up to 150K tokens. Please revise your text input to fit within the defined token limit. For more information, please visit our API documentation.\",\n \"request_id\": \"XXXX\"\n}\n`,language:\"json\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"JSON\",wordWrap:!1,matchLanguage:void 0}]}),`\n`,(0,e.jsx)(n.h3,{id:\"missing-query-parameter\",children:\"Missing Query Parameter\"}),`\n`,(0,e.jsxs)(n.p,{children:[(0,e.jsx)(n.strong,{children:\"Status\"}),\" 400\"]}),`\n`,(0,e.jsxs)(n.p,{children:[\"If the request sent contained only the feature parameter (\",(0,e.jsx)(n.code,{children:\"sentiment\"}),\") but not the \",(0,e.jsx)(n.code,{children:\"language\"}),\" parameter, you will receive this error.\"]}),`\n`,(0,e.jsx)(i,{items:[{code:`{\n \"err_code\":\"INVALID_QUERY_PARAMETER\",\n \"err_msg\":\"Failed to deserialize query parameters: missing field \\`language\\`\",\n \"request_id\":\"XXX\"\n}\n`,language:\"json\",highlightLines:[],highlightStyle:\"highlight\",maxLines:20,title:\"JSON\",wordWrap:!1,matchLanguage:void 0}]})]})}function p(t={}){let{wrapper:n}={...l(),...t.components};return n?(0,e.jsx)(n,{...t,children:(0,e.jsx)(m,{...t})}):m(t)}function a(t,n){throw new Error(\"Expected \"+(n?\"component\":\"object\")+\" `\"+t+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return L(I);})();\n;return Component;","frontmatter":{"title":"Sentiment Analysis","subtitle":"Sentiment Analysis recognizes sentiment throughout the inputed text.","slug":"docs/text-sentiment-analysis","edit-this-page-url":"https://github.com/deepgram/deepgram-fern-config/blob/main/fern/docs/text-sentiment-analysis.mdx?plain=1"},"scope":{},"jsxRefs":["Icon","CodeGroup","Info","Warning"]},"breadcrumb":[{"title":"Text Intelligence","pointsTo":"docs/text-intelligence"}],"neighbors":{"prev":{"slug":"docs/text-intention-recognition","title":"Intent Recognition"},"next":{"slug":"docs/text-summarization","title":"Summarization"}},"hasAside":false,"type":"markdown-page","apis":{},"endpointIdsToSlugs":{}},"navigation":{"currentTabIndex":4,"tabs":[{"type":"tabGroup","title":"Home","index":0,"slug":"home","pointsTo":"home/introduction"},{"type":"tabGroup","title":"Voice Agent","index":1,"slug":"voice-agent","pointsTo":"docs/voice-agent"},{"type":"tabGroup","title":"Speech to Text","index":2,"slug":"speech-to-text","pointsTo":"docs/pre-recorded-audio"},{"type":"tabGroup","title":"Text to Speech","index":3,"slug":"text-to-speech","pointsTo":"docs/tts-rest"},{"type":"tabGroup","title":"Intelligence","index":4,"slug":"intelligence","pointsTo":"docs/audio-intelligence"},{"type":"tabGroup","title":"API Ref","index":5,"slug":"reference","pointsTo":"reference/deepgram-api-overview"},{"type":"tabGroup","title":"Guides","index":6,"slug":"docs","pointsTo":"docs/make-your-first-api-request"},{"type":"tabGroup","title":"SDKs","index":7,"slug":"sdks","pointsTo":"docs/deepgram-sdks"},{"type":"tabGroup","title":"Self-Hosted Deployments","index":8,"slug":"self-hosted","pointsTo":"docs/self-hosted-introduction"},{"type":"tabGroup","title":"Security","index":9,"slug":"security","pointsTo":"docs/security-policy"}],"versions":[],"sidebar":{"type":"sidebarRoot","id":"a482e11cb10f04981110f5703932b378039f9574b41169dab0c86f58a06aaa62","children":[{"type":"section","id":"c3162d441d0f876ef9ec528b146429ecd18ddc333419ff367c5c167173d4e374","children":[{"type":"page","id":"ebfa40685cc081c351571abe6c5f07708e8ee51e54275548e245d29e2f64c9a0","title":"Getting Started","slug":"docs/audio-intelligence","pageId":"docs/audio-intelligence.mdx"},{"type":"page","id":"4bc4f7429d0ff9d1e6d80a3d14a251d9336f52207a3d33d1dd5d2fc816e55603","title":"Feature Overview","slug":"docs/stt-intelligence-feature-overview","pageId":"docs/stt-intelligence-feature-overview.mdx"},{"type":"page","id":"ee24ff99114b94dc6cc779011743f2f6e54f2493b02c0e463d822a87c28ece94","title":"Entity Detection","slug":"docs/detect-entities","pageId":"docs/detect-entities.mdx"},{"type":"page","id":"8060a44bb557e58a075e29e5ebe3852008de1a826b05a7d369413bb39ebbca7c","title":"Intent Recognition","slug":"docs/intent-recognition","pageId":"docs/intent-recognition.mdx"},{"type":"page","id":"04fa6f24c5571e360cfde6c3a7c4469fb6499ca7b1156ceebd05f48a13a6886c","title":"Sentiment Analysis","slug":"docs/sentiment-analysis","pageId":"docs/sentiment-analysis.mdx"},{"type":"page","id":"8002099ebc378ab9470002e455668408dac1943e54c361b05348b840b73ed5a9","title":"Summarization","slug":"docs/summarization","pageId":"docs/summarization.mdx"},{"type":"page","id":"2101719d06d1ff6c9ca035640d561c504c43cbb21d51f2a2f68a66cadebdf11e","title":"Topic Detection","slug":"docs/topic-detection","pageId":"docs/topic-detection.mdx"}],"title":"Audio Intelligence","slug":"intelligence/audio-intelligence","pointsTo":"docs/audio-intelligence"},{"type":"section","id":"f915a093f340026db7f2f1c479b6a0155edddd3b39e0490ed78a09c873291e95","children":[{"type":"page","id":"be2c8044cc23fac6c3223a390cc637d53c985f3d7219e8cf1b812a0bc5d8df4f","title":"Getting Started","slug":"docs/text-intelligence","pageId":"docs/text-intelligence.mdx"},{"type":"page","id":"f3b6ffcf674af77589df0ff2e2a51756be566c4387704f2f2ac54f4ea4d74cf6","title":"Feature Overview","slug":"docs/text-intelligence-feature-overview","pageId":"docs/text-intelligence-feature-overview.mdx"},{"type":"page","id":"aaf38b554d2241b8685dbfd275afe883755bad6793bb07304eb97739567704c4","title":"Intent Recognition","slug":"docs/text-intention-recognition","pageId":"docs/text-intention-recognition.mdx"},{"type":"page","id":"4e4b3faf60e8575a908f6391a7d3bff77ca05a33629aace56d24c478c7cdfe1b","title":"Sentiment Analysis","slug":"docs/text-sentiment-analysis","pageId":"docs/text-sentiment-analysis.mdx"},{"type":"page","id":"60d9d76f4946bdde93c9ae509853380f721d24fa24c5386c6e5622b6a28ca2d8","title":"Summarization","slug":"docs/text-summarization","pageId":"docs/text-summarization.mdx"},{"type":"page","id":"998c59a63c7285bac36baa16f72e9fb20712e0b6f7be84e537c33a1a727bcbff","title":"Topic Detection","slug":"docs/text-topic-detection","pageId":"docs/text-topic-detection.mdx"},{"type":"page","id":"62d5114550c2df44f043caa1f2cf2580c72385d2db623e803089e3d2b7122677","title":"Text Intelligence Callback","slug":"docs/text-intelligence-callback","pageId":"docs/text-intelligence-callback.mdx"}],"title":"Text Intelligence","slug":"intelligence/text-intelligence","pointsTo":"docs/text-intelligence"}]},"trailingSlash":false},"edgeFlags":{"isApiPlaygroundEnabled":true,"isApiScrollingDisabled":false,"isWhitelabeled":false,"isSeoDisabled":false,"isTocDefaultEnabled":false,"isSnippetTemplatesEnabled":false,"isSearchDisabled":true,"isHttpSnippetsEnabled":true,"isInlineFeedbackEnabled":false,"isDarkCodeEnabled":false,"isProxyDisabled":false,"isImageZoomDisabled":false,"useJavaScriptAsTypeScript":false,"alwaysEnableJavaScriptFetch":false,"scrollInContainerEnabled":false,"useMdxBundler":true,"isBatchStreamToggleDisabled":false,"isAuthEnabledInDocs":false,"isAskAiEnabled":false,"isAudioFileDownloadSpanSummary":false,"isDocsLogoTextEnabled":false,"isAudioExampleInternal":false,"usesApplicationJsonInFormDataValue":false,"isBinaryOctetStreamAudioPlayer":false,"hasVoiceIdPlaygroundForm":false,"isCohereTheme":false,"isFileForgeHackEnabled":false,"is404PageHidden":false,"isNewSearchExperienceEnabled":false,"isAuthenticatedPagesDiscoverable":false,"isSearchV2Enabled":false},"apis":["4e5e14ff-195d-48af-afed-e14af8f845a8"],"seo":{"openGraph":{"siteName":"Deepgram | Documentation"},"twitter":{},"additionalMetaTags":[],"additionalLinkTags":[{"rel":"icon","href":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/favicon.ico","crossOrigin":"anonymous"},{"rel":"preload","href":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/Inter.woff2","as":"font","type":"font/woff2","crossOrigin":"anonymous"},{"rel":"preload","href":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/FiraMono.woff2","as":"font","type":"font/woff2","crossOrigin":"anonymous"},{"rel":"preload","href":"https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/Roobert.woff2","as":"font","type":"font/woff2","crossOrigin":"anonymous"}],"breadcrumbList":{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Deepgram | Documentation","item":"https://developers.deepgram.com/"},{"@type":"ListItem","position":2,"name":"Intelligence","item":"https://developers.deepgram.com/intelligence"},{"@type":"ListItem","position":3,"name":"Text Intelligence","item":"https://developers.deepgram.com/intelligence/text-intelligence"},{"@type":"ListItem","position":4,"name":"Sentiment Analysis","item":"https://developers.deepgram.com/docs/text-sentiment-analysis"}]},"canonical":"https://developers.deepgram.com/docs/text-sentiment-analysis","title":"Sentiment Analysis","description":"Sentiment Analysis recognizes sentiment throughout the inputed text.","titleTemplate":"%s — Deepgram | Documentation","noindex":false,"nofollow":false},"fallback":{},"theme":"default","analyticsConfig":{},"defaultLang":"curl","stylesheet":"\n:root {\n --typography-body-font-family: 'Inter', -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;\n --typography-heading-font-family: 'Roobert', -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;\n --typography-code-font-family: 'FiraMono', ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;\n --spacing-page-width: 100%;\n --spacing-content-width: 44rem;\n --spacing-content-wide-width: 66.5rem;\n --spacing-sidebar-width: 18rem;\n --spacing-header-height: 6.75rem;\n --spacing-header-height-padded: 5rem;\n --spacing-header-height-real: 4rem;\n \n --grayscale-1: var(--mauve-1);\n --grayscale-2: var(--mauve-2);\n --grayscale-3: var(--mauve-3);\n --grayscale-4: var(--mauve-4);\n --grayscale-5: var(--mauve-5);\n --grayscale-6: var(--mauve-6);\n --grayscale-7: var(--mauve-7);\n --grayscale-8: var(--mauve-8);\n --grayscale-9: var(--mauve-9);\n --grayscale-10: var(--mauve-10);\n --grayscale-11: var(--mauve-11);\n --grayscale-12: var(--mauve-12);\n --grayscale-a1: var(--mauve-a1);\n --grayscale-a2: var(--mauve-a2);\n --grayscale-a3: var(--mauve-a3);\n --grayscale-a4: var(--mauve-a4);\n --grayscale-a5: var(--mauve-a5);\n --grayscale-a6: var(--mauve-a6);\n --grayscale-a7: var(--mauve-a7);\n --grayscale-a8: var(--mauve-a8);\n --grayscale-a9: var(--mauve-a9);\n --grayscale-a10: var(--mauve-a10);\n --grayscale-a11: var(--mauve-a11);\n --grayscale-a12: var(--mauve-a12);\n --accent-1: #f7f7f9;\n --accent-2: #f1f3f9;\n --accent-3: #e8ebf7;\n --accent-4: #dde2f9;\n --accent-5: #d0d7f8;\n --accent-6: #c0c8f3;\n --accent-7: #abb5eb;\n --accent-8: #8f9be2;\n --accent-9: #7783f7;\n --accent-10: #6c77e9;\n --accent-11: #5158c3;\n --accent-12: #282c5f;\n --accent-a1: #7a3b7c04;\n --accent-a2: #1734c309;\n --accent-a3: #0926c312;\n --accent-a4: #0327ea1d;\n --accent-a5: #0126e92a;\n --accent-a6: #0322d93b;\n --accent-a7: #011ec950;\n --accent-a8: #011cc16d;\n --accent-a9: #0217f486;\n --accent-a10: #0214dc91;\n --accent-a11: #020ca8ad;\n --accent-a12: #010642d7;\n --accent-surface: #eff1f9cc;\n --gray-surface: #ffffffcc;\n --accent: 119, 131, 247;\n --accent-aa: 81, 96, 245;\n --accent-aaa: 32, 52, 243;\n --accent-tinted: 143, 153, 248;\n --background: 249, 250, 251;\n --accent-contrast: rgb(255, 255, 255);\n --bg-color-card: rgba(255, 255, 255, 0.7);\n --sidebar-background: transparent;\n --header-background: transparent;\n --border: var(--grayscale-a4);\n --border-concealed: var(--grayscale-a2);\n --body-text: 0, 0, 0;\n --body-text-inverted: 255, 255, 255;\n}\n\n@media (max-width: 1024px) {\n :root {\n --spacing-header-height: 6.75rem;\n --spacing-header-height-padded: 5rem;\n }\n}\n\n\n:is(.dark) {\n --grayscale-1: var(--gray-1);\n --grayscale-2: var(--gray-2);\n --grayscale-3: var(--gray-3);\n --grayscale-4: var(--gray-4);\n --grayscale-5: var(--gray-5);\n --grayscale-6: var(--gray-6);\n --grayscale-7: var(--gray-7);\n --grayscale-8: var(--gray-8);\n --grayscale-9: var(--gray-9);\n --grayscale-10: var(--gray-10);\n --grayscale-11: var(--gray-11);\n --grayscale-12: var(--gray-12);\n --grayscale-a1: var(--gray-a1);\n --grayscale-a2: var(--gray-a2);\n --grayscale-a3: var(--gray-a3);\n --grayscale-a4: var(--gray-a4);\n --grayscale-a5: var(--gray-a5);\n --grayscale-a6: var(--gray-a6);\n --grayscale-a7: var(--gray-a7);\n --grayscale-a8: var(--gray-a8);\n --grayscale-a9: var(--gray-a9);\n --grayscale-a10: var(--gray-a10);\n --grayscale-a11: var(--gray-a11);\n --grayscale-a12: var(--gray-a12);\n --accent-1: #050d0a;\n --accent-2: #0f1a15;\n --accent-3: #092d21;\n --accent-4: #003d29;\n --accent-5: #004b34;\n --accent-6: #005a40;\n --accent-7: #006b4d;\n --accent-8: #00805b;\n --accent-9: #a1f9d4;\n --accent-10: #97efca;\n --accent-11: #66cfa6;\n --accent-12: #9df5d0;\n --accent-a1: #00b50003;\n --accent-a2: #4bfb9c10;\n --accent-a3: #00fca124;\n --accent-a4: #00fc9735;\n --accent-a5: #00ffa543;\n --accent-a6: #00feac53;\n --accent-a7: #00fdb165;\n --accent-a8: #00fdb07b;\n --accent-a9: #a5ffd9f9;\n --accent-a10: #a0fed6ef;\n --accent-a11: #7dffcccd;\n --accent-a12: #a3ffd8f5;\n --accent-surface: color(display-p3 0.0863 0.1569 0.1255 / 0.5);\n --gray-surface: color(display-p3 0 0 0 / 5%);\n --accent: 161, 249, 212;\n --accent-aa: 161, 249, 212;\n --accent-aaa: 161, 249, 212;\n --accent-tinted: 185, 251, 223;\n --background: 11, 11, 12;\n --accent-contrast: rgb(11, 40, 29);\n --bg-color-card: rgb(26, 26, 31);\n --bg-color-card-solid: rgb(26, 26, 31);\n --sidebar-background: rgb(11, 11, 12);\n --header-background: rgb(26, 26, 31);\n --border: rgb(44, 44, 51);\n --border-concealed: rgb(44, 44, 51);\n --body-text: 255, 255, 255;\n --body-text-inverted: 0, 0, 0;\n}\n\n@font-face {\n font-family: 'Inter';\n src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/Inter.woff2') format('woff2');\n font-weight: 400;\n font-style: normal;\n font-display: swap;\n}\n\n@font-face {\n font-family: 'Roobert';\n src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/Roobert.woff2') format('woff2');\n font-weight: 600 900;\n font-style: normal;\n font-display: swap;\n}\n\n@font-face {\n font-family: 'FiraMono';\n src: url('https://files.buildwithfern.com/https://deepgram.docs.buildwithfern.com/2025-02-21T15:51:31.188Z/assets/FiraMono.woff2') format('woff2');\n font-weight: 100 900;\n font-style: normal;\n font-display: swap;\n}\n\nhtml {\n background-color: #f9fafb;\n}\n\nhtml.dark {\n background-color: #0b0b0c;\n}\n\n\n\n.fern-button.filled {\n\tbackground: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important;\n}\n\n.fern-header-tab-button[data-state=active] {\n\tcolor: white !important;\n}\n\n.fern-header-tab-button[data-state=active]:after {\n\tbackground: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important;\n\theight: 2px !important;\n}\n\n.fern-header-tab-button {\n\tpadding-left: 24px !important;\n\tpadding-right: 24px !important;\n}\n\n@media (max-width: 1350px) {\n\t.fern-header-tab-button {\n\t\tpadding-left: 16px !important;\n\t\tpadding-right: 16px !important;\n\t}\n}\n\n@media (max-width: 1185px) {\n\t.fern-header-tab-button {\n\t\tpadding-left: 12px !important;\n\t\tpadding-right: 12px !important;\n\t}\n}\n\n@media (max-width: 1100px) {\n\t.fern-header-tab-button {\n\t\tpadding-left: 8px !important;\n\t\tpadding-right: 8px !important;\n\t}\n}\n\n.fern-mdx-link {\n\tcolor: #79affa !important;\n\ttext-decoration: none;\n}\n\n.fern-mdx-link svg {\n\tcolor: #79affa !important;\n}\n\n.white .fern-card span {\n\tbackground: white !important;\n}\n\n@media (min-width: 1024px) {\n\t.fern-header-right-menu {\n\t\tdisplay: none !important;\n\t}\n}\n\n.banner {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\ttext-align: center;\n}\n\n.banner p {\n\tmargin-top: .25rem;\n\tmargin-bottom: .25rem;\n}\n\n.banner h1 {\n\tmargin-top: .5rem;\n\tmargin-bottom: 16px;\n}\n\n.fern-sidebar-link-container[data-state=\"active\"] {\n\tcolor: white !important;\n}\n\n.fern-sidebar-link-text {\n\tfont-size: 16px !important;\n}\n\n.fern-sidebar-link-container[data-state=active] .fern-sidebar-link-indent:after {\n border: 0px !important;\n}\n\n.fern-sidebar-link-container[data-state=\"active\"] .fern-sidebar-link {\n\tbackground-color: #232329 !important;\n}\n\n.fern-sidebar-link-container[data-state=\"active\"] .fern-sidebar-link:after {\n\tbackground: linear-gradient(177.85deg, #201CFF -102.27%, #13EF95 101.45%) !important;\n\twidth: 1px !important;\n\tposition: absolute !important;\n\tcontent: \"\" !important;\n\tright: 0 !important;\n\ttop: 0 !important;\n\tbottom: 0 !important;\n\tborder-radius: 8px !important;\n}\n\n.fern-sidebar-link {\n\tborder-radius: 0 !important;\n}\n\n.fern-sidebar-link-content {\n\tpadding-left: 1rem !important;\n\tpadding-right: 1rem !important;\n\tpadding-top: 0.5rem !important;\n\tpadding-bottom: 0.5rem !important;\n}\n\n.fern-sidebar-content {\n\tpadding-left: 0 !important;\n\tpadding-right: 0 !important;\n}\n\n@media (min-width: 1024px) {\n .fern-sidebar-container:not(.fern-sidebar-fixed) {\n padding-left: 0rem !important;\n }\n}\n\n.fern-header-tab-button span {\n\tfont-weight: 700 !important;\n\tfont-size: 16px !important;\n\tline-height: 17.5px !important;\n\tletter-spacing: 2% !important;\n}\n\n.fern-search-bar {\n\t--tw-ring-color: #4E4E52 !important;\n\tbackground-color: #0B0B0C !important;\n}\n\n.fern-sidebar-heading-content,\n.fern-sidebar-link-container .font-semibold .fern-sidebar-link-text {\n\tfont-weight: 700 !important;\n\tfont-size: 14px !important;\n\tline-height: 17.5px !important;\n\tletter-spacing: 2% !important;\n\tcolor: #A1F9D4 !important;\n}\n\n.fern-breadcrumb-item {\n\tcolor: var(--grayscale-a11) !important;\n\tfont-weight: 400 !important;\n}\n\nbutton[role=\"tab\"][data-state=\"active\"] {\n\tbackground-color: #1A1A1F !important;\n}\n\nbutton[role=\"tab\"][data-state=\"active\"]:after {\n\tbackground: linear-gradient(90deg, #201CFF -91.5%, #13EF95 80.05%) !important;\n\theight: 2px !important;\n\tposition: absolute !important;\n\tcontent: \"\" !important;\n\tright: 0 !important;\n\tleft: 0 !important;\n\tbottom: 0 !important;\n}\n\nbutton[role=\"tab\"] {\n\tbox-shadow: none !important;\n\tposition: relative !important;\n}\n\nbutton[role=\"tab\"]:hover span {\n\tbackground-color: #1A1A1F !important;\n}\n\ndiv[class*=\"callout\"] {\n\tborder-left-width: 2px !important;\n\tborder-color: var(--tw-ring-color) !important;\n}\n\n.fern-search-bar,\n.callout-outlined,\n.fern-card\n.fern-button {\n\tborder-radius: 8px !important;\n}\n\n.bg-tag-default-soft {\n background-color: #28282B !important;\n}\n\n.code-block-root span[style*=\"color: rgb(194, 195, 197);\"] {\n\t--shiki-dark: #949498 !important;\n}\n\n.callout-outlined {\n\tbackground-color: #1D2A34 !important;\n\t--tw-ring-color: #149AFB !important;\n}\n\n.callout-outlined-warning {\n\tbackground-color: #342D1E !important;\n\t--tw-ring-color: #FEC84B !important;\n}\n\n.callout-outlined p,\n.callout-outlined h5,\n.callout-outlined-warning p,\n.callout-outlined-warning h5,\n.callout-outlined-success p,\n.callout-outlined-success h5,\n.callout-outlined-danger p,\n.callout-outlined-danger h5,\n.callout-outlined-info p,\n.callout-outlined-info h5,\n.callout-outlined-tip p,\n.callout-outlined-tip h5,\n.callout-outlined-primary p,\n.callout-outlined-primary h5,\n.callout-outlined-check p,\n.callout-outlined-check h5,\n.callout-outlined-secondary p {\n\tcolor: var(--grayscale-a11) !important;\n}\n\ndiv[class*=\"callout\"] .mt-0\\.5.w-4 {\n\talign-self: center !important;\n}\n\nspan[data-badge-type=\"http-method\"],\nspan[data-badge-type=\"status-code\"] {\n\tborder-radius: 50px !important;\n}\n\n.dg-badge {\n\tmargin-right: 6px !important;\n\tcolor: #bbbbbf !important;\n\tpadding: 1px 1px !important;\n\ttext-decoration: none !important;\n\tborder-radius: 4px !important;\n\tbackground-origin: border-box !important;\n background-image: linear-gradient(90deg, #201cff -91.5%, #13ef95 80.05%);\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: fit-content;\n\theight: fit-content;\n}\n\n.dg-badge span {\n\tbackground-color: #1A1A1F !important;\n\tpadding: 4px 12px !important;\n\tborder-radius: 4px !important;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.dg-badge .fa-icon {\n\tbackground: linear-gradient(90deg, #201cff -91.5%, #13ef95 80.05%);\n\tmargin-right: 4px !important;\n}\n\n.fern-card {\n\tbackground-color: #0B0B0C !important;\n\tborder-radius: 8px !important;\n}\n\nol li {\n\tmargin-top: 2rem !important;\n}\n\n.small .fern-card {\n\tpadding-bottom: 1rem !important;\n\tpadding-top: 1rem !important;\n}\n\n.small .fern-card .items-start {\n\talign-items: center !important;\n}\n\n.small .fern-card .text-base {\n\tcolor: #BBBBBF !important;\n\tfont-weight: 600 !important;\n}\n\n.fern-card h3 {\n\tmargin-top: 0px !important;\n}\n\n.fern-sidebar-tabs {\n\tpadding-left: 10px !important;\n}\n\n.fern-sidebar-heading {\n\tpadding-left: 28px !important;\n}\n\n.api-playground-call {\n\twidth: fit-content !important;\n\theight: fit-content !important;\n\tdisplay: flex !important;\n\talign-items: center !important;\n\tjustify-content: center !important;\n\tpadding: 1px !important;\n\tborder-radius: 4px !important;\n\tbackground-image: linear-gradient(82.38deg, #ff2eea -99.24%, #4b3cff 99.26%) !important;\n\twidth: 100% !important;\n\tmargin-top: 1rem !important;\n}\n\n.api-playground-call span:first-child {\n\tdisplay: flex !important;\n\talign-items: center !important;\n\tgap: 12px !important;\n\tbackground-color: #1A1A1F !important;\n\tpadding: 4px !important;\n\tborder-radius: 4px !important;\n\twidth: 100% !important;\n\tflex-direction: row !important;\n}\n\n.api-playground-call p {\n\tmargin: 0 !important;\n\tdisplay: flex !important;\n\talign-items: center !important;\n\twhite-space: nowrap !important;\n}\n\n.api-playground-call p div:first-child {\n\tdisplay: inline-flex !important;\n\talign-items: center !important;\n}\n\n.api-playground-call img {\n\twidth: 2.5rem !important;\n\theight: 2.5rem !important;\n\tdisplay: inline-block !important;\n\tmargin-top: 4px !important;\n\tmargin-bottom: 4px !important;\n\ttransform: scaleX(-1) !important;\n}\n\n.invert-white {\n\tfilter: invert(1) !important;\n}\n\n.fa-icon,\n.card-icon {\n\twidth: 2rem !important;\n\theight: 2rem !important;\n}\n\n.dg-badge .fa-icon {\n\twidth: 1rem !important;\n\theight: 1rem !important;\n}\n\n.fern-header,\n.fern-header-tabs {\n\tborder-bottom-width: 0px !important;\n}\n\n.fern-header-tabs-list-item span {\n\tfont-family: 'Roobert' !important;\n}\n\n.fern-header-tabs-list,\n.fern-header-tabs-list-item {\n\theight: 100% !important;\n}\n\n.fern-sidebar-link-indent {\n\tmargin-left: 20px !important;\n}\n\n.fern-sidebar-link-container[data-state=inactive] .fern-sidebar-link:hover {\n\tcolor: #FBFBFF !important;\n}\n\n.t-muted:is(.dark *) {\n\tcolor: #949498 !important;\n}\n\n.dark\\:prose-invert:is(.dark *) {\n\t--tw-prose-headings: #FBFBFF !important;\n\tcolor: #E1E1E5 !important;\n}\n\n.fern-page-heading * {\n\tcolor: #FBFBFF !important;\n}\n\n.badge a {\n\ttext-decoration: none !important;\n\tcolor: unset !important;\n}\n\n.badge svg {\n\tdisplay: none !important;\n}\n\n.dep {\n\tbackground: #bbbbbf !important;\n}\n\n.dep .fa-icon {\n\tbackground: #bbbbbf !important;\n}\n\n.dep span {\n\ttext-decoration: line-through !important;\n}\n\n.pink {\n\tbackground-image: linear-gradient(85deg, #ee028b 5.66%, #ae29ff 99.14%) !important;\n}\n\n.pink .fa-icon {\n\tbackground: linear-gradient(85deg, #ee028b 5.66%, #ae29ff 99.14%) !important;\n}\n\n#fern-header {\n\tpadding-top: 3rem !important;\n}\n\n.fern-sidebar-container {\n\tposition: sticky !important;\n\ttop: 0 !important;\n margin-top: 10rem !important;\n\toverflow-y: auto !important;\n\tz-index: 20 !important;\n\theight: 100vh !important;\n}\n\n.fern-main {\n\tmargin-top: calc(var(--header-offset, 0) + 3rem) !important;\n}\n\n.fern-endpoint-content-right .fa-icon,\n.fern-dropdown-item .fa-icon {\n\twidth: 1rem !important;\n\theight: 1rem !important;\n}\n\n.fern-endpoint-content {\n\tpadding-top: 3rem !important;\n}\n\n#fern-header {\n\tposition: absolute !important;\n}\n\ndiv[id=\"/reference/speech-to-text-api/listen#request\"] .flex.flex-col div:nth-of-type(4) span:nth-of-type(2) {\n\tdisplay: none !important;\n}\n\ndiv[id=\"/reference/speech-to-text-api/listen#request\"] .flex.flex-col div:nth-of-type(4) span:nth-of-type(1):after {\n\tcontent: \" binary\" !important;\n\tcolor: #949498 !important;\n\tfont-size: .75rem;\n line-height: 1rem;\n\tfont-family: 'Inter' !important;\n\ttext-shadow: 0 1px 3px rgba(0, 0, 0, .4);\n\tmargin-left: .5rem;\n}\n\n#fern-header {\n\tposition: absolute !important;\n}\n\n.fern-sidebar-fixed+.fern-main {\n\tpadding-left: 0px !important;\n}\n\n.api-playground-call a {\n padding-left: 4px !important;\n padding-right: 4px !important;\n color: #79affa !important;\n text-decoration: none !important;\n}\n\n\n*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.tw-absolute{position:absolute}.tw-relative{position:relative}.tw-inset-x-0{left:0;right:0}.tw-top-0{top:0}.tw-z-30{z-index:30}.tw-mx-auto{margin-left:auto;margin-right:auto}.tw-flex{display:flex}.tw-w-full{width:100%}.tw-max-w-\\[var\\(--spacing-page-width\\)\\]{max-width:var(--spacing-page-width)}.tw-items-center{align-items:center}.tw-justify-end{justify-content:flex-end}.tw-gap-2{gap:.5rem}.tw-gap-3{gap:.75rem}.tw-rounded-md{border-radius:.375rem}.tw-bg-\\[\\#232329\\]{--tw-bg-opacity: 1;background-color:rgb(35 35 41 / var(--tw-bg-opacity))}.tw-px-3{padding-left:.75rem;padding-right:.75rem}.tw-px-4{padding-left:1rem;padding-right:1rem}.tw-py-2{padding-top:.5rem;padding-bottom:.5rem}.tw-text-\\[\\#BBBBBF\\]{--tw-text-opacity: 1;color:rgb(187 187 191 / var(--tw-text-opacity))}.tw-backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#fern-header a{font-size:16px!important;font-family:Inter,sans-serif!important}@media (min-width: 768px){.md\\:tw-px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 1024px){.lg\\:tw-px-8{padding-left:2rem;padding-right:2rem}}\n\n","featureFlagsConfig":{}},"__N_SSG":true},"page":"/static/[domain]/[[...slug]]","query":{"domain":"developers.deepgram.com","slug":["docs","text-sentiment-analysis"]},"buildId":"jigMgAOOAbh4GA_fJkAR-","assetPrefix":"https://app.ferndocs.com","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[58494,47191,22055,98508,37110,7575],"gsp":true,"scriptLoader":[]}</script></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10