{"openapi":"3.1.0","info":{"title":"LightningRod API","description":"Predict anything with AI","version":"1.0.0","contact":{"name":"Lightning Rod Labs Support","email":"support@lightningrod.ai","url":"https://lightningrod.ai"}},"paths":{"/v1/chat/completions":{"post":{"tags":["OpenAI API"],"summary":"Chat Completions","description":"OpenAI-compatible chat/completions endpoint for the organization's trained models (checkpoints, approved providers and Lightning Rod-hosted custom models). List them with `GET /v1/models`.\n\nThe 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](mailto:support@lightningrod.ai) for higher limits.","operationId":"chat_completions_openai_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"},"examples":{"binary_forecast":{"summary":"Binary forecast (answer_type=binary)","description":"The probability is embedded in `choices[0].message.content` between `<answer></answer>` tags.","value":{"id":"chatcmpl-abc123","object":"chat.completion","created":1718712345,"model":"ckpt_<checkpoint id>","choices":[{"index":0,"message":{"role":"assistant","thinking":"Recent FOMC guidance and CPI prints point to a likely 25bp cut...","content":"Considering recent inflation data and Fed signaling, a 25bp cut in March is more likely than not. <answer>0.62</answer>"},"finish_reason":"stop"}],"usage":{"prompt_tokens":320,"completion_tokens":540,"total_tokens":860,"cost_usd":0.0091,"inference_cost_usd":0.0091,"research_cost_usd":null,"classification_cost_usd":null}}},"multiple_choice_forecast":{"summary":"Multiple-choice forecast (answer_type=multiple_choice)","description":"Options are listed in `<options>` tags and the probability distribution over them in `<answer>` tags.","value":{"id":"chatcmpl-def456","object":"chat.completion","created":1718712400,"model":"ckpt_<checkpoint id>","choices":[{"index":0,"message":{"role":"assistant","content":"<options>{\"A\": \"No cut\", \"B\": \"25bp cut\", \"C\": \"50bp cut\"}</options>\n<answer>{\"A\": 0.30, \"B\": 0.62, \"C\": 0.08}</answer>"},"finish_reason":"stop"}],"usage":{"prompt_tokens":280,"completion_tokens":410,"total_tokens":690,"cost_usd":0.0089,"inference_cost_usd":0.0089,"research_cost_usd":null,"classification_cost_usd":null}}},"continuous_forecast":{"summary":"Continuous forecast (answer_type=continuous)","description":"A point estimate with uncertainty is returned as JSON between `<answer></answer>` tags, parsed into `mean` and `standard_deviation`.","value":{"id":"chatcmpl-ghi789","object":"chat.completion","created":1718712500,"model":"ckpt_<checkpoint id>","choices":[{"index":0,"message":{"role":"assistant","content":"Based on recent guidance and historical dispersion, my central estimate is around 42.5. <answer>{\"mean\": 42.5, \"standard_deviation\": 5.2}</answer>"},"finish_reason":"stop"}],"usage":{"prompt_tokens":300,"completion_tokens":360,"total_tokens":660,"cost_usd":0.0078,"inference_cost_usd":0.0078,"research_cost_usd":null,"classification_cost_usd":null}}},"free_response_forecast":{"summary":"Free-response answer (answer_type=free_response)","description":"A free-text answer is returned between `<answer></answer>` tags.","value":{"id":"chatcmpl-jkl012","object":"chat.completion","created":1718712600,"model":"ckpt_<checkpoint id>","choices":[{"index":0,"message":{"role":"assistant","content":"Weighing the leading candidates and current polling, one name stands out. <answer>The current deputy governor is the most likely successor.</answer>"},"finish_reason":"stop"}],"usage":{"prompt_tokens":260,"completion_tokens":290,"total_tokens":550,"cost_usd":0.0061,"inference_cost_usd":0.0061,"research_cost_usd":null,"classification_cost_usd":null}}},"auto_answer_type_forecast":{"summary":"Auto answer type (answer_type=auto)","description":"The server classifies the question first (adding a classification cost), then returns the best-fit structured answer. Here it selected `binary`.","value":{"id":"chatcmpl-mno345","object":"chat.completion","created":1718712700,"model":"ckpt_<checkpoint id>","choices":[{"index":0,"message":{"role":"assistant","content":"This is a yes/no outcome, so a probability is the natural answer. <answer>0.41</answer>"},"finish_reason":"stop"}],"usage":{"prompt_tokens":310,"completion_tokens":400,"total_tokens":710,"cost_usd":0.0103,"inference_cost_usd":0.0088,"research_cost_usd":null,"classification_cost_usd":0.0015}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[{"apiKey":[]}]}},"/v1/models":{"get":{"tags":["OpenAI API"],"summary":"List Models","description":"List available models.","operationId":"list_models_openai_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelListResponse"}}}}},"security":[{"apiKey":[]}]}},"/v1/files":{"post":{"tags":["OpenAI Compatible","OpenAI Compatible"],"summary":"Upload File","operationId":"upload_file_files_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_files_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileObject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"apiKey":[]}]}},"/v1/files/{file_id}/content":{"get":{"tags":["OpenAI Compatible","OpenAI Compatible"],"summary":"Retrieve File Content","operationId":"retrieve_file_content_files__file_id__content_get","security":[{"apiKey":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"File content","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files/{file_id}":{"get":{"tags":["OpenAI Compatible","OpenAI Compatible"],"summary":"Retrieve File","operationId":"retrieve_file_files__file_id__get","security":[{"apiKey":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileObject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["OpenAI Compatible","OpenAI Compatible"],"summary":"Delete File","operationId":"delete_file_files__file_id__delete","security":[{"apiKey":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDeleted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batches":{"post":{"tags":["OpenAI Compatible","OpenAI Compatible"],"summary":"Create Batch","operationId":"create_batch_batches_post","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchObject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["OpenAI Compatible","OpenAI Compatible"],"summary":"List Batches","operationId":"list_batches_batches_get","security":[{"apiKey":[]}],"parameters":[{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batches/{batch_id}":{"get":{"tags":["OpenAI Compatible","OpenAI Compatible"],"summary":"Retrieve Batch","operationId":"retrieve_batch_batches__batch_id__get","security":[{"apiKey":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchObject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batches/{batch_id}/cancel":{"post":{"tags":["OpenAI Compatible","OpenAI Compatible"],"summary":"Cancel Batch","operationId":"cancel_batch_batches__batch_id__cancel_post","security":[{"apiKey":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchObject"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AnswerTypeEnum":{"type":"string","enum":["BINARY","MULTIPLE_CHOICE","CONTINUOUS","CONTINUOUS_VALUE_ONLY","FREE_RESPONSE"],"title":"AnswerTypeEnum"},"BatchCreateRequest":{"properties":{"input_file_id":{"type":"string","minLength":1,"title":"Input File Id"},"endpoint":{"type":"string","const":"/v1/chat/completions","title":"Endpoint"},"completion_window":{"type":"string","const":"24h","title":"Completion Window"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata"},"output_expires_after":{"anyOf":[{"$ref":"#/components/schemas/ExpirationPolicy"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["input_file_id","endpoint","completion_window"],"title":"BatchCreateRequest"},"BatchError":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param"}},"type":"object","title":"BatchError"},"BatchErrors":{"properties":{"object":{"type":"string","const":"list","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/BatchError"},"type":"array","title":"Data"}},"type":"object","title":"BatchErrors"},"BatchInputTokensDetails":{"properties":{"cached_tokens":{"type":"integer","minimum":0.0,"title":"Cached Tokens","default":0}},"type":"object","title":"BatchInputTokensDetails"},"BatchListResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/BatchObject"},"type":"array","title":"Data"},"first_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Id"},"last_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Id"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["data","has_more"],"title":"BatchListResponse"},"BatchObject":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"batch","title":"Object","default":"batch"},"endpoint":{"type":"string","const":"/v1/chat/completions","title":"Endpoint"},"errors":{"anyOf":[{"$ref":"#/components/schemas/BatchErrors"},{"type":"null"}]},"input_file_id":{"type":"string","title":"Input File Id"},"completion_window":{"type":"string","const":"24h","title":"Completion Window","default":"24h"},"status":{"type":"string","enum":["validating","failed","in_progress","finalizing","completed","expired","cancelling","cancelled"],"title":"Status"},"output_file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output File Id"},"error_file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error File Id"},"created_at":{"type":"integer","title":"Created At"},"in_progress_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"In Progress At"},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires At"},"finalizing_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Finalizing At"},"completed_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed At"},"failed_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Failed At"},"expired_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expired At"},"cancelling_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cancelling At"},"cancelled_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cancelled At"},"request_counts":{"$ref":"#/components/schemas/BatchRequestCounts"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"usage":{"anyOf":[{"$ref":"#/components/schemas/BatchUsage"},{"type":"null"}]}},"type":"object","required":["id","endpoint","input_file_id","status","created_at"],"title":"BatchObject"},"BatchOutputTokensDetails":{"properties":{"reasoning_tokens":{"type":"integer","minimum":0.0,"title":"Reasoning Tokens","default":0}},"type":"object","title":"BatchOutputTokensDetails"},"BatchRequestCounts":{"properties":{"total":{"type":"integer","minimum":0.0,"title":"Total","default":0},"completed":{"type":"integer","minimum":0.0,"title":"Completed","default":0},"failed":{"type":"integer","minimum":0.0,"title":"Failed","default":0}},"type":"object","title":"BatchRequestCounts"},"BatchUsage":{"properties":{"input_tokens":{"type":"integer","minimum":0.0,"title":"Input Tokens"},"input_tokens_details":{"$ref":"#/components/schemas/BatchInputTokensDetails"},"output_tokens":{"type":"integer","minimum":0.0,"title":"Output Tokens"},"output_tokens_details":{"$ref":"#/components/schemas/BatchOutputTokensDetails"},"total_tokens":{"type":"integer","minimum":0.0,"title":"Total Tokens"}},"type":"object","required":["input_tokens","output_tokens","total_tokens"],"title":"BatchUsage"},"Body_upload_file_files_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"purpose":{"type":"string","title":"Purpose"},"expires_after[anchor]":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires After[Anchor]"},"expires_after[seconds]":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires After[Seconds]"}},"type":"object","required":["file","purpose"],"title":"Body_upload_file_files_post"},"ChatCompletionRequest":{"properties":{"model":{"type":"string","title":"Model","description":"ID of the model to use"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Messages","description":"A list of messages comprising the conversation so far"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"Sampling temperature between 0 and 2","default":0.6},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","description":"Maximum number of tokens to generate"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","description":"Nucleus sampling parameter"},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","description":"Number of top tokens to consider"},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","description":"Minimum probability for a token to be considered"},"reasoning_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Effort","description":"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`."},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"Whether to stream back partial progress","default":false},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","description":"Number of chat completion choices to generate","default":1},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop","description":"Up to 4 sequences where the API will stop generating"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Deterministic sampling seed"},"research":{"anyOf":[{"$ref":"#/components/schemas/ResearchOptions"},{"type":"null"}],"title":"Research","description":"Lightning Rod extension. Organization-registered custom context sources the model may call as tools while answering."},"answer_type":{"anyOf":[{"$ref":"#/components/schemas/AnswerTypeEnum"},{"type":"string","const":"auto"},{"type":"null"}],"title":"Answer Type","description":"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`."},"prediction_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Prediction Date","description":"Lightning Rod extension. ISO-8601 date-time the model treats as today for a historical/as-of forecast; when omitted, the current UTC date is used."}},"type":"object","required":["model","messages"],"title":"ChatCompletionRequest","examples":[{"messages":[{"content":"Will Bitcoin increase by more than 10% over the next 3 months?","role":"user"}],"model":"ckpt_<checkpoint id>"}]},"ChatCompletionResponse":{"properties":{"id":{"type":"string","title":"Id","description":"A unique identifier for the chat completion"},"object":{"type":"string","const":"chat.completion","title":"Object","description":"The object type","default":"chat.completion"},"created":{"type":"integer","title":"Created","description":"Unix timestamp of when the completion was created"},"model":{"type":"string","title":"Model","description":"The model used for the chat completion"},"choices":{"items":{"$ref":"#/components/schemas/Choice"},"type":"array","title":"Choices","description":"A list of chat completion choices"},"usage":{"anyOf":[{"$ref":"#/components/schemas/Usage"},{"type":"null"}],"description":"Usage statistics for the completion request"}},"type":"object","required":["id","created","model","choices"],"title":"ChatCompletionResponse"},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role","description":"The role of the message author (system, user, or assistant)"},"content":{"type":"string","title":"Content","description":"The content of the message"}},"type":"object","required":["role","content"],"title":"ChatMessage","examples":[{"content":"Will the S&P 500 close above 6000 by the end of 2025?","role":"user"}]},"Choice":{"properties":{"index":{"type":"integer","title":"Index","description":"The index of this choice"},"message":{"$ref":"#/components/schemas/ResponseMessage","description":"The message generated by the model"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason","description":"The reason the model stopped generating tokens"}},"type":"object","required":["index","message"],"title":"Choice"},"ExpirationPolicy":{"properties":{"anchor":{"type":"string","const":"created_at","title":"Anchor"},"seconds":{"type":"integer","maximum":2592000.0,"minimum":3600.0,"title":"Seconds"}},"additionalProperties":false,"type":"object","required":["anchor","seconds"],"title":"ExpirationPolicy"},"FileDeleted":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"file","title":"Object","default":"file"},"deleted":{"type":"boolean","const":true,"title":"Deleted","default":true}},"type":"object","required":["id"],"title":"FileDeleted"},"FileObject":{"properties":{"id":{"type":"string","title":"Id"},"bytes":{"type":"integer","minimum":0.0,"title":"Bytes"},"created_at":{"type":"integer","title":"Created At"},"filename":{"type":"string","title":"Filename"},"object":{"type":"string","const":"file","title":"Object","default":"file"},"purpose":{"type":"string","enum":["batch","batch_output"],"title":"Purpose"},"status":{"type":"string","enum":["uploaded","processed","error"],"title":"Status","default":"processed"},"expires_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires At"},"status_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Details"}},"type":"object","required":["id","bytes","created_at","filename","purpose"],"title":"FileObject"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ModelListResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"The object type","default":"list"},"data":{"items":{"$ref":"#/components/schemas/ModelObject"},"type":"array","title":"Data","description":"A list of model objects"}},"type":"object","required":["data"],"title":"ModelListResponse"},"ModelObject":{"properties":{"id":{"type":"string","title":"Id","description":"The model identifier"},"object":{"type":"string","const":"model","title":"Object","description":"The object type","default":"model"},"created":{"type":"integer","title":"Created","description":"Unix timestamp of when the model was created","default":0},"owned_by":{"type":"string","title":"Owned By","description":"The organization that owns the model","default":"lightningrodlabs"},"name":{"type":"string","title":"Name","description":"Display name of the model","default":""},"description":{"type":"string","title":"Description","description":"Description of the model","default":""},"context_length":{"type":"integer","title":"Context Length","description":"Maximum context length in tokens","default":0},"max_completion_tokens":{"type":"integer","title":"Max Completion Tokens","description":"Maximum number of tokens to generate","default":0},"pricing":{"additionalProperties":true,"type":"object","title":"Pricing","description":"Per-token pricing"}},"type":"object","required":["id"],"title":"ModelObject"},"ResearchOptions":{"properties":{"sources":{"type":"array","items":{"type":"string"},"title":"Sources","description":"Registered custom source ids (`{pipelineId}/{generatorSlug}`)."}},"type":"object","title":"ResearchOptions","description":"Organization-registered context generators a checkpoint may call as tools while answering.","required":["sources"]},"ResponseMessage":{"properties":{"role":{"type":"string","title":"Role","description":"The role of the message author"},"content":{"type":"string","title":"Content","description":"The model's full response. When `answer_type` was set on the request, a machine-readable answer is embedded between `<answer></answer>` tags at the end (e.g. `<answer>0.62</answer>` for a binary probability). See the request's `answer_type` field for the per-type shapes."},"thinking":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thinking","description":"The model's reasoning/thinking chain, when returned by the model."},"annotations":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/UrlCitationAnnotation"}},{"type":"null"}],"title":"Annotations","description":"Source citations, present when the model used registered sources. Each entry is a `url_citation` referencing a source the model used."}},"type":"object","required":["role","content"],"title":"ResponseMessage"},"Usage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"Number of tokens in the prompt"},"completion_tokens":{"type":"integer","title":"Completion Tokens","description":"Number of tokens in the completion"},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total number of tokens used"}},"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"title":"Usage","description":"Token counts for the completion request."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"UrlCitationAnnotation":{"properties":{"type":{"type":"string","const":"url_citation","title":"Type","description":"The annotation type. Always `url_citation`.","default":"url_citation"},"url_citation":{"$ref":"#/components/schemas/UrlCitation","description":"The cited source."}},"type":"object","required":["type","url_citation"],"title":"UrlCitationAnnotation"},"UrlCitation":{"properties":{"url":{"type":"string","title":"Url","description":"URL of the cited source."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the cited source, when available."}},"type":"object","required":["url"],"title":"UrlCitation"}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Lightning Rod API key (`sk_…`) sent as a Bearer token. Create one on the Model Workspace API page."}},"headers":{"X-RateLimit-Limit":{"description":"Default request limit per minute for this organization (120 requests per minute). Contact `support@lightningrod.ai` for higher limits.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current 60-second window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) when the current rate-limit window resets.","schema":{"type":"integer"}}},"responses":{"TooManyRequests":{"description":"Rate limit exceeded. Retry after the number of seconds in `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","example":"Rate limit exceeded"}}}}}}}},"servers":[{"url":"https://api.lightningrod.ai"}],"x-service-info":{"categories":["ai","llm","ai agents","forecasting","prediction markets"],"docs":{"homepage":"https://lightningrod.ai","apiReference":"https://www.lightningrod.ai/openapi.json","llms":"https://www.lightningrod.ai/llms.txt"}}}