NeonAPI Docs
API reference

Chat Completions

Endpoints, request fields and response schemas for calling NeonAPI.

POST /v1/chat/completions

Authentication

Use your NeonAPI API key in Authorization: Bearer YOUR_API_KEY. Keep the key in a trusted application environment.

Availability and compatibility

Check the selected model’s protocol, permissions, price and supported parameters before calling. Unsupported parameters may be rejected. Request examples use placeholders.

Request fields

application/json

FieldTypeRequiredConstraintsMeaning
modelstringYes—Exact published model ID.
messagesMessage[]Yes—Ordered conversation messages with role and content.
temperaturenumberNo≥ 0; ≤ 2; default: 1Sampling temperature where supported.
top_pnumberNo≥ 0; ≤ 1; default: 1Nucleus sampling probability.
nintegerNo≥ 1; default: 1Number of generated results; model limits apply.
streambooleanNodefault: falseRequest incremental streaming events.
stream_optionsobjectNo—Stream options, including usage where supported.
stopstring / string[]No——
max_tokensintegerNo—Output token limit; model-dependent.
max_completion_tokensintegerNo—Completion token budget for compatible models.
presence_penaltynumberNo≥ -2; ≤ 2; default: 0—
frequency_penaltynumberNo≥ -2; ≤ 2; default: 0—
logit_biasobjectNo——
userstringNo——
toolsTool[]No—Tool definitions supplied by your application.
tool_choicestring / objectNo—Control whether/how a tool is selected.
response_formatResponseFormatNo—Desired output format where supported.
seedintegerNo——
reasoning_effortstringNolow, medium, high—
modalitiesstring[]No——
audioobjectNo——

Full field definitions, nested objects and referenced schemas are available in the downloadable specification.

Request example

export NEON_API_KEY="YOUR_API_KEY"
curl https://neon-api.com/v1/chat/completions \
  -H "Authorization: Bearer $NEON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "YOUR_MODEL_ID",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}'

Responses

Fields vary by model and protocol. The schema below describes the documented successful response; streams use protocol-specific events.

StatusMeaning
200Successful response
400Invalid request
429Rate limited

Response schema

FieldTypeRequiredConstraintsMeaning
idstringNo—Identifier returned for this result or task.
objectstringNo——
createdintegerNo——
modelstringNo—Exact published model ID.
choicesobject[]No—Generated completion candidates.
usageUsageNo—Usage reported by the selected protocol.
system_fingerprintstringNo——

Download the user API OpenAPI specification

See errors and streaming & tasks.