Media generation that cannot finish inside one request becomes a task. This route
returns the current state of one task and, once it finishes, its result.
Video created through POST /v2/videos has its own
envelope and its own poll route, GET /v2/videos/{id}.
Use this route for tasks created by the /v1 media endpoints.
string
required
Task ID. PipeLLM-managed tasks start with gen-. The upstream provider’s own task ID
is also accepted for tasks that were created directly against a provider.
One of pending, processing, completed, failed, or cancelled.
string
image_generation, image_edit, video_generation, or audio_generation.
string
Model that is producing the result.
string
When the task was created.
object
The result. Present once status is completed; its shape follows the task type.
string
Failure reason. Present when status is failed.
Polling
A task moves pending → processing → one of completed / failed / cancelled.
Only those three are terminal; stop polling when you see one.Poll every few seconds rather than in a tight loop — polls count against your
rate limit, and polling faster does not make the
upstream finish sooner.
Errors
Same envelope as Errors. An unknown ID returns 404; a task
that belongs to another account is not visible to you and returns the same 404.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"PipeLLM","colors":{"primary":"#12B76A","light":"#3DF58F","dark":"#0E9152"},"logo":{"light":"https://mintcdn.com/pipellm/c14KpYQEcMuO-i7Z/logo/light.svg?fit=max\u0026auto=format\u0026n=c14KpYQEcMuO-i7Z\u0026q=85\u0026s=e63d66e7731e79c17fab3ac12709e0b1","dark":"https://mintcdn.com/pipellm/c14KpYQEcMuO-i7Z/logo/dark.svg?fit=max\u0026auto=format\u0026n=c14KpYQEcMuO-i7Z\u0026q=85\u0026s=3205f7a8fd0d53df4ccbd10fc7fff796"},"favicon":"https://mintcdn.com/pipellm/c14KpYQEcMuO-i7Z/favicon.svg?fit=max\u0026auto=format\u0026n=c14KpYQEcMuO-i7Z\u0026q=85\u0026s=696ba46d25b2028f32c94b319736a36c","api":{"params":{"expanded":"all"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go"],"prefill":true},"mdx":{"auth":{"method":"bearer"},"server":"https://api.pipellm.ai"}},"appearance":{"default":"dark"},"background":{"color":{"light":"#FCFCFD","dark":"#05080A"}},"navbar":{"links":[{"href":"https://pipellm.ai/models","label":"Models"},{"href":"https://pipellm.ai/playground","label":"Playground"},{"href":"https://pipellm.ai/pricing","label":"Pricing"},{"href":"https://pipellm.ai/blog","label":"Blog"},{"href":"mailto:support@pipellm.ai","label":"Support"}],"primary":{"type":"button","label":"Console","href":"https://console.pipellm.ai"}},"footer":{"socials":{"x":"https://x.com/pipellm","github":"https://github.com/pipellm","linkedin":"https://linkedin.com/company/pipellm"}},"search":{},"fonts":{"heading":{"family":"Plus Jakarta Sans","weight":400},"body":{"family":"Plus Jakarta Sans","weight":400}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"dark","latex":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"languages":[{"language":"en","href":""},{"language":"zh","href":"zh"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pipellm","hasAudioNarration":false,"actualSubdomain":"pipellm","customDomains":["docs.pipellm.ai"],"gitSource":{"type":"github","owner":"pipellm-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ab0bf26528446e729be3cf7","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"en","tag":"API Reference","count":51},{"language":"zh","tag":"API 参考","count":51},{"language":"en","tag":"Relay","count":16},{"language":"zh","tag":"Relay","count":16},{"language":"en","tag":"Integrations","count":7},{"language":"zh","tag":"集成","count":7},{"language":"en","tag":"Guides","count":6},{"language":"en","tag":"WebSearch","count":6},{"language":"zh","tag":"指南","count":6},{"language":"zh","tag":"WebSearch","count":6},{"language":"en","tag":"API Guides","count":5},{"language":"en","tag":"Protocol Conversion","count":5},{"language":"zh","tag":"API 指南","count":5},{"language":"zh","tag":"协议转换","count":5},{"language":"en","tag":"Images","count":4},{"language":"en","tag":"Video","count":4},{"language":"zh","tag":"图像","count":4},{"language":"zh","tag":"视频","count":4},{"language":"en","tag":"V2 (Recommended)","count":3},{"language":"zh","tag":"V2(推荐)","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".dark img[src*=\"/logo/providers/\"]{filter:brightness(0.715)}:root:root{--gray-50: 246 248 249;--gray-100: 240 243 244;--gray-200: 224 228 230;--gray-300: 206 211 214;--gray-400: 158 165 169;--gray-500: 112 119 123;--gray-600: 80 87 91;--gray-700: 62 69 73;--gray-800: 36 42 46;--gray-900: 22 27 30;--gray-950: 10 14 16}.dark{--default-border-color: rgb(252 252 253 / 0.14)}#request-example,#response-example{border-radius:0.75rem}method-pill,.method-pill{letter-spacing:0.04em}#pipellm-playground-mask{display:none}[data-pipellm-playground]>[role=\"presentation\"].bg-black\\/40{background:rgb(3 8 12 / 0.55)!important;backdrop-filter:blur(14px) saturate(1.2);-webkit-backdrop-filter:blur(14px) saturate(1.2);transition-duration:320ms!important}:root:not(.dark) [data-pipellm-playground]>[role=\"presentation\"].bg-black\\/40{background:rgb(248 250 250 / 0.55)!important}[data-pipellm-playground] [role=\"dialog\"]{border-radius:16px!important;box-shadow:0 0 0 1px rgb(255 255 255 / 0.08),\n 0 32px 96px rgb(0 0 0 / 0.55),\n 0 8px 24px rgb(0 0 0 / 0.35)!important;transition-property:transform, scale, translate, opacity!important;transition-duration:320ms!important;transition-timing-function:cubic-bezier(0.16, 1, 0.3, 1)!important}:root:not(.dark) [data-pipellm-playground] [role=\"dialog\"]{box-shadow:0 0 0 1px rgb(0 0 0 / 0.06),\n 0 32px 96px rgb(0 0 0 / 0.18),\n 0 8px 24px rgb(0 0 0 / 0.10)!important}[data-pipellm-playground] [role=\"dialog\"][data-starting-style]{opacity:0!important;scale:0.97!important;translate:0 18px!important}[data-pipellm-playground] [role=\"dialog\"][data-ending-style]{opacity:0!important;scale:0.985!important;translate:0 8px!important;transition-duration:180ms!important}"}],"page":{"pagePath":"api-reference/tasks/get","slug":"/api-reference/tasks/get","pageMetadata":{"title":"Get a task","api":"GET /v1/tasks/{task_id}","description":"Poll the status of an asynchronous image, video, or audio task.","i18n":"en","href":"/api-reference/tasks/get"},"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: \"Poll the status of an asynchronous image, video, or audio task.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,..._provideComponents(),...props.components},{Heading,Info,ParamField,ResponseField}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Media generation that cannot finish inside one request becomes a task. This route\nreturns the current state of one task and, once it finishes, its result.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Video created through `,_jsx(_components.a,{href:`/api-reference/video/create`,children:_jsx(_components.code,{children:`POST /v2/videos`})}),` has its own\nenvelope and its own poll route, `,_jsx(_components.a,{href:`/api-reference/video/get`,children:_jsx(_components.code,{children:`GET /v2/videos/{id}`})}),`.\nUse this route for tasks created by the `,_jsx(_components.code,{children:`/v1`}),` media endpoints.`]})}),`\n`,_jsx(ParamField,{path:`task_id`,type:`string`,required:true,id:`param-task-id`,children:_jsxs(_components.p,{children:[`Task ID. PipeLLM-managed tasks start with `,_jsx(_components.code,{children:`gen-`}),`. The upstream provider’s own task ID\nis also accepted for tasks that were created directly against a provider.`]})}),`\n`,`\n`,`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsxs(_components.p,{children:[`Task ID. Use it on this route and on `,_jsx(_components.a,{href:`/api-reference/tasks/cancel`,children:`cancel`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`One of `,_jsx(_components.code,{children:`pending`}),`, `,_jsx(_components.code,{children:`processing`}),`, `,_jsx(_components.code,{children:`completed`}),`, `,_jsx(_components.code,{children:`failed`}),`, or `,_jsx(_components.code,{children:`cancelled`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`image_generation`}),`, `,_jsx(_components.code,{children:`image_edit`}),`, `,_jsx(_components.code,{children:`video_generation`}),`, or `,_jsx(_components.code,{children:`audio_generation`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`model`,type:`string`,id:`param-model`,children:_jsx(_components.p,{children:`Model that is producing the result.`})}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the task was created.`})}),`\n`,_jsx(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:_jsxs(_components.p,{children:[`The result. Present once `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`completed`}),`; its shape follows the task `,_jsx(_components.code,{children:`type`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error`,children:_jsxs(_components.p,{children:[`Failure reason. Present when `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`failed`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`polling`,children:`Polling`}),`\n`,_jsxs(_components.p,{children:[`A task moves `,_jsx(_components.code,{children:`pending`}),` → `,_jsx(_components.code,{children:`processing`}),` → one of `,_jsx(_components.code,{children:`completed`}),` / `,_jsx(_components.code,{children:`failed`}),` / `,_jsx(_components.code,{children:`cancelled`}),`.\nOnly those three are terminal; stop polling when you see one.`]}),`\n`,_jsxs(_components.p,{children:[`Poll every few seconds rather than in a tight loop — polls count against your\n`,_jsx(_components.a,{href:`/api-reference/rate-limits`,children:`rate limit`}),`, and polling faster does not make the\nupstream finish sooner.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`Same envelope as `,_jsx(_components.a,{href:`/api-reference/errors`,children:`Errors`}),`. An unknown ID returns `,_jsx(_components.code,{children:`404`}),`; a task\nthat belongs to another account is not visible to you and returns the same `,_jsx(_components.code,{children:`404`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Get a task","api":"GET /v1/tasks/{task_id}","description":"Poll the status of an asynchronous image, video, or audio task.","i18n":"en","href":"/api-reference/tasks/get"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,ParamField,RequestExample,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Media generation that cannot finish inside one request becomes a task. This route\nreturns the current state of one task and, once it finishes, its result.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Video created through `,_jsx(_components.a,{href:`/api-reference/video/create`,children:_jsx(_components.code,{children:`POST /v2/videos`})}),` has its own\nenvelope and its own poll route, `,_jsx(_components.a,{href:`/api-reference/video/get`,children:_jsx(_components.code,{children:`GET /v2/videos/{id}`})}),`.\nUse this route for tasks created by the `,_jsx(_components.code,{children:`/v1`}),` media endpoints.`]})}),`\n`,_jsx(ParamField,{path:`task_id`,type:`string`,required:true,id:`param-task-id`,children:_jsxs(_components.p,{children:[`Task ID. PipeLLM-managed tasks start with `,_jsx(_components.code,{children:`gen-`}),`. The upstream provider’s own task ID\nis also accepted for tasks that were created directly against a provider.`]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` https://api.pipellm.ai/v1/tasks/gen-1732891234-abc123xyz`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$PIPELLM_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` os, time, requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`headers = {`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`'PIPELLM_API_KEY'`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`while`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` True`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` task = requests.get(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.pipellm.ai/v1/tasks/`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`task_id`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=headers`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ).json()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` task[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`in`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cancelled\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:` break`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`(task[`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`], task.get(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`), task.get(`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"gen-1732891234-abc123xyz\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"processing\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"video_generation\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"seedance-2-0-mini\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-17T08:14:02Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsxs(_components.p,{children:[`Task ID. Use it on this route and on `,_jsx(_components.a,{href:`/api-reference/tasks/cancel`,children:`cancel`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`One of `,_jsx(_components.code,{children:`pending`}),`, `,_jsx(_components.code,{children:`processing`}),`, `,_jsx(_components.code,{children:`completed`}),`, `,_jsx(_components.code,{children:`failed`}),`, or `,_jsx(_components.code,{children:`cancelled`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`image_generation`}),`, `,_jsx(_components.code,{children:`image_edit`}),`, `,_jsx(_components.code,{children:`video_generation`}),`, or `,_jsx(_components.code,{children:`audio_generation`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`model`,type:`string`,id:`param-model`,children:_jsx(_components.p,{children:`Model that is producing the result.`})}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the task was created.`})}),`\n`,_jsx(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:_jsxs(_components.p,{children:[`The result. Present once `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`completed`}),`; its shape follows the task `,_jsx(_components.code,{children:`type`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error`,children:_jsxs(_components.p,{children:[`Failure reason. Present when `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`failed`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`polling`,children:`Polling`}),`\n`,_jsxs(_components.p,{children:[`A task moves `,_jsx(_components.code,{children:`pending`}),` → `,_jsx(_components.code,{children:`processing`}),` → one of `,_jsx(_components.code,{children:`completed`}),` / `,_jsx(_components.code,{children:`failed`}),` / `,_jsx(_components.code,{children:`cancelled`}),`.\nOnly those three are terminal; stop polling when you see one.`]}),`\n`,_jsxs(_components.p,{children:[`Poll every few seconds rather than in a tight loop — polls count against your\n`,_jsx(_components.a,{href:`/api-reference/rate-limits`,children:`rate limit`}),`, and polling faster does not make the\nupstream finish sooner.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`Same envelope as `,_jsx(_components.a,{href:`/api-reference/errors`,children:`Errors`}),`. An unknown ID returns `,_jsx(_components.code,{children:`404`}),`; a task\nthat belongs to another account is not visible to you and returns the same `,_jsx(_components.code,{children:`404`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Get a task","api":"GET /v1/tasks/{task_id}","description":"Poll the status of an asynchronous image, video, or audio task.","i18n":"en","href":"/api-reference/tasks/get"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Polling","slug":"polling","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> https://api.pipellm.ai/v1/tasks/gen-1732891234-abc123xyz\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$PIPELLM_API_KEY\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"14\">\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> os, time, requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">headers = {\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"Authorization\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">f\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"Bearer \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">os.environ[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">'PIPELLM_API_KEY'\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">]\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">while\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> True\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> task = requests.get(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> f\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"https://api.pipellm.ai/v1/tasks/\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">task_id\u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">headers\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=headers\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> ).json()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\"> if\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> task[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"status\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">] \u003c/span>\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">in\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"completed\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"failed\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"cancelled\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">):\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\"> break\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> time.sleep(\u003c/span>\u003cspan style=\"color:#B5CEA8;--shiki-dark:#B5CEA8\">3\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">(task[\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"status\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">], task.get(\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"data\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">), task.get(\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"error\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">))\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"gen-1732891234-abc123xyz\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"processing\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"video_generation\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"seedance-2-0-mini\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"2026-09-17T08:14:02Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Get a task","path":"/v1/tasks/{task_id}","servers":[{"url":"https://api.pipellm.ai"}],"method":"get","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{"task_id":{"schema":[{"type":"string","description":"Task ID. PipeLLM-managed tasks start with `gen-` . The upstream provider’s own task ID is also accepted for tasks that were created directly against a provider.","required":true}]}}},"body":{}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"Task ID. Use it on this route and on cancel ."}],"status":[{"type":"string","description":"One of `pending` , `processing` , `completed` , `failed` , or `cancelled` ."}],"type":[{"type":"string","description":"`image_generation` , `image_edit` , `video_generation` , or `audio_generation` ."}],"model":[{"type":"string","description":"Model that is producing the result."}],"created_at":[{"type":"string","description":"When the task was created."}],"data":[{"type":"object","properties":{},"description":"The result. Present once `status` is `completed` ; its shape follows the task `type` ."}],"error":[{"type":"string","description":"Failure reason. Present when `status` is `failed` ."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","status":"\u003cstring>","type":"\u003cstring>","model":"\u003cstring>","created_at":"\u003cstring>","data":{},"error":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/pipellm/df480d64db6c22d0/playground.js"],"subdomain":"pipellm","siteName":"PipeLLM","title":"Get a task - PipeLLM","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/tasks/get","matchLevel":0},"zh":{"href":"/zh/api-reference/tasks/get","matchLevel":1}}},"lastModified":"2026-09-19T04:58:56.431Z","originalFileLocation":"api-reference/tasks/get.mdx","locale":"en"},"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=\"dark\"}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=\"Poll the status of an asynchronous image, video, or audio task.\">\u003cmeta data-mint-head name=\"application-name\" content=\"PipeLLM\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pipellm/JKtU23MtMj4TtKyB/_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/pipellm/JKtU23MtMj4TtKyB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pipellm/JKtU23MtMj4TtKyB/_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/pipellm/JKtU23MtMj4TtKyB/_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/pipellm/JKtU23MtMj4TtKyB/_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/pipellm/JKtU23MtMj4TtKyB/_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/pipellm/JKtU23MtMj4TtKyB/_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/pipellm/JKtU23MtMj4TtKyB/_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/pipellm/JKtU23MtMj4TtKyB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get a task - PipeLLM\">\u003cmeta data-mint-head property=\"og:description\" content=\"Poll the status of an asynchronous image, video, or audio task.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"PipeLLM\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.pipellm.ai/api-reference/tasks/get\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pipellm.mintlify.site/_mintlify/api/og/v2?division=Tasks\u0026amp;title=Get+a+task\u0026amp;description=Poll+the+status+of+an+asynchronous+image%2C+video%2C+or+audio+task.\u0026amp;theme=3c00a4b989b0438e6fc46fe4\u0026amp;signature=41186e90adce5ca4930d5542b26363b5815d68c511e41eb0a31c5652a6592d7e\">\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=\"Get a task - PipeLLM\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Poll the status of an asynchronous image, video, or audio task.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pipellm.mintlify.site/_mintlify/api/og/v2?division=Tasks\u0026amp;title=Get+a+task\u0026amp;description=Poll+the+status+of+an+asynchronous+image%2C+video%2C+or+audio+task.\u0026amp;theme=3c00a4b989b0438e6fc46fe4\u0026amp;signature=41186e90adce5ca4930d5542b26363b5815d68c511e41eb0a31c5652a6592d7e\">\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/pipellm/JKtU23MtMj4TtKyB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"PipeLLM\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#12B76A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.pipellm.ai/api-reference/tasks/get\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/tasks/get.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.pipellm.ai/api-reference/tasks/get\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.pipellm.ai/zh/api-reference/tasks/get\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.pipellm.ai/api-reference/tasks/get\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.pipellm.ai/#organization\",\"name\":\"PipeLLM\",\"url\":\"https://docs.pipellm.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pipellm/c14KpYQEcMuO-i7Z/logo/light.svg?fit=max\u0026auto=format\u0026n=c14KpYQEcMuO-i7Z\u0026q=85\u0026s=e63d66e7731e79c17fab3ac12709e0b1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.pipellm.ai#website\",\"name\":\"PipeLLM\",\"url\":\"https://docs.pipellm.ai\",\"publisher\":{\"@id\":\"https://docs.pipellm.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.pipellm.ai/api-reference/tasks/get#webpage\",\"url\":\"https://docs.pipellm.ai/api-reference/tasks/get\",\"name\":\"Get a task\",\"description\":\"Poll the status of an asynchronous image, video, or audio task.\",\"dateModified\":\"2026-09-19T04:58:56.431Z\",\"isPartOf\":{\"@id\":\"https://docs.pipellm.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.pipellm.ai/api-reference/tasks/get#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.pipellm.ai/api-reference/tasks/get#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.pipellm.ai/api-reference/list-models\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get a task\",\"item\":\"https://docs.pipellm.ai/api-reference/tasks/get\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.pipellm.ai/api-reference/tasks/get#apireference\",\"headline\":\"Get a task\",\"name\":\"Get a task\",\"description\":\"Poll the status of an asynchronous image, video, or audio task.\",\"url\":\"https://docs.pipellm.ai/api-reference/tasks/get\",\"mainEntityOfPage\":{\"@id\":\"https://docs.pipellm.ai/api-reference/tasks/get#webpage\"},\"dateModified\":\"2026-09-19T04:58:56.431Z\",\"publisher\":{\"@id\":\"https://docs.pipellm.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.pipellm.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"PipeLLM\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"PipeLLM\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/tasks/get.md","siteName":"PipeLLM","nav":{"global":null,"languages":[{"language":"en","tabs":[{"tab":"Relay","icon":"route","pages":[{"title":"Relay","href":""}]},{"tab":"API Reference","icon":"code","groups":[{"group":"API Guides","icon":"book-open","pages":[{"title":"Overview","sidebarTitle":"Overview","icon":"book-open","href":"/api-reference/introduction"},{"title":"Streaming","sidebarTitle":"Streaming","icon":"list","href":"/api-reference/streaming"},{"title":"Authentication","sidebarTitle":"Authentication","icon":"lock","href":"/api-reference/authentication"},{"title":"Rate Limits","sidebarTitle":"Limits","icon":"gauge","href":"/api-reference/rate-limits"},{"title":"Errors and Debugging","sidebarTitle":"Errors and Debugging","icon":"triangle-alert","href":"/api-reference/errors"}]},{"group":"API Reference","icon":"code","pages":[{"group":"Models","icon":"layers","pages":[{"title":"List models","api":"GET /v1/models","href":"/api-reference/list-models"},{"title":"Get model pricing","api":"GET /v1/models/pricing","href":"/api-reference/model-pricing"}]},{"group":"Chat Completions","icon":"/logo/providers/openai.svg","pages":[{"title":"Create a chat completion","api":"POST /v1/chat/completions","href":"/api-reference/openai/chat-completions"}]},{"group":"Responses","icon":"/logo/providers/openai.svg","pages":[{"title":"Create a response","api":"POST /v1/responses","href":"/api-reference/openai/responses"}]},{"group":"Anthropic","icon":"/logo/providers/anthropic.svg","pages":[{"title":"Create a message","api":"POST /v1/messages","href":"/api-reference/anthropic/messages"},{"title":"Tool Use","href":"/api-reference/anthropic/tool-use"}]},{"group":"Gemini","icon":"/logo/providers/gemini.svg","pages":[{"title":"Generate content","api":"POST /v1beta/models/{model}:generateContent","href":"/api-reference/gemini/generate-content"},{"title":"Stream generate content","api":"POST /v1beta/models/{model}:streamGenerateContent","href":"/api-reference/gemini/stream-generate-content"}]},{"group":"Images","icon":"image","pages":[{"title":"Create an image","api":"POST /v1/images/generations","href":"/api-reference/image/generations"},{"title":"Edit an image","api":"POST /v1/images/edits","href":"/api-reference/image/edits"},{"title":"Create an image variation","api":"POST /v1/images/variations","href":"/api-reference/image/variations"},{"title":"Generate an image with Gemini","api":"POST /v1beta/models/{model}:generateContent","href":"/api-reference/image/gemini"}]},{"group":"Jev / System One","icon":"brain","pages":[{"title":"Jev / System One","api":"POST /v1/systemone","href":"/api-reference/systemone"}]},{"group":"Video","icon":"clapperboard","pages":[{"group":"V2 (Recommended)","pages":[{"title":"Create a video","api":"POST /v2/videos","href":"/api-reference/video/create"},{"title":"Get a video","api":"GET /v2/videos/{id}","href":"/api-reference/video/get"},{"title":"Cancel a video","api":"DELETE /v2/videos/{id}","href":"/api-reference/video/cancel"}]},{"group":"V1 (Legacy)","pages":[{"title":"Create a video (V1)","api":"POST /v1/videos/generations","description":"Legacy video generation through the PipeLLM gateway.","href":"/api-reference/video/create-v1"}]}]},{"group":"Tasks","icon":"list-checks","pages":[{"title":"Get a task","api":"GET /v1/tasks/{task_id}","href":"/api-reference/tasks/get"},{"title":"Cancel a task","api":"POST /v1/tasks/{task_id}/cancel","description":"Cancel an asynchronous task that has not finished.","href":"/api-reference/tasks/cancel"}]},{"group":"WebSearch","icon":"globe","pages":[{"title":"Deep search","api":"GET /v1/websearch/search","href":"/websearch/search-api"},{"title":"Simple search","api":"GET /v1/websearch/simple-search","href":"/websearch/simple-search"},{"title":"Read a page","api":"GET /v1/websearch/reader","href":"/websearch/reader"},{"title":"Search news","api":"GET /v1/websearch/search-news","href":"/websearch/news-search"}]}]}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations","href":"/integrations/overview"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/api-reference/tasks/get"}]}]},"basePath":"","title":"Get a task - PipeLLM","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-jJHA3WSo.js","utils-DbZn3Mjn.js","cloneDeep-CnBnaSyy.js","_Uint8Array-CMQtTgBR.js","isObject-FP1Yky1u.js","utils-Bl2DvzOJ.js","addUniqueKeysToSchema-BwOLo9p1.js","snippetPresets-BBiPpKa-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C0px4Tml.js","isEqual-zAyttAAO.js","usePlaygroundInputsStore-Dell6dGw.js","shallow-0VKqkSqN.js","getApiPlaygroundDisplay-CP_ctPEB.js","CodeSnippet-5L35ic0s.js","CodeSnippets-DOXbNhJw.js","Page-DRLI_2Ue.js","getPastedJson-VhzT9m2P.js","icon-CD8_AtCO.js","MethodPill-DGgOMftG.js","DuplicateIcon-DZ6A_EtN.js","createIcon-DUl4oM5f.js","DynamicMarkdown-BGHukeRM.js","SectionHeading-ChrEUs8u.js","axios-vUo_bRtp.js"]}