> For the complete documentation index, see [llms.txt](https://docs.meganova.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meganova.ai/inference-models/text-generation.md).

# Text Generation

Use these models to generate text, whether it's to review code, write a story, etc.

## Models available

Text-only models, from frontier reasoning to cheap high-volume workhorses.

Model ids, current prices, context lengths and per-tier limits are in the console catalog, which is generated from the same records that bill your requests:

[**console.meganova.ai/serverless**](https://console.meganova.ai/serverless) — filter by **`Text Generation`**

The same list is available programmatically from [`GET /v1/models`](/api-reference/inference-models.md), including pricing and capability flags.

## Using the Models

1. Go to the [MegaNova](https://www.meganova.ai/) website.
2. Log in, and ensure you have enough credits.
3. Click on the "Inference Models" tab and select your model.
4. Select your parameters, enter your text (and image, if applicable) and just press Enter!

The parameters you can tweak are outlined below:

* Messages: The current dialogue between the user and the model.
* System Prompt: Set of instructions, guidelines, and contextual information, which tell the AI how to respond to the queries.
* Output Length: The maximum number of tokens that will be generated for each response.
* Temperature: Temperature controls randomness. Higher values increase diversity.
* Top P: A higher value will result in more diverse outputs, while a lower value will result in more repetitive outputs.
* Stream: If set to `true`, the response will be streamed in chunks. If False, the entire generation will be returned in one response.

### Through API Endpoint

This option is to use our API endpoint directly in your projects. Below are some code snippets to get you started!

> **NOTE:** Don't forget to use **your** API key. See [Authentication](/api-reference/platform-api/authentication.md) for details on authentication and [Create API Key](/api-reference/platform-api/create-api-key.md) for managing keys.

#### Using cURL

```bash
curl -X POST "https://api.meganova.ai/v1/chat/completions" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $MegaNova_API_KEY" \
    --data-raw '{
        "messages": [
	  {"role":"user","content":"Is Montreal a thriving hub for the AI industry?"}
	],
        "model": "meta-llama/Llama-3.3-70B-Instruct",
        "max_tokens": null, 
        "temperature": 1,
        "top_p": 0.9,
        "stream": false
    }'
```

#### Using Python

```python
import requests 
import os
 
url = "https://api.meganova.ai/v1/chat/completions"

headers = { 
    "Content-Type": "application/json", 
    "Authorization": f"Bearer {os.environ.get('MegaNova_API_KEY')}" 
} 
 
data = {
    "messages":[
		{"role":"user","content":"Is Montreal a thriving hub for the AI industry?"}
	],
    "model":"meta-llama/Llama-3.3-70B-Instruct",
    "max_tokens":None,
    "temperature":1,
    "top_p":0.9,
    "stream":False
}

response = requests.post(url, headers=headers, json=data) 
print(response.json())
```

#### Using JavaScript

```javascript
const url = "https://api.meganova.ai/v1/chat/completions";

const headers = {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${process.env.MegaNova_API_KEY}`
};

const data = {
    messages: [
        { role: "user", content: "Is Montreal a thriving hub for the AI industry?" }
    ],
    model: "meta-llama/Llama-3.3-70B-Instruct",
    max_tokens: null,
    temperature: 1,
    top_p: 0.9,
    stream: false
};

fetch(url, {
    method: 'POST',
    headers: headers,
    body: JSON.stringify(data)
})
    .then(response => response.json())
    .then(data => {
        console.log(JSON.stringify(data, null, 2));
    })
    .catch(error => console.error('Error:', error));
```

#### Selecting a Model

To specify the desired model, use this mapping for the `model_name`:

**Free Models (Tier 1)**

* Manta Mini 1.0: `meganova-ai/manta-mini-1.0`
* Manta Flash 1.0: `meganova-ai/manta-flash-1.0`
* Manta Pro 1.0: `meganova-ai/manta-pro-1.0`
* GLM-4.7-Flash: `zai-org/GLM-4.7-Flash`
* DeepSeek-V3-0324-Economic: `deepseek-ai/DeepSeek-V3-0324`
* L3-8B-Stheno-v3.2: `Sao10K/L3-8B-Stheno-v3.2`
* L3-70B-Euryale-v2.1: `Sao10K/L3-70B-Euryale-v2.1`
* L3.3-MS-Nevoria-70B: `Steelskull/L3.3-MS-Nevoria-70b`
* Sapphira-L3.3-70B-0.1: `BruhzWater/Sapphira-L3.3-70b-0.1`
* MN-Violet-Lotus-12B: `FallenMerick/MN-Violet-Lotus-12B`
* Mistral-Small-3.2-24B-Instruct-2506: `mistralai/Mistral-Small-3.2-24B-Instruct-2506`

**Premium Models (Tier 2+)** — for the full list (including Claude, GPT-5 family, Gemini, Grok, Qwen, MiniMax, MiMo, Mistral, GLM, and Llama), see the [Model List](/inference-models/model-list.md). Examples:

* Claude-Opus-4.7: `anthropic/claude-opus-4-7`
* Claude-Sonnet-4.6: `anthropic/claude-sonnet-4-6`
* GPT-5.4: `openai/gpt-5.4`
* Gemini-3.1-Pro-Preview: `gemini/gemini-3.1-pro-preview`
* Grok-4-Fast: `x-ai/grok-4.6`
* GLM-5.1: `zai-org/GLM-5.1`
* Llama3.3-70B: `meta-llama/Llama-3.3-70B-Instruct`
* DeepSeek-V3.2: `deepseek-ai/DeepSeek-V3.2`
* Qwen3-235B: `Qwen/Qwen3-235B-A22B-Instruct-2507`
* Kimi-K2-Thinking: `moonshotai/Kimi-K2-Thinking`
* MiMo-V2-Pro: `XiaomiMiMo/MiMo-V2-Pro`
* Cydonia-24B-v4.1: `TheDrummer/Cydonia-24B-v4.1`

#### Response Example

A successful generation response (non-streaming) will contain a `chat.completion` object, and should look like this:

```json
{
    "id": "chatcmpl-ec0014bc38e2cad1e45d47f7f01f6569",
    "created": 1740432179,
    "model": "meta-llama/Llama-3.3-70B-Instruct",
    "object": "chat.completion",
    "system_fingerprint": null,
    "choices": [
        {
            "finish_reason": "stop",
            "index": 0,
            "message": {
                "content": "Yes! Montreal is the home of cutting edge ... research.",
                "role": "assistant",
                "tool_calls": null,
                "function_call": null
            }
        }
    ],
    "usage": {
        "completion_tokens": 695,
        "prompt_tokens": 42,
        "total_tokens": 737,
        "completion_tokens_details": null,
        "prompt_tokens_details": null
    },
    "service_tier": null,
    "prompt_logprobs": null
}
```

This represents the entire generated response from the inference. Alternatively, the streaming option (`stream: true` in the request body) will return several responses, each containing a `chat.completion.chunk` object, and will look like this:

```json
{
    "id": "chatcmpl-289eb1f670a58c5cde47ddb634aad595",
    "created": 1740432271,
    "model": "meta-llama/Llama-3.3-70B-Instruct",
    "object": "chat.completion.chunk",
    "choices": [
        {
            "index": 0,
            "delta": {
                "content": " everyone"
            }
        }
    ]
}
{ 
  ...
}
...
```

where the content of each response will contain the generated token. These tokens put together form the complete response.

Feel free to explore refer to the [API Reference](/api-reference/inference-models.md) for more details.
