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.
AuthorizationBearer <token>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
application/json- body
model*stringID of the model to use.
prompt*|array<string>|array<integer>|array<array<integer>>The prompt(s) to generate completions for - can be string, array of strings, tokens, or token arrays.
best_of?|Generate best_of completions and return the best one. Must be greater than n if both are set.
echo?|Echo back the prompt in addition to the completion.
falsefrequency_penalty?|Penalize new tokens based on their existing frequency (-2.0 to 2.0).
logit_bias?|Modify likelihood of specified tokens appearing (token ID -> bias from -100 to 100).
logprobs?|Include log probabilities on the most likely tokens (max 5).
max_tokens?|Maximum number of tokens to generate in the completion.
n?|How many completions to generate for each prompt.
presence_penalty?|Penalize new tokens based on whether they appear in the text so far (-2.0 to 2.0).
seed?|Seed for deterministic sampling (best effort, not guaranteed).
stop?|array<string>|Up to 4 sequences where the API will stop generating.
stream?|Stream back partial progress as server-sent events.
falsestream_options?|Options for streaming response (only used when stream=True).
suffix?|Suffix after completion of inserted text.
temperature?|Sampling temperature (0-2). Higher = more random, lower = more deterministic.
top_p?|Nucleus sampling - consider tokens with top_p probability mass (0-1).
user?|Unique identifier for end-user to help monitor and detect abuse.
Successful Response
application/json- response
choices?array<>The list of completion choices the model generated.
[]created*integerUnix timestamp (in seconds) of when the completion was created.
id*stringA unique identifier for the completion.
model*stringThe model used for completion.
object?stringThe object type, always 'text_completion'.
"text_completion"system_fingerprint?|Backend configuration fingerprint for determinism tracking.
usage*Usage statistics for the completion request.
curl -X POST 'https://deepfellow-server-host/v1/completions' \ -H 'Content-Type: application/json' \ -d '{ "model": "llama3.1:8b", "prompt": "Hello World", "stream": false}'{ "choices": [], "created": 0, "id": "string", "model": "string", "object": "text_completion", "system_fingerprint": "string", "usage": { "completion_tokens": 0, "prompt_tokens": 0, "total_tokens": 0, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "prompt_tokens_details": { "audio_tokens": 0, "cached_tokens": 0 } }}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.