Skip to main content

Ling 3.1 Flash API

inclusionai/ling-3.1-flash/chat

Ling 3.1 Flash is a hybrid-reasoning mixture-of-experts model from inclusionAI, released on 29 September 2026. The publisher describes it as 560B parameters in total with 25B active per token. Here it is one OpenAI-compatible chat endpoint: up to 262,144 tokens of text in, up to 262,144 tokens out, tools and streaming on every request.

Input $0.075Output $0.225per 1 million tokensCached input $0.075

Workbench

Send a request

Quickstart

Examples use the selected endpoint’s public parameter definitions. Replace the API key and example media, then send the request from your server.

SDKs & integrations
POSThttps://api.spicyapi.ai/v1/chat/completions

API authentication

Keep the API key in the server environment variable SPICY_API_KEY. Use Bearer authentication and Content-Type: application/json for JSON requests.

Authorization: Bearer $SPICY_API_KEY
curl --fail-with-body -sN https://api.spicyapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $SPICY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "inclusionai/ling-3.1-flash/chat",
  "messages": [
    {
      "role": "user",
      "content": "Summarise the following release notes into three bullet points."
    }
  ],
  "stream": true
}' \
  | jq --unbuffered -Rrj 'select(startswith("data: ")) | .[6:] | select(. != "[DONE]") | fromjson | if .error then "\n[error] \(.error.message)\n" else (.choices[0].delta.content? // empty) end'

Generated from this model’s input schema — the same one the API validates every request against.

Keep one Idempotency-Key for each logical request. After a network interruption, do not automatically resend with a new key; retain request_id to investigate the accepted request. Idempotency does not replay an earlier chat stream.

Input parameters

Place the model parameters directly in the JSON request body alongside model. This endpoint does not use an input wrapper.

messagesarray<object>Required

Send Ling 3.1 Flash an ordered conversation containing the source material for product and delivery-date extraction; keep tool results paired with tool_call_id.

Default
Not specified
Constraints
minItems:1
maxItems:256
response_formatobjectOptional

Request text or structured JSON from Ling 3.1 Flash for product and delivery-date extraction, then check the JSON against the fields your application expects.

Default
Not specified
tool_choicestring | objectOptional

For Ling 3.1 Flash, tool_choice accepts auto / none / required / function; return each executed function’s result with its original tool_call_id.

Default
Not specified
parallel_tool_callsbooleanOptional

In a Ling 3.1 Flash turn, this switch permits proposals for several independent functions; the application still controls their execution.

Default
true
toolsarray<object>Optional

Give Ling 3.1 Flash up to 128 OpenAI-format function definitions for product and delivery-date extraction; your application checks arguments and performs the proposed operations.

Default
Not specified
Constraints
maxItems:128
top_pnumberOptional

top_p controls nucleus sampling for Ling 3.1 Flash; when evaluating product and delivery-date extraction, change this or temperature separately to see which setting caused the difference.

Default
Not specified
Constraints
minimum:0.01
maximum:1
temperaturenumberOptional

Use temperature to adjust sampling in Ling 3.1 Flash; keep its default while evaluating product and delivery-date extraction unless you need a different answer style.

Default
Not specified
Constraints
minimum:0
maximum:2
stopstring | arrayOptional

Stop Ling 3.1 Flash with one sequence or up to four sequences; the matched marker is omitted from the final text.

Default
Not specified
Constraints
minLength:1
minItems:1
maxItems:4
reasoning_effortstringOptional

Ling 3.1 Flash accepts none, low, medium, high, with medium as the default; compare effort settings on product and delivery-date extraction while monitoring output-token usage.

Default
"medium"
Allowed values
"none""low""medium""high"
max_tokensintegerOptional

For Ling 3.1 Flash, max_tokens defaults to 4,096 and allows at most 262,144 output tokens, including any billable reasoning; reserve enough for product and delivery-date extraction.

Default
4096
Constraints
minimum:1
maximum:262144

Read the result

With stream set to false, the request returns the completed chat response directly. Read choices[].message; no task polling is needed. Set stream to true when your client supports Server-Sent Events.

Completed response example
{
  "id": "chatcmpl_example",
  "object": "chat.completion",
  "created": 1788652800,
  "model": "inclusionai/ling-3.1-flash/chat",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Here is a concise summary of the release notes."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 32,
    "completion_tokens": 14,
    "total_tokens": 46
  }
}

The response example is illustrative. usage reports token counts; token counts and charges depend on your actual request.

SDKs & integrations

Use SpicyAPI in your app, terminal, AI assistant or visual workflow. Choose a setup guide below.

Use it in SillyTavern and roleplay apps

In SillyTavern, RisuAI, Agnai or any app with an OpenAI-compatible setting, paste the base URL below and your API key, then pick inclusionai/ling-3.1-flash/chat as the model. Browser calls are allowed, and sliders this model does not take are ignored instead of rejected.

Base URL: https://api.spicyapi.ai/v1
Model: inclusionai/ling-3.1-flash/chat

Use it in ComfyUI

Install the SpicyAPI nodes from ComfyUI Manager or with the command below, then pick inclusionai/ling-3.1-flash/chat in the SpicyAPI Chat node to use this model inside a ComfyUI graph.

cd ComfyUI/custom_nodes
git clone https://github.com/spicyapi-ai/comfyui-spicyapi