API Quickstart
Go from API key to your first request in minutes. Follow step-by-step guides to integrate Ninja's AI models into your product — with code examples, SDKs, and everything you need to start building.
Registration
Sign up at Super.MyNinja.ai to start using our APIs.
You can sign up for free or subscribe to one of Ninja's paid plans. Ultra and Business give you higher limit access to the playground to experiment with our flagship, reasoning, and deep research LLMs,
When you’re ready to move from exploration to execution, purchase credits to start building AI products and experiences for coding, writing, and much more.
Purchase Credits
Sign up or login at Super.MyNinja.ai
Go to Settings and click Enable in the On-Demand section
Choose your desired amount (minimum purchase is $50 USD)
Click Confirm and Pay
Your credits onto your account instantly and ready to use.
Generate an API key
After purchasing your credits, go to the “Manage your API keys” section on the API keys & credits page.
Click the “Create a new key” button.
In the “Name” field, enter a name for your key (e.g., Production Key) and then click “Create Key”.
Once your key is generated, copy it and save it somewhere secure, as anyone with access can use it. If needed, you can regenerate a new key.
Using Ninja APIs
Over view
Base URL:
https://api.myninja.ai/v1
Authentication:
All requests require an API key passed in the header as follows where <token-key> is your auth token:
Authorization: Bearer <token-key>
Endpoint:
POST /chat/completions
This endpoint accepts chat requests and streams responses based on the specified model.
Models:
Currently available models include:
ninja-deep-research
ninja-super-agent:turbo
ninja-super-agent:apex
Ninja-super-agent:reasoning
These models can be selected by providing the model parameter in your request body.
Request Format
The Ninja API follows the OpenAI API spec closely. The request JSON object contains:
model (string):
The model identifier to use (e.g., "ninja-deep-research").
messages (array):
An array of message objects. Each object follows the format:
stream (boolean):
When set to true, the API responds with a streaming response.
stream_options (object):
Additional options for streaming, such as "include_usage": true to include token usage details.
extra_headers (object):
Any extra headers required by the Ninja API (none at this point)
Request Example (json)
Response
The API returns a stream of ChatCompletionChunk objects. Each chunk may contain:
Content:
The text of the completion, which may include XML-wrapped reasoning steps.
Citations:
A list of URLs that support the reasoning provided.
Usage Information:
Token usage statistics if "include_usage": true was specified.
The client code can process these chunks to display a rich response that includes:
Reasoning Steps: Extracted and formatted from XML segments.
Citations: Displayed as a numbered list.
Usage Stats: Showing input and output tokens.
Sample Code Examples
Pricing
Mode
Input price / per M tokens
Output price / per M tokens
Price / task
Qwen 3 Coder 480B (Cerebras)
–
–
$1.50
Standard mode
–
–
$1.00
Complex mode
–
–
$1.50
Fast mode
–
–
$1.50
Mode
Input price / per M tokens
Output price / per M tokens
Price / task
Qwen 3 Coder 480B (Cerebras)
$3.75
$3.75
–
Standard mode
$1.50
$1.50
–
Complex mode
$4.50
$22.50
–
Fast mode
$3.75
$3.75
–
Model
Input price / per M tokens
Output price / per M tokens
Turbo 1.0
$0.11
$0.42
Apex 1.0
$0.88
$7.00
Reasoning 2.0
$0.38
$1.53
Deep Research 2.0
$1.40
$5.60
Rate Limits
Ninja AI enforces rate limits on inference requests per model to ensure that developers are able to try the fastest inference.
Model
Request per minute (RPM)
Turbo 1.0
50
Apex 1.0
20
Reasoning 2.0
30
Deep Research 2.0
5
Describe the task. Ninja turns it into an app that runs step by step for you. No credit card required.

FAQ
Frequently Asked Questions
Everything you need to know about Ninja API.
How can I increase my auto-pay thresholds and amount?
How can I cancel my auto-payment agreement?
How do I delete an API key?
How can I view the usage of each API request?