Skip to main content
POST
Modern media applications don’t just generate images and videos — they also make dozens of LLM calls for prompting, captioning, moderation, and orchestration. Instead of juggling a separate provider or router for text, you can use the same Lumenfall SDK, API key, and base URL you already use for media generation. One platform, one bill, no context-switching.
Powered by OpenRouterText completions are routed through OpenRouter, giving you access to all hundreds of models available on their platform — from OpenAI, Google, Anthropic, Meta, Mistral, and many more providers. All OpenRouter features are fully supported. Use any model by passing its OpenRouter model identifier (e.g., google/gemini-3-flash-preview). You can optionally prefix with openrouter/ (e.g., openrouter/google/gemini-3-flash-preview), but it is not required.
OpenAI compatibilityThis endpoint implements the OpenAI Chat Completions API. You can use any OpenAI SDK by changing the base URL to https://api.lumenfall.ai/openai/v1.

Request body

You can include additional parameters not listed here. They will be passed through to the underlying provider.
string
required
The model to use. Pass any OpenRouter model identifier — for example, google/gemini-3-flash-preview or openai/gpt-5.4.
array
required
A list of messages comprising the conversation. Each message has a role and content.
boolean
default:"false"
If true, the response is sent as server-sent events (SSE). Partial message deltas are sent as data: {json} lines, ending with data: [DONE].
number
default:"1"
Sampling temperature between 0 and 2. Higher values make output more random, lower values make it more focused.
integer
The maximum number of tokens to generate.
number
default:"1"
Nucleus sampling parameter. Only consider tokens with cumulative probability up to this value.
number
default:"0"
Penalizes tokens based on their frequency in the text so far. Range: -2.0 to 2.0.
number
default:"0"
Penalizes tokens based on whether they appear in the text so far. Range: -2.0 to 2.0.
string | array
Up to 4 sequences where the model will stop generating.
array
A list of tools the model may call. Currently only function type tools are supported.
string | object
Controls which tool the model calls. Options:
  • "none" - Do not call any tool
  • "auto" - Model decides whether to call a tool
  • "required" - Model must call a tool
  • {"type": "function", "function": {"name": "my_function"}} - Call a specific function
object
The format of the response. Set {"type": "json_object"} to enable JSON mode.
integer
A seed for deterministic generation. Not all models support this.
string
A unique identifier representing your end-user.
boolean
default:"false"
Whether to return log probabilities of the output tokens.
integer
Number of most likely tokens to return at each position (0-20). Requires logprobs: true.
object
Options for streaming responses.

Response

string
A unique identifier for the chat completion.
string
Always chat.completion.
integer
Unix timestamp of when the completion was created.
string
The model used for the completion.
array
A list of chat completion choices.
object
Token usage statistics for the request.

Streaming

When stream: true is set, the response is sent as server-sent events. Each event contains a chat.completion.chunk object with a delta field instead of message: