NeonAPI Docs
API reference

Claude Messages

Endpoints, request fields and response schemas for calling NeonAPI.

POST /v1/messages

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.

Path and query parameters

FieldInTypeRequired
anthropic-versionheaderstringYes
x-api-keyheaderstringNo

Request fields

application/json

FieldTypeRequiredConstraintsMeaning
modelstringYes—Exact published model ID.
messagesClaudeMessage[]Yes—Ordered conversation messages with role and content.
systemstring / object[]No——
cache_controlobjectNo——
inference_geostringNo——
max_tokensintegerYes≥ 1Output token limit; model-dependent.
temperaturenumberNo≥ 0; ≤ 1Sampling temperature where supported.
top_pnumberNo—Nucleus sampling probability.
top_kintegerNo——
streambooleanNo—Request incremental streaming events.
stop_sequencesstring[]No——
toolsobject[]No—Tool definitions supplied by your application.
tool_choiceobjectNo—Control whether/how a tool is selected.
thinkingobjectNo——
context_managementobjectNo——
output_configobjectNo——
output_formatobjectNo——
containerstring / objectNo——
mcp_serversobject[]No——
metadataobjectNo——
speedstringNostandard, fast—
service_tierstringNoauto, standard_only—

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/messages \
  -H "Authorization: Bearer $NEON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "YOUR_MODEL_ID",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ],
  "max_tokens": 256
}'

Responses

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

StatusMeaning
200Successful response

Response schema

FieldTypeRequiredConstraintsMeaning
idstringNo—Identifier returned for this result or task.
typestringNo——
rolestringNo——
contentobject[]No——
modelstringNo—Exact published model ID.
stop_reasonstringNoend_turn, max_tokens, stop_sequence, tool_use—
usageobjectNo—Usage reported by the selected protocol.

Download the user API OpenAPI specification

See errors and streaming & tasks.