Number of most likely alternative tokens to return per model input token in SampleResult.topk_prompt_logprobs. 0 disables top-k prompt log-probabilities. Maximum 20.
When true, enable reuse of the expert selections from sampled sequences during training. Only supported for mixture-of-experts models; ignored for other models.
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Together AI docs","description":"Documentation for the Together AI platform for inference and training.","colors":{"primary":"#FC4C02","light":"#FC4C02","dark":"#FC4C02"},"logo":{"light":"https://mintcdn.com/togetherai-52386018/gasg_XMR14P-KB11/logo/logo.svg?fit=max\u0026auto=format\u0026n=gasg_XMR14P-KB11\u0026q=85\u0026s=7ce2e810455d35e5916bb7253983eb98","dark":"https://mintcdn.com/togetherai-52386018/gasg_XMR14P-KB11/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=gasg_XMR14P-KB11\u0026q=85\u0026s=66f335ef8c544ef8949c4ac31557e054"},"favicon":"https://mintcdn.com/togetherai-52386018/-CXURtHnBCqpvt1N/favicon.svg?fit=max\u0026auto=format\u0026n=-CXURtHnBCqpvt1N\u0026q=85\u0026s=b3f5eec5b039ae68b2dd2a70ad0c66be","api":{"openapi":["openapi.yaml"],"playground":{"display":"simple"},"mdx":{"server":"https://api.together.ai/v1"}},"appearance":{"default":"system"},"background":{"color":{"light":"#FFFFFF","dark":"#050608"}},"navbar":{"links":[{"href":"https://api.together.ai/","label":"Sign in"}]},"footer":{"links":[{"header":"Company","items":[{"label":"About us","href":"https://www.together.ai/about"},{"label":"Careers","href":"https://www.together.ai/careers"}]},{"header":"Examples","items":[{"label":"Cookbooks","href":"https://www.together.ai/cookbooks"},{"label":"Demo apps","href":"https://www.together.ai/demos"}]},{"header":"Resources","items":[{"label":"Pricing","href":"https://www.together.ai/pricing"},{"label":"Support","href":"https://support.together.ai/"}]},{"header":"Legal","items":[{"label":"Cookie policy","href":"https://www.together.ai/cookie-policy"},{"label":"Consent preferences","href":"https://docs.together.ai/"}]}]},"fonts":{"heading":{"family":"The Future","weight":500,"source":"fonts/the-future-medium.woff2","format":"woff2"},"body":{"family":"The Future","weight":400,"source":"fonts/the-future-regular.woff2","format":"woff2"}},"icons":{"library":"tabler"},"integrations":{"ga4":{"measurementId":"G-9Q7932WNVC"}},"contextual":{"options":["copy","view","add-mcp","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"togetherai-52386018","hasAudioNarration":false,"actualSubdomain":"togetherai-52386018","customDomains":["docs.together.ai"],"gitSource":{"type":"github","owner":"togethercomputer","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae5168305ddb97afbaba182","collectionId":"90d6f6b9-135e-4d06-87db-8234f4fa3971","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae5168305ddb97afbaba182"},"feedback":{"thumbs":true,"contextualFeedback":{"allowEmail":true},"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae5168305ddb97afbaba182","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API reference","count":190},{"language":"default","tag":"TOGETHER APIS","count":185},{"language":"default","tag":"Documentation","count":156},{"language":"default","tag":"Endpoints","count":47},{"language":"default","tag":"Guides","count":42},{"language":"default","tag":"INFERENCE APIS","count":41},{"language":"default","tag":"Post-training","count":35},{"language":"default","tag":"Containers","count":26},{"language":"default","tag":"POST-TRAINING","count":22},{"language":"default","tag":"GPU CLUSTERS","count":20}]},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"type":"link","email":"[email protected]","url":"https://support.together.ai/"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 300;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD2OwG_TA.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 300;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD_OwG_TA.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 300;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD4OwG_TA.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 300;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD0OwG_TA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 300;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD1OwG_TA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 300;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD2OwG_TA.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD_OwG_TA.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD4OwG_TA.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD0OwG_TA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD1OwG_TA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD2OwG_TA.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD_OwG_TA.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD4OwG_TA.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD0OwG_TA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD1OwG_TA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD2OwG_TA.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD_OwG_TA.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD4OwG_TA.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD0OwG_TA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD1OwG_TA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 600;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 700;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD2OwG_TA.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 700;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD_OwG_TA.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 700;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD4OwG_TA.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 700;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD0OwG_TA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 700;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD1OwG_TA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 700;\n font-display: block;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbV2o-flEEny0FZhsfKu5WU4xD7OwE.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n@font-face{font-family:'The Future';src:url(/fonts/the-future-light.woff2) format('woff2');font-weight:300;font-style:normal;font-display:block}@font-face{font-family:'The Future';src:url(/fonts/the-future-bold.woff2) format('woff2');font-weight:700;font-style:normal;font-display:block}body{font-family:'The Future',ui-sans-serif,system-ui,sans-serif!important}.font-mono,code,kbd,samp{font-family:\"JetBrains Mono\",\"SF Mono\",SFMono-Regular,ui-monospace,monospace!important}body :is(.tracking-tight){letter-spacing:.02em}h1{letter-spacing:-.5px!important}h1,h2,h3,h4,h5,h6{font-weight:500!important}#content-container>div{max-width:1080px}#topbar-cta-button>a{border-radius:9999px;background-color:#fff;border:1px solid #ede9e8;padding:.375rem .75rem;gap:.625rem;height:32px}#topbar-cta-button>a>div>span{font-size:.875rem;line-height:1.25rem;font-weight:500;text-align:left;color:#262626}.prose:is(.dark *){color:#dadfe7}.method-nav-pill>span[class*=\"#3064E3\"]{background-color:#972e02!important}.method-nav-pill>span[class*=bg-blue]{background-color:rgba(151,46,2,.2)!important}.method-nav-pill>span[class*=text-blue]{color:#972e02!important}.dark .method-nav-pill>span[class*=text-blue]{color:#fc8050!important}.sidebar-group>button>div,.sidebar-group>div>div,nav [class*=group]>button>div,nav [class*=group]>div:first-child{font-family:'The Future',ui-sans-serif,system-ui,sans-serif!important}.prose b,.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6,.prose strong,a,b,button,h1,h2,h3,h4,h5,h6,input,label,li,p,select,span,strong,textarea{font-family:'The Future',ui-sans-serif,system-ui,sans-serif!important}.prose a,.prose b,.prose strong,b,strong{font-weight:500!important}.code-group .code-block-background,.code-group .code-block-background *,.code-group pre,.code-group pre *,code span,pre,pre *{font-family:\"JetBrains Mono\",\"SF Mono\",SFMono-Regular,ui-monospace,monospace!important}.columns.card-group>.card:has([data-component-part=card-image]){border:0!important;box-shadow:none!important;padding:.25rem!important}.columns.card-group>.card:has([data-component-part=card-image]):hover{border-color:transparent!important}.columns.card-group>.card [data-component-part=card-image]{height:170px;width:100%;display:block;object-fit:cover;border-radius:12px;transition:transform .3s ease-out}.columns.card-group>.card:hover [data-component-part=card-image]{transform:scale(1.03)}.columns.card-group>.card:has([data-component-part=card-image]) [data-component-part=card-content-container]{padding-left:0!important;padding-right:0!important;padding-top:.875rem!important}.sidebar-group a[href*=http] svg.flex-shrink-0,.sidebar-group a[target=_blank] svg{flex-shrink:0;margin-left:2px;width:10px;height:10px}"}],"page":{"pagePath":"reference/post-training/operations-sample-create","slug":"/reference/post-training/operations-sample-create","pageMetadata":{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/operations/sample","title":"Sample","description":"Submits a sample operation that will asynchronously generate text completions with logprobs.","href":"/reference/post-training/operations-sample-create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Submits a sample operation that will asynchronously generate text completions with logprobs.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/operations/sample","title":"Sample","description":"Submits a sample operation that will asynchronously generate text completions with logprobs.","href":"/reference/post-training/operations-sample-create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/togetherai-52386018/9caa6b942e5ff42e/cookie-banner.js","/_mintlify/custom/togetherai-52386018/640c2436e532f72c/docs/intro-custom.js","/_mintlify/custom/togetherai-52386018/f691cce87ef66561/cookbook-script.js"],"openApiReferenceData":{"operation":{"summary":"Sample","description":"Submits a sample operation that will asynchronously generate text completions with logprobs.","operationId":"Sample","tags":["RL"],"requestBody":"c981e2c1-7b2d-4f47-8b9d-69b80cfc8d7b","responses":{"200":"c67c2b9d-4a47-4f19-8f93-88729d5472ad","default":"983fa12d-403a-4566-b49e-fca19f242139"},"parameters":["85c403e1-b9da-4218-a487-667ea093d069","a177df1e-96e3-4242-a4b5-2cf3927a432f"],"x-codeSamples":[{"lang":"Python","label":"Together AI SDK (Python)","source":"import uuid\n\nfrom together import Together\n\nclient = Together()\n\n# Token IDs come from the base model's tokenizer.\noperation = client.post_training.operations.sample(\n \"\u003cSESSION_ID>\",\n idempotency_key=str(uuid.uuid4()),\n model_inputs=[\n {\"chunks\": [{\"encoded_text\": {\"tokens\": [791, 6864, 315, 9822]}}]}\n ],\n num_samples=4,\n sampling_params={\"max_tokens\": 256, \"temperature\": 1.0},\n)\nprint(operation.id, operation.status)\n"}],"method":"post","type":"path","servers":["df5d395b-4361-482a-b199-024e9b646a04"],"security":["891da42a-45db-49a9-b2ed-1e5ffa9585c5"],"path":"/v1/rl/training-sessions/{session_id}/operations/sample","baseUrlOptions":["https://api.together.ai"],"title":"Sample","codeSamples":[{"label":"Together AI SDK (Python)","lang":"Python","source":"import uuid\n\nfrom together import Together\n\nclient = Together()\n\n# Token IDs come from the base model's tokenizer.\noperation = client.post_training.operations.sample(\n \"\u003cSESSION_ID>\",\n idempotency_key=str(uuid.uuid4()),\n model_inputs=[\n {\"chunks\": [{\"encoded_text\": {\"tokens\": [791, 6864, 315, 9822]}}]}\n ],\n num_samples=4,\n sampling_params={\"max_tokens\": 256, \"temperature\": 1.0},\n)\nprint(operation.id, operation.status)\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"85c403e1-b9da-4218-a487-667ea093d069":{"name":"session_id","in":"path","required":true,"schema":{"description":"Training session ID","type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"a177df1e-96e3-4242-a4b5-2cf3927a432f":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"description":"Required key that makes retries return the original operation; use a new key for changed request bodies.","type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["model_inputs"],"properties":{"model_inputs":{"description":"Model inputs to sample from","type":"array","items":{"type":"object","required":["chunks"],"properties":{"chunks":{"description":"Input chunks for the model","type":"array","items":{"type":"object","description":"A single chunk of model input content.","required":["encoded_text"],"properties":{"encoded_text":{"type":"object","description":"Pre-tokenized text content for this input chunk.","required":["tokens"],"properties":{"tokens":{"description":"Pre-tokenized text input","type":"array","example":[123,456,789],"items":{"oneOf":[{"type":"string","uniqueKey":"model_inputs.items.[INDEX].chunks.items.[INDEX].encoded_text.tokens.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"model_inputs.items.[INDEX].chunks.items.[INDEX].encoded_text.tokens.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"model_inputs.items.[INDEX].chunks.items.[INDEX].encoded_text.tokens.items.[INDEX]","typeLabel":"string | integer"},"isRequired":true,"uniqueKey":"model_inputs.items.[INDEX].chunks.items.[INDEX].encoded_text.tokens","typeLabel":"(string | integer)[]"}},"isRequired":true,"uniqueKey":"model_inputs.items.[INDEX].chunks.items.[INDEX].encoded_text","typeLabel":"object"}},"uniqueKey":"model_inputs.items.[INDEX].chunks.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"model_inputs.items.[INDEX].chunks","typeLabel":"object[]"}},"uniqueKey":"model_inputs.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"model_inputs","typeLabel":"object[]"},"sampling_params":{"type":"object","properties":{"max_tokens":{"type":"integer","example":512,"default":512,"description":"Maximum number of tokens to generate per completion","uniqueKey":"sampling_params.max_tokens","typeLabel":"integer"},"temperature":{"type":"number","example":1,"default":1,"description":"Sampling temperature","uniqueKey":"sampling_params.temperature","typeLabel":"number"},"top_p":{"type":"number","example":1,"default":1,"description":"Nucleus sampling probability threshold","uniqueKey":"sampling_params.top_p","typeLabel":"number"},"top_k":{"type":"integer","example":-1,"default":-1,"description":"Top-k sampling limit","uniqueKey":"sampling_params.top_k","typeLabel":"integer"},"stop":{"type":"array","example":["\n","END"],"items":{"type":"string","uniqueKey":"sampling_params.stop.items.[INDEX]","typeLabel":"string"},"description":"Generation stops when any of these strings is produced","uniqueKey":"sampling_params.stop","typeLabel":"string[]"},"seed":{"oneOf":[{"type":"string","description":"Random seed for reproducible sampling for the same prompt and model state.","example":"42","uniqueKey":"sampling_params.seed.oneOf.0","typeLabel":"string"},{"type":"integer","description":"Random seed for reproducible sampling for the same prompt and model state.","example":"42","uniqueKey":"sampling_params.seed.oneOf.1","typeLabel":"integer"}],"uniqueKey":"sampling_params.seed","typeLabel":"string | integer"}},"description":"Optional sampling parameters","uniqueKey":"sampling_params","typeLabel":"object"},"num_samples":{"type":"integer","example":1,"default":1,"description":"Number of completions to generate per prompt","uniqueKey":"num_samples","typeLabel":"integer"},"prompt_logprobs":{"type":"boolean","example":false,"default":false,"description":"When true, also compute teacher-forced log-probabilities for the model input tokens and return them in `SampleResult.prompt_logprobs`.","uniqueKey":"prompt_logprobs","typeLabel":"boolean"},"topk_prompt_logprobs":{"type":"integer","minimum":0,"maximum":20,"example":0,"default":0,"description":"Number of most likely alternative tokens to return per model input token in `SampleResult.topk_prompt_logprobs`. 0 disables top-k prompt log-probabilities. Maximum 20.","uniqueKey":"topk_prompt_logprobs","typeLabel":"integer"},"return_routed_experts":{"type":"boolean","example":false,"default":false,"description":"When true, enable reuse of the expert selections from sampled sequences during training. Only supported for mixture-of-experts models; ignored for other models.","uniqueKey":"return_routed_experts","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model_inputs":[{"chunks":[{"encoded_text":{"tokens":[123,456,789]}}]}],"sampling_params":{"max_tokens":512,"temperature":1,"top_p":1,"top_k":-1,"stop":["\n","END"],"seed":"42"},"num_samples":1,"prompt_logprobs":false,"topk_prompt_logprobs":0,"return_routed_experts":false}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"c67c2b9d-4a47-4f19-8f93-88729d5472ad":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"Async sample operation","required":["id","status"],"properties":{"id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000","description":"Operation ID","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"status":{"type":"string","enum":["TRAINING_OPERATION_STATUS_UNSPECIFIED","TRAINING_OPERATION_STATUS_PENDING","TRAINING_OPERATION_STATUS_RUNNING","TRAINING_OPERATION_STATUS_COMPLETED","TRAINING_OPERATION_STATUS_FAILED"],"default":"TRAINING_OPERATION_STATUS_UNSPECIFIED","example":"TRAINING_OPERATION_STATUS_PENDING","description":"Operation status","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"output":{"type":"object","description":"Result on success","required":["results"],"properties":{"results":{"type":"array","items":{"type":"object","description":"Completions generated for a single model input","required":["sequences","policy_segments"],"properties":{"sequences":{"type":"array","items":{"type":"object","description":"A single generated completion sequence with tokens and logprobs","required":["tokens","stop_reason","prompt_cache_hit_tokens"],"properties":{"tokens":{"type":"array","example":["123","456","789"],"items":{"oneOf":[{"type":"string","uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX].tokens.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX].tokens.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX].tokens.items.[INDEX]","typeLabel":"string | integer"},"description":"Generated token IDs","isRequired":true,"uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX].tokens","typeLabel":"(string | integer)[]"},"stop_reason":{"type":"string","description":"Reason for stopping generation","enum":["STOP_REASON_LENGTH","STOP_REASON_STOP"],"example":"STOP_REASON_LENGTH","isRequired":true,"uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX].stop_reason","typeLabel":"enum\u003cstring>"},"prompt_cache_hit_tokens":{"type":"integer","format":"int32","example":1024,"description":"Number of model input tokens served from the prefix cache while generating this sequence.","isRequired":true,"uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX].prompt_cache_hit_tokens","typeLabel":"integer\u003cint32>"},"logprobs":{"type":"array","example":[-0.5,-1.2,-0.3],"items":{"type":"number","uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX].logprobs.items.[INDEX]","typeLabel":"number"},"description":"Log probabilities for each generated token","uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX].logprobs","typeLabel":"number[]"},"routed_experts_key":{"type":"string","description":"Opaque key for reusing this sequence's expert selections during training. Pass it unchanged with the corresponding training sample. Absent for non-mixture-of-experts models or when `return_routed_experts` is disabled.","uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX].routed_experts_key","typeLabel":"string"}},"uniqueKey":"output.results.items.[INDEX].sequences.items.[INDEX]","typeLabel":"object"},"description":"Generated completions","isRequired":true,"uniqueKey":"output.results.items.[INDEX].sequences","typeLabel":"object[]"},"policy_segments":{"type":"array","items":{"type":"object","description":"A (policy version, starting token) span within a sampled sequence. Version 0 is the initial model; each optim_step call increments the version by 1.","required":["version","start_token"],"properties":{"version":{"type":"integer","format":"int32","example":5,"description":"Model version under which this segment of tokens was generated","isRequired":true,"uniqueKey":"output.results.items.[INDEX].policy_segments.items.[INDEX].version","typeLabel":"integer\u003cint32>"},"start_token":{"type":"integer","format":"int32","example":0,"description":"Index of the first token of this segment within the sampled sequence. Always 0 for the first segment.","isRequired":true,"uniqueKey":"output.results.items.[INDEX].policy_segments.items.[INDEX].start_token","typeLabel":"integer\u003cint32>"}},"uniqueKey":"output.results.items.[INDEX].policy_segments.items.[INDEX]","typeLabel":"object"},"description":"Policy versions that produced these completions","isRequired":true,"uniqueKey":"output.results.items.[INDEX].policy_segments","typeLabel":"object[]"},"prompt_logprobs":{"type":"array","example":[0,-0.5,-1.2],"items":{"type":"number","format":"double","uniqueKey":"output.results.items.[INDEX].prompt_logprobs.items.[INDEX]","typeLabel":"number\u003cdouble>"},"description":"Teacher-forced log-probability of each model input token. Full prompt length; entry i corresponds to prompt token i. Entry 0 is always 0 as a placeholder: the first prompt token has no conditioning context, so it has no log-probability. Present only when prompt_logprobs was set on the request.","uniqueKey":"output.results.items.[INDEX].prompt_logprobs","typeLabel":"number\u003cdouble>[]"},"topk_prompt_logprobs":{"type":"array","items":{"type":"object","description":"The most likely alternative tokens at a single prompt position, as two parallel arrays of equal length. Both are empty for a position with no conditioning context, such as position 0.","properties":{"token_ids":{"type":"array","example":[123,456],"items":{"type":"integer","format":"int32","uniqueKey":"output.results.items.[INDEX].topk_prompt_logprobs.items.[INDEX].token_ids.items.[INDEX]","typeLabel":"integer\u003cint32>"},"description":"Token IDs of the alternatives, ordered by descending log-probability.","uniqueKey":"output.results.items.[INDEX].topk_prompt_logprobs.items.[INDEX].token_ids","typeLabel":"integer\u003cint32>[]"},"logprobs":{"type":"array","example":[-0.5,-2.1],"items":{"type":"number","format":"double","uniqueKey":"output.results.items.[INDEX].topk_prompt_logprobs.items.[INDEX].logprobs.items.[INDEX]","typeLabel":"number\u003cdouble>"},"description":"Log-probability of each alternative in `token_ids`, at the same index.","uniqueKey":"output.results.items.[INDEX].topk_prompt_logprobs.items.[INDEX].logprobs","typeLabel":"number\u003cdouble>[]"}},"uniqueKey":"output.results.items.[INDEX].topk_prompt_logprobs.items.[INDEX]","typeLabel":"object"},"description":"The most likely alternative tokens at each model input token, up to `topk_prompt_logprobs` per position. Full prompt length; entry i corresponds to prompt token i, and entry 0 is empty. Present only when topk_prompt_logprobs was set on the request.","uniqueKey":"output.results.items.[INDEX].topk_prompt_logprobs","typeLabel":"object[]"}},"uniqueKey":"output.results.items.[INDEX]","typeLabel":"object"},"description":"One result per model input","isRequired":true,"uniqueKey":"output.results","typeLabel":"object[]"}},"uniqueKey":"output","typeLabel":"object"},"error":{"type":"object","description":"Error details on failure","properties":{"code":{"type":"string","description":"Application error code","enum":["TRAINING_OPERATION_ERROR_CODE_UNSPECIFIED","TRAINING_OPERATION_ERROR_CODE_RESOURCE_EXHAUSTED","TRAINING_OPERATION_ERROR_CODE_TIMEOUT","TRAINING_OPERATION_ERROR_CODE_INTERNAL_ERROR","TRAINING_OPERATION_ERROR_CODE_SESSION_NOT_ACTIVE","TRAINING_OPERATION_ERROR_CODE_INVALID_INPUT","TRAINING_OPERATION_ERROR_CODE_NON_FINITE_LOSS"],"default":"TRAINING_OPERATION_ERROR_CODE_UNSPECIFIED","example":"TRAINING_OPERATION_ERROR_CODE_TIMEOUT","uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"description":"Human-readable error message","type":"string","example":"Operation timed out","uniqueKey":"error.message","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"550e8400-e29b-41d4-a716-446655440000","status":"TRAINING_OPERATION_STATUS_PENDING","output":{"results":[{"sequences":[{"tokens":["123","456","789"],"stop_reason":"STOP_REASON_LENGTH","prompt_cache_hit_tokens":1024,"logprobs":[-0.5,-1.2,-0.3],"routed_experts_key":"\u003cstring>"}],"policy_segments":[{"version":5,"start_token":0}],"prompt_logprobs":[0,-0.5,-1.2],"topk_prompt_logprobs":[{"token_ids":[123,456],"logprobs":[-0.5,-2.1]}]}]},"error":{"code":"TRAINING_OPERATION_ERROR_CODE_TIMEOUT","message":"Operation timed out"}}}},"exampleType":"generated"}},"exampleType":"generated"},"983fa12d-403a-4566-b49e-fca19f242139":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string","nullable":false,"isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","nullable":false,"isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","default":null,"uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","default":null,"uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","default":null,"uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","default":null,"uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"required":["type","message"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","param":null,"code":null}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"891da42a-45db-49a9-b2ed-1e5ffa9585c5":{"bearerAuth":{"type":"http","scheme":"bearer","x-bearer-format":"bearer","x-default":"default","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"df5d395b-4361-482a-b199-024e9b646a04":{"url":"https://api.together.ai","description":"Default environment for APIs"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","x-bearer-format":"bearer","x-default":"default","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","default":"default","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"togetherai-52386018","siteName":"Together AI docs","title":"Sample - Together AI docs","contextualStarterQuestions":[{"_id":"6ad91dd0fbf19541c895bf3a","deploymentId":"686f1c528aaae71885a4b279","questionText":"How does async text generation work?","status":"active","generatedBy":"contextual","path":"reference/post-training/operations-sample-create","createdAt":"2026-10-21T20:17:20.984Z","updatedAt":"2026-10-21T20:17:20.984Z","__v":0},{"_id":"6ad91dd0fbf19541c895bf39","deploymentId":"686f1c528aaae71885a4b279","questionText":"What are logprobs in completions?","status":"active","generatedBy":"contextual","path":"reference/post-training/operations-sample-create","createdAt":"2026-10-21T20:17:20.983Z","updatedAt":"2026-10-21T20:17:20.983Z","__v":0},{"_id":"6ad91dd0fbf19541c895bf38","deploymentId":"686f1c528aaae71885a4b279","questionText":"How do I create a sample operation?","status":"active","generatedBy":"contextual","path":"reference/post-training/operations-sample-create","createdAt":"2026-10-21T20:17:20.983Z","updatedAt":"2026-10-21T20:17:20.983Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-21T20:17:09.587Z","originalFileLocation":"reference/post-training/operations-sample-create.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Submits a sample operation that will asynchronously generate text completions with logprobs.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Together AI docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Sample - Together AI docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Submits a sample operation that will asynchronously generate text completions with logprobs.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Together AI docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.together.ai/reference/post-training/operations-sample-create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://togetherai-52386018.mintlify.app/_mintlify/api/og/v2?division=Operations\u0026amp;title=Sample\u0026amp;description=Submits+a+sample+operation+that+will+asynchronously+generate+text+completions+with+logprobs.\u0026amp;theme=c0e634772bf5324b338a7fcf\u0026amp;signature=a7dd86048c33391392a524a2250644abf7cf16f6591aa45b5c41281e63ed4f81\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Sample - Together AI docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Submits a sample operation that will asynchronously generate text completions with logprobs.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://togetherai-52386018.mintlify.app/_mintlify/api/og/v2?division=Operations\u0026amp;title=Sample\u0026amp;description=Submits+a+sample+operation+that+will+asynchronously+generate+text+completions+with+logprobs.\u0026amp;theme=c0e634772bf5324b338a7fcf\u0026amp;signature=a7dd86048c33391392a524a2250644abf7cf16f6591aa45b5c41281e63ed4f81\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/togetherai-52386018/GkjET5UlJhhSwWhA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Together AI docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FC4C02\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.together.ai/reference/post-training/operations-sample-create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/post-training/operations-sample-create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.together.ai/#organization\",\"name\":\"Together AI docs\",\"url\":\"https://docs.together.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/togetherai-52386018/gasg_XMR14P-KB11/logo/logo.svg?fit=max\u0026auto=format\u0026n=gasg_XMR14P-KB11\u0026q=85\u0026s=7ce2e810455d35e5916bb7253983eb98\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.together.ai#website\",\"name\":\"Together AI docs\",\"url\":\"https://docs.together.ai\",\"publisher\":{\"@id\":\"https://docs.together.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.together.ai/reference/post-training/operations-sample-create#webpage\",\"url\":\"https://docs.together.ai/reference/post-training/operations-sample-create\",\"name\":\"Sample\",\"description\":\"Submits a sample operation that will asynchronously generate text completions with logprobs.\",\"dateModified\":\"2026-10-21T20:17:09.587Z\",\"isPartOf\":{\"@id\":\"https://docs.together.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.together.ai/reference/post-training/operations-sample-create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.together.ai/reference/post-training/operations-sample-create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"TOGETHER APIS\",\"item\":\"https://docs.together.ai/reference/chat-completions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Post-training\",\"item\":\"https://docs.together.ai/reference/post-training/supported-models-list\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Operations\",\"item\":\"https://docs.together.ai/reference/post-training/operations-forward-backward-create\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Sample\",\"item\":\"https://docs.together.ai/reference/post-training/operations-sample-create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.together.ai/reference/post-training/operations-sample-create#apireference\",\"headline\":\"Sample\",\"name\":\"Sample\",\"description\":\"Submits a sample operation that will asynchronously generate text completions with logprobs.\",\"url\":\"https://docs.together.ai/reference/post-training/operations-sample-create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.together.ai/reference/post-training/operations-sample-create#webpage\"},\"dateModified\":\"2026-10-21T20:17:09.587Z\",\"publisher\":{\"@id\":\"https://docs.together.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.together.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Together AI docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Together AI docs","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/intro"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/docs/guides"}]},{"tab":"Learn","pages":[{"title":"Learn","href":"/learn"}]},{"tab":"Demos","pages":[{"title":"Demos","href":"/examples"}]},{"tab":"API reference","groups":[{"group":"TOGETHER APIS","pages":[{"group":"Chat","pages":[{"openapi":"openapi.yaml POST /v1/chat/completions","title":"Create chat completion","href":"/reference/chat-completions"}]},{"group":"Images","pages":[{"openapi":"openapi.yaml POST /v1/images/generations","title":"Create image","href":"/reference/post-images-generations"}]},{"group":"Audio","pages":[{"openapi":"openapi.yaml POST /v1/audio/speech","title":"Create audio generation request","href":"/reference/audio-speech"},{"title":"Create realtime text-to-speech","openapi":"openapi.yaml GET /v1/audio/speech/websocket","href":"/reference/audio-speech-websocket"},{"title":"List voices","openapi":"openapi.yaml GET /v1/voices","href":"/reference/voices-list"},{"openapi":"openapi.yaml POST /v1/audio/transcriptions","title":"Create audio transcription request","href":"/reference/audio-transcriptions"},{"openapi":"openapi.yaml POST /v1/audio/translations","title":"Create audio translation request","href":"/reference/audio-translations"},{"openapi":"openapi.yaml GET /v1/realtime","title":"Real-time audio transcription via WebSocket","href":"/reference/audio-transcriptions-realtime"}]},{"group":"Videos","pages":[{"openapi":"openapi.yaml POST /v2/videos","title":"Create video","href":"/reference/create-videos"},{"openapi":"openapi.yaml GET /v2/videos/{id}","title":"Fetch video metadata","href":"/reference/get-videos-id"}]},{"group":"Rerank","pages":[{"openapi":"openapi.yaml POST /v1/rerank","title":"Create a rerank request","href":"/reference/rerank"}]},{"group":"Completion","pages":[{"openapi":"openapi.yaml POST /v1/completions","title":"Create completion","href":"/reference/completions"}]},{"group":"Batches","pages":[{"openapi":"openapi.yaml GET /v1/batches","title":"List batch jobs","href":"/reference/batch-list"},{"openapi":"openapi.yaml POST /v1/batches","title":"Create a batch job","href":"/reference/batch-create"},{"openapi":"openapi.yaml GET /v1/batches/{id}","title":"Get a batch job","href":"/reference/batch-get"},{"openapi":"openapi.yaml POST /v1/batches/{id}/cancel","title":"Cancel a batch job","href":"/reference/batch-cancel"}]},{"group":"Post-training","pages":[{"openapi":"openapi.yaml GET /v1/rl/supported-models","title":"List supported models","href":"/reference/post-training/supported-models-list"},{"group":"Model resources","pages":[{"openapi":"openapi.yaml GET /v1/rl/model-resources","title":"List model resources","href":"/reference/post-training/model-resources-list"},{"openapi":"openapi.yaml POST /v1/rl/model-resources","title":"Create model resources","href":"/reference/post-training/model-resources-create"},{"openapi":"openapi.yaml POST /v1/rl/model-resources/estimate-cost","title":"Estimate on-demand model resource cost","href":"/reference/post-training/model-resources-estimate-cost"},{"openapi":"openapi.yaml GET /v1/rl/model-resources/{model_resources_id}","title":"Get model resources","href":"/reference/post-training/model-resources-get"},{"openapi":"openapi.yaml POST /v1/rl/model-resources/{model_resources_id}/extend-expiry","title":"Extend model resources expiry","href":"/reference/post-training/model-resources-extend-expiry"},{"openapi":"openapi.yaml POST /v1/rl/model-resources/{model_resources_id}/stop","title":"Stop model resources","href":"/reference/post-training/model-resources-stop"}]},{"group":"Training sessions","pages":[{"openapi":"openapi.yaml GET /v1/rl/training-sessions","title":"List training sessions","href":"/reference/post-training/training-sessions-list"},{"openapi":"openapi.yaml POST /v1/rl/training-sessions","title":"Create training session","href":"/reference/post-training/training-sessions-create"},{"openapi":"openapi.yaml GET /v1/rl/training-sessions/{session_id}","title":"Get training session","href":"/reference/post-training/training-sessions-get"},{"openapi":"openapi.yaml PATCH /v1/rl/training-sessions/{session_id}","title":"Update a training session","href":"/reference/post-training/training-sessions-update"},{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/stop","title":"Stop training session","href":"/reference/post-training/training-sessions-stop"}]},{"group":"Operations","pages":[{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/operations/forward-backward","title":"Forward-backward pass","href":"/reference/post-training/operations-forward-backward-create"},{"openapi":"openapi.yaml GET /v1/rl/training-sessions/{session_id}/operations/forward-backward/{operation_id}","title":"Get forward-backward operation","href":"/reference/post-training/operations-forward-backward-get"},{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/operations/custom-forward-backward","title":"Custom forward-backward pass","href":"/reference/post-training/operations-custom-forward-backward-create"},{"openapi":"openapi.yaml GET /v1/rl/training-sessions/{session_id}/operations/custom-forward-backward/{operation_id}","title":"Get custom forward-backward operation","href":"/reference/post-training/operations-custom-forward-backward-get"},{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/operations/optim-step","title":"Optimizer step","href":"/reference/post-training/operations-optim-step-create"},{"openapi":"openapi.yaml GET /v1/rl/training-sessions/{session_id}/operations/optim-step/{operation_id}","title":"Get optim-step operation","description":"Retrieves the current status and result of an optim-step operation.","href":"/reference/post-training/operations-optim-step-get"},{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/operations/sample","title":"Sample","href":"/reference/post-training/operations-sample-create"},{"openapi":"openapi.yaml GET /v1/rl/training-sessions/{session_id}/operations/sample/{operation_id}","title":"Get sample operation","description":"Retrieves the current status and result of a sample operation.","href":"/reference/post-training/operations-sample-get"},{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/operations/weights-sync","title":"Weights sync","href":"/reference/post-training/operations-weights-sync-create"},{"openapi":"openapi.yaml GET /v1/rl/training-sessions/{session_id}/operations/weights-sync/{operation_id}","title":"Get weights-sync operation","href":"/reference/post-training/operations-weights-sync-get"},{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/operations/inference-checkpoint","title":"Create inference checkpoint","href":"/reference/post-training/operations-inference-checkpoint-create"},{"openapi":"openapi.yaml GET /v1/rl/training-sessions/{session_id}/operations/inference-checkpoint/{operation_id}","title":"Get inference checkpoint operation","href":"/reference/post-training/operations-inference-checkpoint-get"},{"openapi":"openapi.yaml POST /v1/rl/training-sessions/{session_id}/operations/training-checkpoint","title":"Save training checkpoint","href":"/reference/post-training/operations-training-checkpoint-create"},{"openapi":"openapi.yaml GET /v1/rl/training-sessions/{session_id}/operations/training-checkpoint/{operation_id}","title":"Get save training checkpoint operation","href":"/reference/post-training/operations-training-checkpoint-get"}]},{"group":"Checkpoints","pages":[{"openapi":"openapi.yaml GET /v1/rl/checkpoints","title":"List checkpoints","href":"/reference/post-training/checkpoints-list"},{"openapi":"openapi.yaml GET /v1/rl/checkpoints/{id}","title":"Get checkpoint","href":"/reference/post-training/checkpoints-get"},{"openapi":"openapi.yaml GET /v1/rl/checkpoints/{id}/download","title":"Download checkpoint","href":"/reference/post-training/checkpoints-download"}]},{"group":"FP4 preparation","pages":[{"openapi":"openapi.yaml POST /v1/shaping/prepare-for-fp4-inference","title":"Prepare a fine-tuned model for FP4 inference","href":"/reference/post-training/fp4-inference-create"},{"openapi":"openapi.yaml POST /v1/shaping/prepare-for-fp4-inference/estimate","title":"Estimate FP4 preparation cost","href":"/reference/post-training/fp4-inference-estimate"},{"title":"List FP4 preparation jobs","openapi":"openapi.yaml GET /v1/shaping","href":"/reference/post-training/shaping-jobs-list"},{"title":"Get FP4 preparation job","openapi":"openapi.yaml GET /v1/shaping/{id}","href":"/reference/post-training/shaping-jobs-get"},{"title":"Cancel FP4 preparation job","openapi":"openapi.yaml POST /v1/shaping/{id}/cancel","href":"/reference/post-training/shaping-jobs-cancel"},{"title":"List FP4 preparation job events","openapi":"openapi.yaml GET /v1/shaping/{id}/events","href":"/reference/post-training/shaping-jobs-list-events"}]}]},{"group":"Fine-tuning","pages":[{"openapi":"openapi.yaml POST /v1/fine-tunes","title":"Create job","href":"/reference/post-fine-tunes"},{"openapi":"openapi.yaml POST /v1/fine-tunes/estimate-price","title":"Estimate price","href":"/reference/post-fine-tunes-estimate-price"},{"openapi":"openapi.yaml POST /v1/fine-tunes/preview","title":"Preview tokenized data","href":"/reference/post-fine-tunes-preview"},{"openapi":"openapi.yaml GET /v1/fine-tunes","title":"List all jobs","href":"/reference/get-fine-tunes"},{"openapi":"openapi.yaml GET /v1/fine-tunes/{id}","title":"List job","href":"/reference/get-fine-tunes-id"},{"openapi":"openapi.yaml GET /v1/fine-tunes/{id}/events","title":"List job events","href":"/reference/get-fine-tunes-id-events"},{"openapi":"openapi.yaml GET /v1/fine-tunes/{id}/checkpoints","title":"List checkpoints","href":"/reference/get-fine-tunes-id-checkpoint"},{"openapi":"openapi.yaml GET /v1/fine-tunes/{id}/metrics","title":"Get metrics","href":"/reference/get-fine-tunes-id-metrics"},{"openapi":"openapi.yaml GET /v1/fine-tunes/{id}/download-tokenized-dataset","title":"Download tokenized dataset","href":"/reference/get-fine-tunes-id-download-tokenized-dataset"},{"openapi":"openapi.yaml GET /v1/finetune/download","title":"Download model","href":"/reference/get-finetune-download"},{"openapi":"openapi.yaml POST /v1/fine-tunes/{id}/cancel","title":"Cancel job","href":"/reference/post-fine-tunes-id-cancel"},{"openapi":"openapi.yaml DELETE /v1/fine-tunes/{id}","title":"Delete a fine-tune job","href":"/reference/delete-fine-tunes-id"},{"openapi":"openapi.yaml GET /v1/fine-tunes/models/supported","title":"List supported models","href":"/reference/get-fine-tunes-models-supported"},{"openapi":"openapi.yaml GET /v1/fine-tunes/models/limits","title":"Get model limits","href":"/reference/get-fine-tunes-models-limits"}]},{"group":"Evaluations","pages":[{"openapi":"openapi.yaml POST /v1/evaluation","title":"Create an evaluation job","href":"/reference/create-evaluation"},{"openapi":"openapi.yaml GET /v1/evaluation","title":"Get all evaluation jobs","href":"/reference/list-evaluations"},{"openapi":"openapi.yaml GET /v1/evaluation/{id}","title":"Get evaluation job details","href":"/reference/get-evaluation"},{"openapi":"openapi.yaml GET /v1/evaluation/{id}/status","title":"Get evaluation job status and results","href":"/reference/get-evaluation-status"},{"openapi":"openapi.yaml GET /v1/evaluation/model-list","title":"Get model list","href":"/reference/list-evaluation-models"}]},{"group":"Files","pages":[{"openapi":"openapi.yaml GET /v1/files","title":"List all files","href":"/reference/get-files"},{"openapi":"openapi.yaml GET /v1/files/{id}","title":"Retrieve file metadata","href":"/reference/get-files-id"},{"openapi":"openapi.yaml DELETE /v1/files/{id}","title":"Delete a file","href":"/reference/delete-files-id"},{"openapi":"openapi.yaml GET /v1/files/{id}/content","title":"Get file contents","href":"/reference/get-files-id-content"},{"openapi":"openapi.yaml POST /v1/files/upload","title":"Upload a file","href":"/reference/upload-file"}]},{"group":"Clusters","pages":[{"openapi":"openapi.yaml POST /v1/compute/clusters","title":"Create a GPU cluster","href":"/reference/clusters-create"},{"openapi":"openapi.yaml GET /v1/compute/clusters","title":"List all GPU clusters","href":"/reference/clusters-list"},{"openapi":"openapi.yaml GET /v1/compute/clusters/{cluster_id}","title":"Get GPU cluster by cluster ID","href":"/reference/clusters-get"},{"openapi":"openapi.yaml PUT /v1/compute/clusters/{cluster_id}","title":"Update a GPU cluster","href":"/reference/clusters-update"},{"openapi":"openapi.yaml DELETE /v1/compute/clusters/{cluster_id}","title":"Delete GPU cluster by cluster ID","href":"/reference/clusters-delete"},{"group":"Storage","pages":[{"openapi":"openapi.yaml POST /v1/compute/clusters/storage/volumes","title":"Create a shared volume","href":"/reference/clusters_storages-create"},{"openapi":"openapi.yaml GET /v1/compute/clusters/storage/volumes","title":"List all shared volumes","href":"/reference/clusters_storages-list"},{"openapi":"openapi.yaml GET /v1/compute/clusters/storage/volumes/{volume_id}","title":"Get a shared volume by ID","href":"/reference/clusters_storages-get"},{"openapi":"openapi.yaml PUT /v1/compute/clusters/storage/volumes","title":"Update a shared volume","href":"/reference/clusters_storages-update"},{"openapi":"openapi.yaml DELETE /v1/compute/clusters/storage/volumes/{volume_id}","title":"Delete a shared volume by ID","href":"/reference/clusters_storages-delete"}]},{"group":"Remediation","pages":[{"openapi":"openapi.yaml GET /v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations/{remediation_id}","title":null,"href":"/reference/remediation-get"},{"openapi":"openapi.yaml GET /v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations","title":"List remediations","href":"/reference/remediation-list"},{"openapi":"openapi.yaml POST /v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations","title":null,"href":"/reference/remediation-create"},{"openapi":"openapi.yaml POST /v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations/{remediation_id}/approve","title":null,"href":"/reference/remediation-approve"},{"openapi":"openapi.yaml POST /v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations/{remediation_id}/cancel","title":null,"href":"/reference/remediation-cancel"},{"openapi":"openapi.yaml POST /v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations/{remediation_id}/reject","title":null,"href":"/reference/remediation-reject"}]},{"openapi":"openapi.yaml GET /v1/compute/regions","title":"List regions and corresponding supported driver versions","href":"/reference/clusters-list-regions"}]},{"group":"Containers","pages":[{"group":"Deployments","pages":[{"openapi":"openapi.yaml GET /v1/deployments","title":"Get the list of deployments","href":"/reference/deployments-list"},{"openapi":"openapi.yaml POST /v1/deployments","title":"Create a new deployment","href":"/reference/deployments-create"},{"openapi":"openapi.yaml GET /v1/deployments/{id}","title":"Get a deployment by ID or name","href":"/reference/deployments-get"},{"openapi":"openapi.yaml PATCH /v1/deployments/{id}","title":"Update a deployment","href":"/reference/deployments-update"},{"openapi":"openapi.yaml DELETE /v1/deployments/{id}","title":"Delete a deployment","href":"/reference/deployments-delete"},{"openapi":"openapi.yaml GET /v1/deployments/{id}/logs","title":"Get logs for a deployment","href":"/reference/deployments-logs"},{"openapi":"openapi.yaml GET /v1/deployments/{id}/revisions","title":"List revision history events of a deployment","href":"/reference/deployments-revisions-list"},{"openapi":"openapi.yaml GET /v1/deployments/{id}/revisions/{revisionIdentifier}","title":"Get the full configuration of a specific revision","href":"/reference/deployments-revisions-get"},{"openapi":"openapi.yaml POST /v1/deployments/{id}/rollback","title":"Roll back a deployment to a previous revision","href":"/reference/deployments-rollback"}]},{"group":"Secrets","pages":[{"openapi":"openapi.yaml GET /v1/deployments/secrets","title":"Get the list of project secrets","href":"/reference/deployments-secrets-list"},{"openapi":"openapi.yaml POST /v1/deployments/secrets","title":"Create a new secret","href":"/reference/deployments-secrets-create"},{"openapi":"openapi.yaml GET /v1/deployments/secrets/{id}","title":"Get a secret by ID or name","href":"/reference/deployments-secrets-get"},{"openapi":"openapi.yaml PATCH /v1/deployments/secrets/{id}","title":"Update a secret","href":"/reference/deployments-secrets-update"},{"openapi":"openapi.yaml DELETE /v1/deployments/secrets/{id}","title":"Delete a secret","href":"/reference/deployments-secrets-delete"}]},{"group":"Storage","pages":[{"openapi":"openapi.yaml GET /v1/deployments/storage/{filename}","title":"Download a file","href":"/reference/deployments-storage-get"},{"openapi":"openapi.yaml GET /v1/deployments/storage/{filename}/url","title":"Get a file download URL","href":"/reference/deployments-storage-get-url"},{"openapi":"openapi.yaml GET /v1/deployments/storage/volumes","title":"Get the list of project volumes","href":"/reference/deployments-storage-volumes-list"},{"openapi":"openapi.yaml POST /v1/deployments/storage/volumes","title":"Create a new volume","href":"/reference/deployments-storage-volumes-create"},{"openapi":"openapi.yaml GET /v1/deployments/storage/volumes/{id}","title":"Get a volume by ID or name","href":"/reference/deployments-storage-volumes-get"},{"openapi":"openapi.yaml PATCH /v1/deployments/storage/volumes/{id}","title":"Update a volume","href":"/reference/deployments-storage-volumes-update"},{"openapi":"openapi.yaml DELETE /v1/deployments/storage/volumes/{id}","title":"Delete a volume","href":"/reference/deployments-storage-volumes-delete"}]},{"group":"Queue","pages":[{"openapi":"openapi.yaml POST /v1/queue/submit","title":"Submit a queued job","href":"/reference/queue-submit"},{"openapi":"openapi.yaml GET /v1/queue/status","title":"Get job status","href":"/reference/queue-status"},{"openapi":"openapi.yaml POST /v1/queue/cancel","title":"Cancel a queued job","href":"/reference/queue-cancel"},{"openapi":"openapi.yaml POST /v1/queue/clear","title":"Clear a model's pending jobs","href":"/reference/queue-clear"},{"openapi":"openapi.yaml GET /v1/queue/metrics","title":"Get queue metrics","href":"/reference/queue-metrics"}]}]},{"group":"Identity","pages":[{"openapi":"openapi.yaml GET /v3/whoami","title":"Identify the caller","href":"/reference/whoami"},{"title":"List projects","openapi":"openapi.yaml GET /v1/projects","href":"/reference/projects-list"}]},{"group":"Billing","pages":[{"title":"Get billing usage","openapi":"openapi.yaml GET /v1/billing/usage","tag":"BETA","playground":"simple","href":"/reference/billing-usage"}]},{"group":"Endpoints","pages":[{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints","title":"List endpoints","href":"/reference/dmi/endpoints-list"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints","title":"Create an endpoint","href":"/reference/dmi/endpoints-create"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{id}","title":"Get an endpoint","href":"/reference/dmi/endpoints-get"},{"openapi":"openapi.yaml PATCH /v2/projects/{projectId}/endpoints/{id}","title":"Update an endpoint","href":"/reference/dmi/endpoints-update"},{"openapi":"openapi.yaml DELETE /v2/projects/{projectId}/endpoints/{id}","title":"Delete an endpoint","href":"/reference/dmi/endpoints-delete"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{id}/events","title":"List endpoint events","href":"/reference/dmi/endpoints-list-events"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{id}/analytics","title":"Get endpoint analytics","href":"/reference/dmi/endpoints-analytics"},{"openapi":"openapi.yaml GET /v2/organizations/{organizationId}/endpoints","title":"List organization endpoints","href":"/reference/dmi/endpoints-list-organization"},{"group":"Deployments","pages":[{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/deployments","title":"List deployments","href":"/reference/dmi/deployments-list"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/deployments","title":"Create a deployment","href":"/reference/dmi/deployments-create"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{id}","title":"Get a deployment","href":"/reference/dmi/deployments-get"},{"openapi":"openapi.yaml PATCH /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{id}","title":"Update a deployment","href":"/reference/dmi/deployments-update"},{"openapi":"openapi.yaml DELETE /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{id}","title":"Delete a deployment","href":"/reference/dmi/deployments-delete"}]},{"group":"Adapters","pages":[{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{deploymentId}/adapters","title":"List deployment adapters","href":"/reference/dmi/adapters-list"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{deploymentId}/adapters","title":"Add a deployment adapter","href":"/reference/dmi/adapters-add"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{deploymentId}/adapters/{id}","title":"Get a deployment adapter","href":"/reference/dmi/adapters-get"},{"openapi":"openapi.yaml PATCH /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{deploymentId}/adapters/{id}","title":"Update a deployment adapter","href":"/reference/dmi/adapters-update"},{"openapi":"openapi.yaml DELETE /v2/projects/{projectId}/endpoints/{endpointId}/deployments/{deploymentId}/adapters/{id}","title":"Remove a deployment adapter","href":"/reference/dmi/adapters-remove"}]},{"group":"Placement profiles","pages":[{"openapi":"openapi.yaml GET /v2/projects/{projectId}/placement-profiles","title":"List placement profiles","href":"/reference/dmi/placement-profiles-list"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/placement-profiles/{id}","title":"Get a placement profile","href":"/reference/dmi/placement-profiles-get"}]},{"group":"Instance types","pages":[{"openapi":"openapi.yaml GET /v2/public/inference-instance-types","title":"List inference instance types","href":"/reference/dmi/instance-types-list"},{"openapi":"openapi.yaml GET /v2/public/inference-instance-types/{id}","title":"Get an inference instance type","href":"/reference/dmi/instance-types-get"}]},{"group":"A/B experiments","pages":[{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/abExperiments","title":"List A/B experiments","href":"/reference/dmi/ab-experiments-list"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/abExperiments","title":"Create an A/B experiment","href":"/reference/dmi/ab-experiments-create"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/abExperiments/{id}","title":"Get an A/B experiment","href":"/reference/dmi/ab-experiments-get"},{"openapi":"openapi.yaml PATCH /v2/projects/{projectId}/endpoints/{endpointId}/abExperiments/{id}","title":"Update an A/B experiment","href":"/reference/dmi/ab-experiments-update"},{"openapi":"openapi.yaml DELETE /v2/projects/{projectId}/endpoints/{endpointId}/abExperiments/{id}","title":"Delete an A/B experiment","href":"/reference/dmi/ab-experiments-delete"}]},{"group":"Shadow experiments","pages":[{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments","title":"List shadow experiments","href":"/reference/dmi/shadow-experiments-list"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments","title":"Create a shadow experiment","href":"/reference/dmi/shadow-experiments-create"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments/{id}","title":"Get a shadow experiment","href":"/reference/dmi/shadow-experiments-get"},{"openapi":"openapi.yaml PATCH /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments/{id}","title":"Update a shadow experiment","href":"/reference/dmi/shadow-experiments-update"},{"openapi":"openapi.yaml DELETE /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments/{id}","title":"Delete a shadow experiment","href":"/reference/dmi/shadow-experiments-delete"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments/{experimentId}/targets","title":"List shadow experiment targets","href":"/reference/dmi/shadow-experiment-targets-list"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments/{experimentId}/targets","title":"Create a shadow experiment target","href":"/reference/dmi/shadow-experiment-targets-create"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments/{experimentId}/targets/{id}","title":"Get a shadow experiment target","href":"/reference/dmi/shadow-experiment-targets-get"},{"openapi":"openapi.yaml PATCH /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments/{experimentId}/targets/{id}","title":"Update a shadow experiment target","href":"/reference/dmi/shadow-experiment-targets-update"},{"openapi":"openapi.yaml DELETE /v2/projects/{projectId}/endpoints/{endpointId}/shadowExperiments/{experimentId}/targets/{id}","title":"Delete a shadow experiment target","href":"/reference/dmi/shadow-experiment-targets-delete"}]},{"group":"Rollouts","pages":[{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/rollouts","title":"List endpoint rollouts","href":"/reference/dmi/rollouts-list"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/rollouts/preview-defaults","title":"Preview rollout defaults","href":"/reference/dmi/rollouts-preview-defaults"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/rollouts","title":"Create a rollout","href":"/reference/dmi/rollouts-create"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/endpoints/{endpointId}/rollouts/{id}","title":"Get a rollout","href":"/reference/dmi/rollouts-get"},{"openapi":"openapi.yaml DELETE /v2/projects/{projectId}/endpoints/{endpointId}/rollouts/{id}","title":"Delete a rollout","href":"/reference/dmi/rollouts-delete"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/rollouts/{id}/start","title":"Start a rollout","href":"/reference/dmi/rollouts-start"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/rollouts/{id}/pause","title":"Pause a rollout","href":"/reference/dmi/rollouts-pause"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/rollouts/{id}/resume","title":"Resume a rollout","href":"/reference/dmi/rollouts-resume"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/rollouts/{id}/promote","title":"Promote a rollout","href":"/reference/dmi/rollouts-promote"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/endpoints/{endpointId}/rollouts/{id}/cancel","title":"Cancel a rollout","href":"/reference/dmi/rollouts-cancel"}]}]},{"group":"Models","pages":[{"openapi":"openapi.yaml GET /v2/supported-models","title":"List supported models","href":"/reference/dmi/supported-models-list"},{"openapi":"openapi.yaml GET /v2/supported-models/{id}","title":"Get a supported model","href":"/reference/dmi/supported-models-get"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/models","title":"List project models","href":"/reference/dmi/models-list"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/models","title":"Create a model","href":"/reference/dmi/models-create"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/models/{id}","title":"Get a model","href":"/reference/dmi/models-get"},{"openapi":"openapi.yaml PATCH /v2/projects/{projectId}/models/{id}","title":"Update a model","href":"/reference/dmi/models-update"},{"openapi":"openapi.yaml DELETE /v2/projects/{projectId}/models/{id}","title":"Delete a model","href":"/reference/dmi/models-delete"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/models/{id}/files","title":"List model files","href":"/reference/dmi/models-list-files"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/models/{id}/revisions","title":"List model revisions","href":"/reference/dmi/models-list-revisions"},{"title":"Get a model revision","openapi":"openapi.yaml GET /v2/projects/{projectId}/models/{id}/revisions/{revisionId}","href":"/reference/dmi/models-get-revision"},{"openapi":"openapi.yaml GET /v2/organizations/{organizationId}/models","title":"List organization models","href":"/reference/dmi/models-list-organization"},{"openapi":"openapi.yaml POST /v2/projects/{projectId}/models/uploads","title":"Create a remote model upload","href":"/reference/dmi/model-uploads-create"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/models/uploads","title":"List remote model uploads","href":"/reference/dmi/model-uploads-list"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/models/uploads/{id}","title":"Get a remote model upload","href":"/reference/dmi/model-uploads-get"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/models/uploads/{id}/events","title":"List remote model upload events","href":"/reference/dmi/model-uploads-list-events"},{"group":"Model configurations","pages":[{"openapi":"openapi.yaml GET /v2/projects/{projectId}/configs","title":"List model configurations","href":"/reference/dmi/configs-list"},{"openapi":"openapi.yaml GET /v2/projects/{projectId}/configs/{id}","title":"Get a model configuration","href":"/reference/dmi/configs-get"}]}]}]},{"group":"SDK LIBRARIES","pages":[{"title":"Python Library","url":"https://github.com/togethercomputer/together-py","href":"/python-library"},{"title":"TypeScript Library","url":"https://github.com/togethercomputer/together-typescript","href":"/typescript-library"},{"title":"SDK v3 migration","href":"/docs/sdk-v3-migration-guide"},{"title":"SDK v2 migration (Python)","href":"/docs/pythonv2-migration-guide"}]},{"group":"ERROR CODES","pages":[{"title":"Error codes","mode":"wide","href":"/docs/error-codes"}]}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/reference/cli/getting-started"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/docs/changelog"}]}]},"basePath":"","title":"Sample - Together AI docs","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}