
Reasoning mode
API Overview
Add reasoning capabilities to any large language model
API Console
Log in to explore more features! Click to Log In
API Reference (1)
| API Description | API Endpoint | Request Method | Stability | Parameter Description |
|---|---|---|---|---|
Chat(Reasoning mode) | POST | Stable | View Details | |
Document Details Add inference ability to all models, just add the suffix -r1-fusion to the model name. Request Parameters Header ParametersContent-TypestringRequired Example Value: application/jsonAcceptstringRequired Example Value: application/jsonAuthorizationstringRequired Example Value: Bearer {{YOUR_API_KEY}}Request Body application/jsonmodelstringRequired The ID of the model to be used. For detailed information on which models are applicable to the chat API, please view Model endpoint compatibility messagesarray[object]Required Generate a message that the chat is completed in [Chat Format] (https://platform.openai.com/docs/guides/chat/introduction). rolestringOptional contentstringOptional temperatureintegerOptional What sampling temperature to use, ranging from 0 to 2. Higher values, such as 0.8, will make the output more random, while lower values, like 0.2, will make it more focused and deterministic. We generally recommend adjusting either this or top_pintegerOptional An alternative to temperature sampling is nucleus sampling, where the model considers tokens within the top_p probability mass. For instance, top_p = 0.1 means only tokens within the top 10% probability mass are considered. We recommend adjusting either this or nintegerOptional How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. streambooleanOptional If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by stopstringOptional Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model’s likelihood to talk about new topics. max_tokensintegerOptional The maximum number of tokens that can be generated in the chat completion.The total length of input tokens and generated tokens is limited by the model’s context length. presence_penaltynumberOptional Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model’s likelihood to talk about new topics. frequency_penaltynumberOptional Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim. See more information about frequency and presence penalties. logit_biasnullOptional Modify the likelihood of specific tokens appearing in the completion. This can be done by providing a JSON object that maps tokens (identified by their token IDs in the tokenizer) to a bias value ranging from -100 to 100. Mathematically, this bias is added to the logits generated by the model before sampling. The exact effect varies depending on the model, but values between -1 and 1 will slightly decrease or increase the likelihood of selection, while values like -100 or 100 will either ban or exclusively select the relevant token. userstringOptional A unique identifier representing your end users, which helps OpenAI monitor and detect abuse. View more | ||||
API Pricing
| Model | Description | 302.AI Price |
|---|
Service | Cost of existing model + DeepSeek-R1 model fee |
|