Text Generation
Generate text and hold conversations with Nebula Block's chat models using the OpenAI-compatible API.
Use these models to generate text, whether it's to review code, write a story, etc.
Models available
Nebula Block serves dozens of text and multimodal chat models — including the latest from Anthropic, OpenAI, Google, DeepSeek, Qwen, Moonshot, xAI, and Z.ai. The Model Catalog has the full list with context lengths and model IDs.
A few widely used ones:
DeepSeek-V3.2
deepseek-ai/DeepSeek-V3.2
Claude Sonnet 5
anthropic/claude-sonnet-5
GPT-5.6
openai/gpt-5.6-terra
Gemini 3.7 Flash
gemini/gemini-3.7-flash
Qwen3.5-Plus
Qwen/Qwen3.5-Plus
Llama 3.3 70B
meta-llama/Llama-3.3-70B-Instruct
Note: Model availability changes often. Call
GET /v1/modelsfor the authoritative list at runtime rather than hard-coding one.
Using the Models
Sign in to the console and make sure you have credit.
Open Serverless and pick a model.
Set your parameters, type your prompt, and send it.
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 the API Reference and the Overview for more details on authentication.
Using cURL
Using Python
Using JavaScript
Selecting a Model
To specify the desired model, use this mapping for the model_name:
DeepSeek-R1-0528 (free):
DeepSeek-V3-0324 (free):
DeepSeek-V3-0324:
DeepSeek-R1 (free):
DeepSeek-R1-0528:
DeepSeek-R1:
Llama3.3-70B:
Qwen-QwQ-32B:
Response Example
A successful generation response (non-streaming) will contain a chat.completion object, and should look like this:
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:
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 for more details. cat Inference_Models/Text_Generation.md
Last updated