The Ninja API is currently in beta. Email hey@molin.ai to request access and receive your API key.
Base URL
Authentication
All requests require a Bearer token in theAuthorization header. API keys are prefixed with nsk_.
Endpoints
Create a task
POST /v0/api/task — submit a prompt and start execution.Get task result
GET /v0/api/task/result — retrieve status and result.Typical usage pattern
- Create a task —
POST /v0/api/task— save the returnedtaskId. - Poll for result —
GET /v0/api/task/result?taskId=...&wait=1. - If status is
pending— the task hasn’t started yet.wait=1has no effect forpendingtasks. Wait a short moment and poll again. - If status is
in_progress— the long-poll is active and the request will block until the task completes. Poll again if the request times out. - When status is
completedorfailed— read theresultorerrorfield and stop polling.
Task statuses
Execution limits
Each task has a maximum execution time of 30 minutes. If the task does not complete within this window, it is automatically marked asfailed with the error Task timed out.
Rate limits
Both endpoints share a limit of 10 requests per minute per user. Exceeding the rate limit returns429 Too Many Requests.