Gemini 4 Neon

gemini-4-neon
TextGoogleGemini 4 Neongemini-4-neon

gemini-4-neon is the middle tier of Gemini 4, balancing reasoning depth and efficiency: first on the Artificial Analysis Coding Agent Index (58.6) and 65.2% on Terminal-Bench 4.1. Multimodal input, a 1M-token context and three reasoning levels.

Authentication

Base URL
https://api.dreamto.ai
Authorization
Authorization: Bearer YOUR_API_KEY
Content-Type
application/json
Model name (model)
gemini-4-neon

Integration protocol

Why choose this protocol

Best for users migrating existing Gemini SDK or generateContent requests.

Endpoint URL
POST/v1beta/models/gemini-4-neon:generateContent
Authorization: Bearer YOUR_API_KEYContent-Type: application/json

Request / response JSON

Request
{
  "tools": [],
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Hello, world"
        }
      ]
    }
  ],
  "generationConfig": {
    "topK": 40,
    "topP": 1,
    "temperature": 0.7,
    "maxOutputTokens": 4096
  }
}
Response
{
  "candidates": [
    {
      "content": {
        "role": "model",
        "parts": [
          {
            "text": "Hello from Mix API"
          }
        ]
      }
    }
  ],
  "modelVersion": "gemini-4-neon",
  "usageMetadata": {
    "totalTokenCount": 24,
    "promptTokenCount": 8,
    "candidatesTokenCount": 16
  }
}

Request / response fields

Request fields
FieldField typeRequiredDefaultOptions / rangeDescriptionExample
messagesarrayY--OpenAI-compatible chat message array.[{"role":"user","content":"Hello, world"}]
system_instructionstringN--Used to set the role, style, and boundaries of responses.You are a rigorous assistant.
temperaturenumberN0.7-Controls randomness; lower is more stable.0.7
top_pnumberN1-Nucleus sampling probability threshold.1
max_tokensintegerN--Limits the maximum output length of this response.4096
streambooleanNfalse-Whether to use a streaming response.false
top_kintegerN--Number of Gemini sampling candidates.40
reasoning_effortenumNmediumlow, medium, highMaps to Gemini thinkingConfig.thinkingLevel.low
response_modalitiesarrayN--Gemini response modalities, e.g. TEXT or IMAGE.["TEXT"]
toolsarrayN--Gemini tools/function declarations.[]
Response fields
FieldField typeRequiredDefaultOptions / rangeDescriptionExample
candidates[].content.parts[].textstringN--Text parts in the Gemini candidates.Hello from Mix API
usageMetadata.promptTokenCountintegerN--Gemini input token count.8
usageMetadata.candidatesTokenCountintegerN--Gemini output token count.16
usageMetadata.totalTokenCountintegerN--Gemini total token count.24
candidatesarrayN---[{"content":{"role":"model","parts":[{"text":"Hello from Mix API"}]}}]
candidates[]objectN---{"content":{"role":"model","parts":[{"text":"Hello from Mix API"}]}}
candidates[].contentobjectN---{"role":"model","parts":[{"text":"Hello from Mix API"}]}
candidates[].content.rolestringN---model
candidates[].content.partsarrayN---[{"text":"Hello from Mix API"}]
candidates[].content.parts[]objectN---{"text":"Hello from Mix API"}
modelVersionstringN---gemini-4-neon
usageMetadataobjectN---{"totalTokenCount":24,"promptTokenCount":8,"candidatesTokenCount":16}

Code examples

cURLrequest.sh
curl -X POST "https://api.dreamto.ai/v1beta/models/gemini-4-neon:generateContent" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Hello, world"
        }
      ]
    }
  ],
  "generationConfig": {
    "temperature": 0.7,
    "topP": 1,
    "topK": 40,
    "maxOutputTokens": 4096
  },
  "tools": []
}'