DeepFellow DOCS

Create Chat Completion

Create a model response for the given prompt.

Given a prompt, the model will return one or more predicted completions along with the probabilities of alternative tokens at each position.

Proxy validated completion request to defined API. Needs an user bearer token in the authorization header.

POST
/api/chat
AuthorizationBearer <token>

In: header

Header Parameters

OpenAI-Organization?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?Openai-Project

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

modelModel

Model ID used to generate the response, like gemma3 or llama3.2. Deepfellow supports a wide range of models with different capabilities, and performance characteristics.

messagesMessages

A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text and images.

tools?Tools

A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.

think?Think

For thinking models: whether the model should think before responding. Can be a boolean or effort level.

format?Format

The format to return a response in. Can be json or a JSON schema object.

options?OllamaOptions | null

Additional model parameters such as temperature, top_k, top_p and others.

stream?Stream

If false the response will be returned as a single response object, rather than a stream of objects.

Defaulttrue
keep_alive?Keep Alive

Controls how long the model will stay loaded into memory following the request (default: 5m).

logprobs?Logprobs

Return log probabilities of the output tokens.

top_logprobs?Top Logprobs

Number of most likely tokens to return at each token position.

Response Body

curl -X POST "https://loading/api/chat" \  -H "OpenAI-Organization: string" \  -H "OpenAI-Project: string" \  -H "Content-Type: application/json" \  -d '{    "messages": [      {        "content": "You are a helpful assistant.",        "role": "system"      },      {        "content": "Hello!",        "role": "user"      }    ],    "model": "llama3",    "stream": false  }'
{
  "model": "string",
  "created_at": "2026-04-24T14:32:10Z",
  "message": {
    "role": "assistant",
    "content": "string",
    "thinking": "string",
    "tool_calls": [
      {
        "function": {
          "name": "string",
          "description": "string",
          "arguments": {}
        }
      }
    ],
    "images": [
      "string"
    ]
  },
  "done": true,
  "done_reason": "string",
  "total_duration": 0,
  "load_duration": 0,
  "prompt_eval_count": 0,
  "prompt_eval_duration": 0,
  "eval_count": 0,
  "eval_duration": 0,
  "logprobs": [
    {
      "token": "string",
      "logprob": 0,
      "bytes": [
        0
      ],
      "top_logprobs": [
        {
          "token": "string",
          "logprob": 0,
          "bytes": [
            0
          ]
        }
      ]
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

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.