Skip to main content

Chat Completions

Base URL: https://app.neuroflash.com/api/ds-prototypes

Generate text completions using AI models.

Chat Completions

POST/chat/completions

Handle chat completions with token tracking and provider routing

Request Body

FieldTypeRequiredDescription
messagesarray<object>YesList of messages with 'role' and 'content'
modelstringYesName of the model
temperatureobjectNoTemperature of the model
max_tokensobjectNoLimit the number of tokens to generate
reasoningobjectNoParameters for the reasoning mode
reasoning_effortobjectNoLevel of the reasoning mode
toolsobjectNoFor tools & function calling
tool_choiceobjectNoInfluence tool selection
seedobjectNoRandom seed
response_formatobjectNoUsed for structured outputs to define a JSON schema
web_search_optionsobjectNoExtra options for WEB Search
structured_outputsobjectNoSchema describing the structured output the model should produce
frequency_penaltyobjectNoPenalizing option
presence_penaltyobjectNoPenalizing option
repetition_penaltyobjectNoPenalizing option
stopobjectNoCustomize stop condition
streamobjectNoEnable streaming mode

Example

curl -X POST "https://app.neuroflash.com/api/ds-prototypes/chat/completions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "x-workspace-id: YOUR_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"messages": [],
"model": "string",
"temperature": {},
"max_tokens": {},
"reasoning": {},
"reasoning_effort": {},
"tools": {},
"tool_choice": {},
"seed": {},
"response_format": {},
"web_search_options": {},
"structured_outputs": {},
"frequency_penalty": {},
"presence_penalty": {},
"repetition_penalty": {},
"stop": {},
"stream": {}
}'

Response:

{}

Health Check

GET/health

Health check endpoint

Example

curl "https://app.neuroflash.com/api/ds-prototypes/health" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "x-workspace-id: YOUR_WORKSPACE_ID"

Response:

{}