Optional JSON Schema for structured output. When provided, the result field in the response will be a JSON object conforming to this schema. Must follow the supported schema
format. Maximum 5 KB when serialized.
Hard credit ceiling for the task. If the task spends this many credits in a run without producing a result, it stops and the result returns status: "failed" with an
error explaining the budget was exceeded. Use it to cap the cost of open-ended prompts. Must be a positive integer. When omitted, it defaults to 1000 credits, so an API task is never unbounded.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Molin AI","colors":{"primary":"#601FEB","light":"#D079EE","dark":"#8624FF"},"logo":{"light":"https://mintcdn.com/molinai/OcLC76rO751MOeKl/logo-light.svg?fit=max\u0026auto=format\u0026n=OcLC76rO751MOeKl\u0026q=85\u0026s=6b1bf0927eb0da43f2e20cbd9e253bc3","dark":"https://mintcdn.com/molinai/OcLC76rO751MOeKl/logo-dark.svg?fit=max\u0026auto=format\u0026n=OcLC76rO751MOeKl\u0026q=85\u0026s=763a8163f8dc81201bafffb825c0e6fe"},"favicon":"https://mintcdn.com/molinai/RLGw0ZV4xfdbGd_M/favicon.png?fit=max\u0026auto=format\u0026n=RLGw0ZV4xfdbGd_M\u0026q=85\u0026s=9243361e064f08fd736a66f7d1279682","api":{"params":{"expanded":"all"},"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer","name":"Authorization"},"server":"https://ninja.new"}},"background":{"color":{"light":"#FFFFFF","dark":"#1b1b20"}},"navbar":{"links":[{"href":"mailto:hey@molin.ai","label":"Support"}],"primary":{"type":"button","label":"Open Molin","href":"https://molin.ai/app"}},"footer":{"socials":{"facebook":"https://www.facebook.com/groups/molinaiofficialen","instagram":"https://www.instagram.com/molin_app","x":"https://twitter.com/molin_ai","github":"https://github.com/molin-ai","linkedin":"https://www.linkedin.com/company/molin-ai"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Create your AI","icon":"sparkles","href":"https://molin.ai/shop-ai/setup"},{"anchor":"Community","icon":"facebook","href":"https://www.facebook.com/groups/molinaiofficialen/"},{"anchor":"Blog","icon":"newspaper","href":"https://molin.ai/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"molinai","hasAudioNarration":false,"actualSubdomain":"molinai","customDomains":["docs.molin.ai"],"gitSource":{"type":"github","owner":"molin-ai","repo":"mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adbcf63db26870c9cf624eb","collectionId":"a7f4799c-b62f-48ca-adf0-59038f9170ef","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adbcf63db26870c9cf624eb"},"feedback":{"thumbs":true,"issues":true},"entitlements":{},"buildId":"6adbcf63db26870c9cf624eb","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"Home","count":63},{"language":"default","tag":"General","count":28},{"language":"default","tag":"Legal","count":18},{"language":"default","tag":"Channels","count":15},{"language":"default","tag":"Email","count":13},{"language":"default","tag":"API Reference","count":9},{"language":"default","tag":"Ninja","count":8},{"language":"default","tag":"Get Started","count":6},{"language":"default","tag":"DNS setup","count":6},{"language":"default","tag":"Forwarding setup","count":6}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"ninja/create-task","slug":"/ninja/create-task","pageMetadata":{"title":"Create a task","description":"Submit a prompt to Ninja and start execution in the background. Returns immediately with a task ID and a pending status you can poll.","api":"POST /v0/api/task","tag":"Beta","href":"/ninja/create-task"},"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: \"Submit a prompt to Ninja and start execution in the background. Returns immediately with a task ID and a pending status you can poll.\"\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`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Creates a new task and starts execution in the background. Returns immediately with a `,_jsx(_components.code,{children:`taskId`}),` and `,_jsx(_components.code,{children:`pending`}),` status.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-parameters`,children:`Request parameters`}),`\n`,_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsx(_components.p,{children:`The task prompt. Must be between 1 and 16,000 characters.`})}),`\n`,_jsxs(ParamField,{body:`model`,type:`string`,default:`smart`,id:`param-model`,children:[_jsx(_components.p,{children:`The LLM model to use.`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fast`})}),_jsx(_components.td,{children:`Fastest and cheapest. Best for simple tasks.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`smart`})}),_jsxs(_components.td,{children:[`Balanced speed and quality. `,_jsx(_components.strong,{children:`(default)`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`super-smart`})}),_jsx(_components.td,{children:`Most capable. Best for complex reasoning.`})]})]})]})]}),`\n`,_jsx(ParamField,{body:`resultSchema`,type:`object`,id:`param-result-schema`,children:_jsxs(_components.p,{children:[`Optional JSON Schema for structured output. When provided, the `,_jsx(_components.code,{children:`result`}),` field in the response will be a JSON object conforming to this schema. Must follow the `,_jsx(_components.a,{href:`#result-schema-format`,children:`supported schema\nformat`}),`. Maximum 5 KB when serialized.`]})}),`\n`,_jsx(ParamField,{body:`maxCredits`,type:`integer`,default:`1000`,id:`param-max-credits`,children:_jsxs(_components.p,{children:[`Hard credit ceiling for the task. If the task spends this many credits in a run without producing a result, it stops and the `,_jsx(_components.a,{href:`/ninja/get-task-result`,children:`result`}),` returns `,_jsx(_components.code,{children:`status: \"failed\"`}),` with an\n`,_jsx(_components.code,{children:`error`}),` explaining the budget was exceeded. Use it to cap the cost of open-ended prompts. Must be a positive integer. When omitted, it defaults to 1000 credits, so an API task is never unbounded.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsx(ResponseField,{name:`taskId`,type:`string`,required:true,id:`param-task-id`,children:_jsxs(_components.p,{children:[`UUID of the created task. Use this to poll for results via the `,_jsx(_components.a,{href:`/ninja/get-task-result`,children:`get task result`}),` endpoint.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`pending`}),` for newly created tasks.`]})}),`\n`,`\n`,`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`result-schema-format`,children:`Result schema format`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`resultSchema`}),` field must be a valid JSON Schema. The following features are `,_jsx(_components.strong,{children:`not`}),` supported:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`oneOf`}),`, `,_jsx(_components.code,{children:`anyOf`}),`, `,_jsx(_components.code,{children:`not`}),`, `,_jsx(_components.code,{children:`if`}),`/`,_jsx(_components.code,{children:`then`}),`/`,_jsx(_components.code,{children:`else`})]}),`\n`,_jsxs(_components.li,{children:[`Numerical constraints (`,_jsx(_components.code,{children:`minimum`}),`, `,_jsx(_components.code,{children:`maximum`}),`, `,_jsx(_components.code,{children:`multipleOf`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`String length constraints (`,_jsx(_components.code,{children:`minLength`}),`, `,_jsx(_components.code,{children:`maxLength`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Array length constraints (`,_jsx(_components.code,{children:`minItems`}),`, `,_jsx(_components.code,{children:`maxItems`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Type arrays (e.g. `,_jsx(_components.code,{children:`\"type\": [\"string\", \"null\"]`}),`)`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Supported types:`}),` `,_jsx(_components.code,{children:`object`}),`, `,_jsx(_components.code,{children:`array`}),`, `,_jsx(_components.code,{children:`string`}),`, `,_jsx(_components.code,{children:`number`}),`, `,_jsx(_components.code,{children:`integer`}),`, `,_jsx(_components.code,{children:`boolean`})]}),`\n`,_jsxs(Warning,{children:[`The schema is validated at request time. An invalid schema returns `,_jsx(_components.code,{children:`400 Bad Request`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"properties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a task","description":"Submit a prompt to Ninja and start execution in the background. Returns immediately with a task ID and a pending status you can poll.","api":"POST /v0/api/task","tag":"Beta","href":"/ninja/create-task"}}},"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`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,RequestExample,ResponseExample,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Creates a new task and starts execution in the background. Returns immediately with a `,_jsx(_components.code,{children:`taskId`}),` and `,_jsx(_components.code,{children:`pending`}),` status.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-parameters`,children:`Request parameters`}),`\n`,_jsx(ParamField,{body:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsx(_components.p,{children:`The task prompt. Must be between 1 and 16,000 characters.`})}),`\n`,_jsxs(ParamField,{body:`model`,type:`string`,default:`smart`,id:`param-model`,children:[_jsx(_components.p,{children:`The LLM model to use.`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fast`})}),_jsx(_components.td,{children:`Fastest and cheapest. Best for simple tasks.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`smart`})}),_jsxs(_components.td,{children:[`Balanced speed and quality. `,_jsx(_components.strong,{children:`(default)`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`super-smart`})}),_jsx(_components.td,{children:`Most capable. Best for complex reasoning.`})]})]})]})]}),`\n`,_jsx(ParamField,{body:`resultSchema`,type:`object`,id:`param-result-schema`,children:_jsxs(_components.p,{children:[`Optional JSON Schema for structured output. When provided, the `,_jsx(_components.code,{children:`result`}),` field in the response will be a JSON object conforming to this schema. Must follow the `,_jsx(_components.a,{href:`#result-schema-format`,children:`supported schema\nformat`}),`. Maximum 5 KB when serialized.`]})}),`\n`,_jsx(ParamField,{body:`maxCredits`,type:`integer`,default:`1000`,id:`param-max-credits`,children:_jsxs(_components.p,{children:[`Hard credit ceiling for the task. If the task spends this many credits in a run without producing a result, it stops and the `,_jsx(_components.a,{href:`/ninja/get-task-result`,children:`result`}),` returns `,_jsx(_components.code,{children:`status: \"failed\"`}),` with an\n`,_jsx(_components.code,{children:`error`}),` explaining the budget was exceeded. Use it to cap the cost of open-ended prompts. Must be a positive integer. When omitted, it defaults to 1000 credits, so an API task is never unbounded.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsx(ResponseField,{name:`taskId`,type:`string`,required:true,id:`param-task-id`,children:_jsxs(_components.p,{children:[`UUID of the created task. Use this to poll for results via the `,_jsx(_components.a,{href:`/ninja/get-task-result`,children:`get task result`}),` endpoint.`]})}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`pending`}),` for newly created tasks.`]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Simple task`,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://ninja.new/v0/api/task`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer nsk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Find the top 3 competitors of Shopify\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"smart\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Capped budget`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://ninja.new/v0/api/task`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer nsk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Research the EU market for standing desks\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"smart\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maxCredits\": 500`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Structured output`,numberOfLines:`24`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://ninja.new/v0/api/task`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer nsk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"Find the top 3 competitors of Shopify and their estimated annual revenue\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"smart\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resultSchema\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"object\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"competitors\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"array\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"items\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"object\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": { \"type\": \"string\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"estimatedAnnualRevenue\": { \"type\": \"string\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"required\": [\"name\", \"estimatedAnnualRevenue\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"required\": [\"competitors\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"taskId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pending\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`result-schema-format`,children:`Result schema format`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`resultSchema`}),` field must be a valid JSON Schema. The following features are `,_jsx(_components.strong,{children:`not`}),` supported:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`oneOf`}),`, `,_jsx(_components.code,{children:`anyOf`}),`, `,_jsx(_components.code,{children:`not`}),`, `,_jsx(_components.code,{children:`if`}),`/`,_jsx(_components.code,{children:`then`}),`/`,_jsx(_components.code,{children:`else`})]}),`\n`,_jsxs(_components.li,{children:[`Numerical constraints (`,_jsx(_components.code,{children:`minimum`}),`, `,_jsx(_components.code,{children:`maximum`}),`, `,_jsx(_components.code,{children:`multipleOf`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`String length constraints (`,_jsx(_components.code,{children:`minLength`}),`, `,_jsx(_components.code,{children:`maxLength`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Array length constraints (`,_jsx(_components.code,{children:`minItems`}),`, `,_jsx(_components.code,{children:`maxItems`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Type arrays (e.g. `,_jsx(_components.code,{children:`\"type\": [\"string\", \"null\"]`}),`)`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Supported types:`}),` `,_jsx(_components.code,{children:`object`}),`, `,_jsx(_components.code,{children:`array`}),`, `,_jsx(_components.code,{children:`string`}),`, `,_jsx(_components.code,{children:`number`}),`, `,_jsx(_components.code,{children:`integer`}),`, `,_jsx(_components.code,{children:`boolean`})]}),`\n`,_jsxs(Warning,{children:[`The schema is validated at request time. An invalid schema returns `,_jsx(_components.code,{children:`400 Bad Request`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"properties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create a task","description":"Submit a prompt to Ninja and start execution in the background. Returns immediately with a task ID and a pending status you can poll.","api":"POST /v0/api/task","tag":"Beta","href":"/ninja/create-task"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Request parameters","slug":"request-parameters","depth":2,"children":[]},{"title":"Response fields","slug":"response-fields","depth":2,"children":[]},{"title":"Result schema format","slug":"result-schema-format","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Simple task","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://ninja.new/v0/api/task\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer nsk_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\": \"Find the top 3 competitors of Shopify\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"smart\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Capped budget","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"8\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://ninja.new/v0/api/task\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer nsk_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\": \"Research the EU market for standing desks\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"smart\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"maxCredits\": 500\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Structured output","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"24\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://ninja.new/v0/api/task\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer nsk_your_api_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\": \"Find the top 3 competitors of Shopify and their estimated annual revenue\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"smart\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"resultSchema\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"object\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"properties\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"competitors\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"array\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"items\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"object\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"properties\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"name\": { \"type\": \"string\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"estimatedAnnualRevenue\": { \"type\": \"string\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"required\": [\"name\", \"estimatedAnnualRevenue\"]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"required\": [\"competitors\"]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"taskId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"550e8400-e29b-41d4-a716-446655440000\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"pending\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create a task","path":"/v0/api/task","servers":[{"url":"https://ninja.new"}],"method":"post","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":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"prompt":[{"type":"string","description":"The task prompt. Must be between 1 and 16,000 characters.","required":true}],"model":[{"type":"string","description":"The LLM model to use. Value Description `fast` Fastest and cheapest. Best for simple tasks. `smart` Balanced speed and quality. (default) `super-smart` Most capable. Best for complex reasoning."}],"resultSchema":[{"type":"object","properties":{},"description":"Optional JSON Schema for structured output. When provided, the `result` field in the response will be a JSON object conforming to this schema. Must follow the supported schema format . Maximum 5 KB when serialized."}],"maxCredits":[{"type":"integer","description":"Hard credit ceiling for the task. If the task spends this many credits in a run without producing a result, it stops and the result returns `status: \"failed\"` with an `error` explaining the budget was exceeded. Use it to cap the cost of open-ended prompts. Must be a positive integer. When omitted, it defaults to 1000 credits, so an API task is never unbounded."}]}}],"examples":{"example":{"value":{"prompt":"\u003cstring>","model":"\u003cstring>","resultSchema":{},"maxCredits":123}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"taskId":[{"type":"string","description":"UUID of the created task. Use this to poll for results via the get task result endpoint.","required":true}],"status":[{"type":"string","description":"Always `pending` for newly created tasks.","required":true}]}}],"examples":{"example":{"value":{"taskId":"\u003cstring>","status":"\u003cstring>"}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/molinai/8b8c9ef405f04a0c/scripts.js"],"subdomain":"molinai","siteName":"Molin AI","title":"Create a task - Molin AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-14T15:35:57.917Z","originalFileLocation":"ninja/create-task.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=\"Submit a prompt to Ninja and start execution in the background. Returns immediately with a task ID and a pending status you can poll.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Molin AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/molinai/KvO3rtwoNIIBicEm/_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/molinai/KvO3rtwoNIIBicEm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/molinai/KvO3rtwoNIIBicEm/_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/molinai/KvO3rtwoNIIBicEm/_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/molinai/KvO3rtwoNIIBicEm/_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/molinai/KvO3rtwoNIIBicEm/_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/molinai/KvO3rtwoNIIBicEm/_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/molinai/KvO3rtwoNIIBicEm/_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/molinai/KvO3rtwoNIIBicEm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a task - Molin AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Submit a prompt to Ninja and start execution in the background. Returns immediately with a task ID and a pending status you can poll.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Molin AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.molin.ai/ninja/create-task\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://molinai.mintlify.app/_mintlify/api/og/v2?division=Ninja+API\u0026amp;title=Create+a+task\u0026amp;description=Submit+a+prompt+to+Ninja+and+start+execution+in+the+background.+Returns+immediately+with+a+task+ID+and+a+pending+status+you+can+poll.\u0026amp;theme=bf0d450a967a9896c51ef70b\u0026amp;signature=7cca406503cd2349feaec67e58ca205c563bdd5820ab7f382fb7187c41f2162e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a task - Molin AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Submit a prompt to Ninja and start execution in the background. Returns immediately with a task ID and a pending status you can poll.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://molinai.mintlify.app/_mintlify/api/og/v2?division=Ninja+API\u0026amp;title=Create+a+task\u0026amp;description=Submit+a+prompt+to+Ninja+and+start+execution+in+the+background.+Returns+immediately+with+a+task+ID+and+a+pending+status+you+can+poll.\u0026amp;theme=bf0d450a967a9896c51ef70b\u0026amp;signature=7cca406503cd2349feaec67e58ca205c563bdd5820ab7f382fb7187c41f2162e\">\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/molinai/KvO3rtwoNIIBicEm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Molin AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#601FEB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.molin.ai/ninja/create-task\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ninja/create-task.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.molin.ai/#organization\",\"name\":\"Molin AI\",\"url\":\"https://docs.molin.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/molinai/OcLC76rO751MOeKl/logo-light.svg?fit=max\u0026auto=format\u0026n=OcLC76rO751MOeKl\u0026q=85\u0026s=6b1bf0927eb0da43f2e20cbd9e253bc3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.molin.ai#website\",\"name\":\"Molin AI\",\"url\":\"https://docs.molin.ai\",\"publisher\":{\"@id\":\"https://docs.molin.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.molin.ai/ninja/create-task#webpage\",\"url\":\"https://docs.molin.ai/ninja/create-task\",\"name\":\"Create a task\",\"description\":\"Submit a prompt to Ninja and start execution in the background. Returns immediately with a task ID and a pending status you can poll.\",\"dateModified\":\"2026-08-14T15:35:57.917Z\",\"isPartOf\":{\"@id\":\"https://docs.molin.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.molin.ai/ninja/create-task#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.molin.ai/ninja/create-task#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Ninja API\",\"item\":\"https://docs.molin.ai/ninja/ninja-api\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a task\",\"item\":\"https://docs.molin.ai/ninja/create-task\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.molin.ai/ninja/create-task#apireference\",\"headline\":\"Create a task\",\"name\":\"Create a task\",\"description\":\"Submit a prompt to Ninja and start execution in the background. Returns immediately with a task ID and a pending status you can poll.\",\"url\":\"https://docs.molin.ai/ninja/create-task\",\"mainEntityOfPage\":{\"@id\":\"https://docs.molin.ai/ninja/create-task#webpage\"},\"dateModified\":\"2026-08-14T15:35:57.917Z\",\"publisher\":{\"@id\":\"https://docs.molin.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.molin.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Molin AI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Molin AI","nav":{"global":{"anchors":[{"anchor":"Create your AI","icon":"sparkles","href":"https://molin.ai/shop-ai/setup"},{"anchor":"Community","icon":"facebook","href":"https://www.facebook.com/groups/molinaiofficialen/"},{"anchor":"Blog","icon":"newspaper","href":"https://molin.ai/blog"}]},"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/home/intro/welcome"}]},{"tab":"Ninja","groups":[{"group":"Ninja","pages":[{"title":"Features","href":"/ninja/features"},{"title":"How credits work","href":"/ninja/credits"},{"title":"Prefilled message links","href":"/ninja/prefilled-message-links"}]},{"group":"Ninja API","root":{"title":"Ninja API","description":"The HTTP API for creating and executing Ninja tasks programmatically, defining structured output schemas, and retrieving results.","tag":"Beta","href":"/ninja/ninja-api"},"tag":"Beta","pages":[{"title":"Create a task","api":"POST /v0/api/task","tag":"Beta","href":"/ninja/create-task"},{"title":"Get task result","description":"Retrieve the current status and result of a Ninja task, with long-polling support while the task is still in progress.","api":"GET /v0/api/task/result","tag":"Beta","href":"/ninja/get-task-result"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/apis/get-started/api-introduction"}]},{"tab":"Tracking","pages":[{"title":"Tracking","href":"/home/marketing/marketing-tracking"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/changelog"}]},{"tab":"System Status","pages":[{"title":"System Status","href":"/system-status/introduction"}]},{"tab":"Legal","pages":[{"title":"Legal","href":"/legal/terms-of-service"}]}]},"title":"Create a task - Molin AI","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DKJwRUt2.js","utils-CWD_VS3u.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-oFjciODD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C76WsxC3.js","snippetPresets-DvPMxpX_.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CuNQfndH.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BVFpVUoF.js","shallow-t59Jg5Kr.js","getApiPlaygroundDisplay-C_JZ4amX.js","CodeSnippet-CLRDnx_h.js","CodeSnippets-C2myU4kc.js","Page-7TwLLapg.js","getPastedJson-B-JaVXw7.js","icon-BA-iDhH3.js","MethodPill-D4qZABFp.js","DuplicateIcon-THIDKO1O.js","createIcon-CYYJwgFd.js","DynamicMarkdown-UGQuxDKp.js","SectionHeading-jYELb23h.js","axios-vUo_bRtp.js"]}