DeepFellow DOCS

Create A Model Response

POST
/v1/responses

Create a model response.

Provide text or image inputs to generate text or JSON outputs. Have the model call your own custom code or use built-in tools like web search or file search to use your own data as input for the model's response.

Authorization

headerAuthorizationBearer <token>

Header Parameters

OpenAI-Organization?|

Organization Id from OpenAi compatible endpoint. Required to organization access or project access (with OpenAI-Project header) when logged as User or Admin User.

OpenAI-Project?|

Project Id from OpenAi compatible endpoint. Required to project access for organization api key or User / Admin User access with OpenAI-Organization

Request Body

application/json
  1. body
model*string

Model ID used to generate the response, like llama3.1:8b or qwen3:1.7b.DeepFellow supports a wide range of models with different capabilities, and performance characteristics.

input?|array<||||||||||||||||||||>

Text, image, or file inputs to the model, used to generate a response.

Default[]
instructions?string

Previous messages inserted into the model's context.When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.

Default""
text?|

Configuration options for a text response from the model. Can be plain text, JSON or structured JSON.

prompt?|

Reference to a prompt template and its variables.

tool_choice?||

[Currently not supported] How the model should select which tool (or tools) to use when generating a response. See the tools parameter below to see how to specify which tools the model can call.

Default"auto"
tools?array<||||||>

An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter.We support the following categories of tools:- Built-in tools: Tools that are provided by DeepFellow that extend the model's capabilities, like web search or file search.- MCP Tools: Integrations with third-party systems via custom MCP servers or predefined connectors such as Google Drive and SharePoint.- Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. You can also use custom tools to call your own code.

Default[]
temperature?number

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both.

Range0 <= value <= 2
Default1
top_p?number

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.We generally recommend altering this or temperature but not both.

Range0 <= value <= 1
Default1
reasoning?|

Configuration options for reasoning models.

stream?boolean

If set to true, the model response data will be streamed to the client as it is generated using server-sent events.

Defaultfalse
max_output_tokens?|

An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.

max_tool_calls?integer

The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored.

Range0 <= value <= 10
Default5
parallel_tool_calls?boolean

Whether to allow the model to run tool calls in parallel.

Defaultfalse
include?array<unknown>

Specify additional output data to include in the model response.

Default[]
background?boolean

Whether to run the model response in the background.

Defaultfalse
previous_response_id?string

[Currently not supported] The unique ID of the previous response to the model. Use this to create multi-turn conversations. Cannot be used in conjunction with conversation.

Default""
top_logprobs?|

An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability.

metadata?

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.

Default{}
service_tier?stringDeprecated

[Not supported. Placeholder for compatibility]

Default"auto"
Value in"auto""default""flex""priority"
store?boolean

[Currently not supported] Whether to store the generated model response for later retrieval via API.

Defaulttrue
truncation?string

[Currently not supported] The truncation strategy to use for the model response.- auto: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation.- disabled (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.

Default"disabled"
Value in"auto""disabled"
user?stringDeprecated

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users.

Default""

Response Body

Successful Response

application/json
  1. response
object?string
Default"response"
output?array<|||||||||||||||||>
Default[]
output_text?string
Default""
text?|||null
reasoning?|null
tool_choice?||
Default"auto"
model*string
prompt?|null
instructions?string|array<|||||||||||||||||||>|null
tools?array<||||||>
Default[]
max_output_tokens?integer|null
max_tool_calls?integer|null
parallel_tool_calls?boolean
Defaultfalse
background?boolean
Defaultfalse
temperature?number|null
top_p?number|null
truncation?string
Default"disabled"
Value in"auto""disabled"
status?string
Default"completed"
Value in"in_progress""completed""incomplete""failed""cancelled""queued"
created_at?integer
top_logprobs?integer|null
metadata?
Default{}
previous_response_id?string|null
usage?|null
service_tier?string
Default""
user?string
Default""
id?string
Default""
error?|null
incomplete_details?|null
Example Request
curl -X POST 'https://deepfellow-server-host/v1/responses' \  -H 'Content-Type: application/json' \  -d '{  "input": "Say Hello World o/.",  "model": "llama3.1:8b"}'
Example Response
{  "created_at": 1741476542,  "id": "67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b",  "metadata": {},  "model": "qwen3:1.7b",  "object": "response",  "output": [    {      "content": [        {          "annotations": [],          "text": "In a peaceful grove beneath a silver moon, a unicorn named Lumina discovered a hidden pool that reflected the stars. [...]",          "type": "output_text"        }      ],      "id": "67ccd2bf17f0819081ff3bb2cf6508e60bb6a6b452d3795b",      "role": "assistant",      "status": "completed",      "type": "message"    }  ],  "parallel_tool_calls": true,  "reasoning": {},  "status": "completed",  "store": true,  "temperature": 1,  "text": {    "format": {      "type": "text"    }  },  "tool_choice": "auto",  "tools": [],  "top_p": 1,  "truncation": "disabled",  "usage": {    "input_tokens": 36,    "input_tokens_details": {      "cached_tokens": 0    },    "output_tokens": 87,    "output_tokens_details": {      "reasoning_tokens": 0    },    "total_tokens": 123  }}

We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.