For the complete documentation index, see llms.txt. This page is also available as Markdown.

Open AI API

Chat Completions

post

OpenAI-compatible chat/completions endpoint for Lightning Rod's Foresight forecasting models.

The default limit is 120 requests per minute per organization (sliding window). Exceeded requests receive a 429; check Retry-After and X-RateLimit-* headers to pace retries. Contact support@lightningrod.ai for higher limits.

Authorizations
AuthorizationstringRequired

Lightning Rod API key (sk_…) sent as a Bearer token. Obtain one via POST /v1/mpp/topup (agents) or the dashboard (humans).

Body
modelstringRequired

ID of the model to use

temperaturenumber · nullableOptional

Sampling temperature between 0 and 2

Default: 0.6
max_tokensinteger · nullableOptional

Maximum number of tokens to generate

top_pnumber · nullableOptional

Nucleus sampling parameter

top_kinteger · nullableOptional

Number of top tokens to consider

min_pnumber · nullableOptional

Minimum probability for a token to be considered

reasoning_effortstring · nullableOptional

Lightning Rod extension. Reasoning budget the model spends before answering: low, medium, or high. Higher effort improves accuracy on harder questions at additional token cost. With raw OpenAI clients pass via extra_body.

streamboolean · nullableOptional

Whether to stream back partial progress

Default: false
ninteger · nullableOptional

Number of chat completion choices to generate

Default: 1
stopany of · nullableOptional

Up to 4 sequences where the API will stop generating

stringOptional
or
string[]Optional
seedinteger · nullableOptional

Deterministic sampling seed

researchany of · nullableOptional

Lightning Rod extension. Opt-in web research before forecasting. Pass true to query all default sources, or a ResearchOptions object to select sources. Each source is billed as a separate research event; when research runs, its cost is reported in usage. With raw OpenAI clients pass via extra_body.

booleanOptional
or
answer_typeany of · nullableOptional

Lightning Rod extension that injects output-format guidance and appends a structured answer between <answer></answer> tags in the response content. One of binary, multiple_choice, continuous, free_response, or auto. Raw response shapes: binary -> <answer>0.62</answer> (probability between 0 and 1); continuous -> <answer>{"mean": 42.5, "standard_deviation": 5.2}</answer>; multiple_choice -> <answer>{"A": 0.55, "B": 0.45}</answer>; free_response -> <answer>...</answer>. auto classifies the user question server-side first, then returns one of the above. Omit for prose only. With raw OpenAI clients pass via extra_body.

string · enumOptionalPossible values:
or
const: autoOptional
Responses
200

Successful Response

application/json
post/v1/openai/chat/completions

Completions

post

OpenAI-compatible text completion endpoint for Lightning Rod's Foresight forecasting models.

Prefer the chat/completions endpoint for multi-turn conversations and framework compatibility.

The default limit is 120 requests per minute per organization (sliding window). Exceeded requests receive a 429; check Retry-After and X-RateLimit-* headers to pace retries. Contact support@lightningrod.ai for higher limits.

Authorizations
AuthorizationstringRequired

Lightning Rod API key (sk_…) sent as a Bearer token. Obtain one via POST /v1/mpp/topup (agents) or the dashboard (humans).

Body
modelstringRequired

ID of the model to use

promptany ofRequired

The prompt(s) to generate completions for

stringOptional
or
string[]Optional
temperaturenumber · nullableOptional

Sampling temperature between 0 and 2

Default: 0.6
max_tokensinteger · nullableOptional

Maximum number of tokens to generate

top_pnumber · nullableOptional

Nucleus sampling parameter

top_kinteger · nullableOptional

Number of top tokens to consider

min_pnumber · nullableOptional

Minimum probability for a token to be considered

reasoning_effortstring · nullableOptional

Lightning Rod extension. Reasoning budget the model spends before answering: low, medium, or high. Higher effort improves accuracy on harder questions at additional token cost. With raw OpenAI clients pass via extra_body.

streamboolean · nullableOptional

Whether to stream back partial progress

Default: false
ninteger · nullableOptional

Number of completions to generate

Default: 1
stopany of · nullableOptional

Up to 4 sequences where the API will stop generating

stringOptional
or
string[]Optional
seedinteger · nullableOptional

Deterministic sampling seed

researchany of · nullableOptional

Lightning Rod extension. Opt-in web research before forecasting. Pass true to query all default sources, or a ResearchOptions object to select sources. Available sources: perplexity (Perplexity web search), google_news (recent Google News articles). Each source runs as its own query and is billed as a separate RESEARCH event; when research runs, its cost is reported in usage. With raw OpenAI clients pass via extra_body.

booleanOptional
or
answer_typeany of · nullableOptional

Lightning Rod extension that injects output-format guidance and appends a structured answer between <answer></answer> tags in the response text. One of binary, multiple_choice, continuous, free_response, or auto. Raw response shapes: binary -> <answer>0.62</answer> (probability between 0 and 1); continuous -> <answer>{"mean": 42.5, "standard_deviation": 5.2}</answer>; multiple_choice -> <options>{"A": "...", "B": "..."}</options> followed by <answer>{"A": 0.55, "B": 0.45}</answer>; free_response -> <answer>...</answer>. auto classifies the prompt server-side first, then returns one of the above. Omit for prose only. With raw OpenAI clients pass via extra_body.

string · enumOptionalPossible values:
or
const: autoOptional
Responses
200

Successful Response

application/json
post/v1/openai/completions

List Models

get

List available models.

Authorizations
AuthorizationstringRequired

Lightning Rod API key (sk_…) sent as a Bearer token. Obtain one via POST /v1/mpp/topup (agents) or the dashboard (humans).

Responses
200

Successful Response

application/json
objectconst: listOptional

The object type

Default: list
get/v1/openai/models
200

Successful Response

Last updated

Was this helpful?