Skip to main content
POST
Create completion

Authorizations

Authorization
string
header
required

Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.

Body

application/json
model
string | null

ID of the model to use.

prompt

Prompt or prompts to generate completions for.

Required range: x >= 0
echo
boolean | null
default:false

If true, includes the prompt in the returned text.

frequency_penalty
number | null
default:0

Penalty applied to tokens based on how often they already appear in the text. Positive values reduce repetition.

logit_bias
Logit Bias · object | null

Map of token IDs to a bias value. The bias is added to the model's logits before sampling.

logprobs
integer | null

Number of most likely tokens to return log probabilities for at each position.

max_tokens
integer | null
default:16

Maximum number of tokens to generate.

n
integer
default:1

Number of completions to generate for each prompt.

presence_penalty
number | null
default:0

Penalty applied to tokens that already appear in the text. Positive values encourage the model to introduce new topics.

seed
integer | null

Random seed for sampling. Requests with the same seed and parameters aim to return the same result.

Required range: -9223372036854776000 <= x <= 9223372036854776000
stop
default:[]

Sequences where generation stops. The matched stop sequence is omitted unless include_stop_str_in_output is true.

stream
boolean | null
default:false

If true, the response arrives as server-sent events while the model generates it.

stream_options
StreamOptions · object | null

Options for a streaming response. Set only when stream is true.

temperature
number | null

Sampling temperature. Higher values make the output more random, and lower values make it more focused and repeatable.

top_p
number | null

Nucleus sampling. The model samples only from the smallest set of tokens whose combined probability reaches this value.

user
string | null

Identifier for the end user, accepted for compatibility. Ignored by vLLM; other backends may use it.

If true, uses beam search instead of sampling to generate the output.

top_k
integer | null

Limits sampling to the K most likely tokens at each step.

min_p
number | null

Minimum probability for a token to be considered, relative to the probability of the most likely token.

repetition_penalty
number | null

Penalty applied to tokens that already appear in the prompt or the generated text. Values above 1 discourage repetition, and values below 1 encourage it.

length_penalty
number
default:1

Penalty on sequence length when beam search is on. Values above 0 favor longer sequences, and values below 0 favor shorter ones.

stop_token_ids
integer[] | null

Token IDs where generation stops.

include_stop_str_in_output
boolean
default:false

If true, includes the matched stop string in the output text.

ignore_eos
boolean
default:false

If true, generation continues after the end-of-sequence token.

min_tokens
integer
default:0

Minimum number of tokens to generate before a stop condition can end the output.

skip_special_tokens
boolean
default:true

If true, removes special tokens from the output text.

spaces_between_special_tokens
boolean
default:true

If true, adds spaces between special tokens in the output text.

truncate_prompt_tokens
integer | null

Maximum number of prompt tokens to keep. Use -1 for the model context limit. truncation_side selects which end is dropped; when unset, the backend uses its default.

Required range: -1 <= x <= 9223372036854776000
truncation_side
enum<string> | null

Which side to truncate from when truncate_prompt_tokens is active. 'right' keeps the first N tokens. 'left' keeps the last N tokens.

Available options:
left,
right
allowed_token_ids
integer[] | null

Token IDs the model is allowed to generate. All other tokens are blocked.

prompt_logprobs
integer | null

Number of log probabilities to return for each prompt token.

logprob_token_ids
integer[] | null

Specific vocab token IDs to return logprobs for at each generated position, in addition to the sampled token. Requires logprobs to be set.

bad_words
string[]

Words the model avoids generating.

add_special_tokens
boolean
default:true

If true (the default), special tokens (e.g. BOS) will be added to the prompt.

response_format
ResponseFormat · object

Similar to chat completion, this parameter specifies the format of output. Only {'type': 'json_object'}, {'type': 'json_schema'}, {'type': 'structural_tag'}, or {'type': 'text'} is supported.

structured_outputs
StructuredOutputsParams · object | null

Additional keyword arguments for structured outputs.

priority
integer
default:0

The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.

Required range: -9223372036854776000 <= x <= 9223372036854776000
request_id
string | null

The request_id related to this request. If the caller does not set it, a random uuid will be generated.

return_tokens_as_token_ids
boolean | null

If specified with 'logprobs', tokens are represented as strings of the form 'token_id:{token_id}' so that tokens that are not JSON-encodable can be identified.

return_token_ids
boolean | null

If specified, the result will include token IDs alongside the generated text.

cache_salt
string | null

If specified, the prefix cache will be salted with the provided string to prevent an attacker from guessing prompts in multi-user environments.

vllm_xargs
Vllm Xargs · object | null

Additional request parameters with (list of) string or numeric values, used by custom extensions.

repetition_detection
RepetitionDetectionParams · object | null

Parameters for detecting repetitive N-gram patterns in output tokens. If such repetition is detected, generation ends early.

thinking_token_budget
integer | null

Maximum number of tokens allowed for thinking operations (reasoning models). Non-negative integer sets the limit; -1 means unlimited (treated as unset).

Response

Successful response.

id
string
required

Unique ID of the response.

created
integer
required

Unix timestamp, in seconds, of when the response was created.

model
string
required

ID of the model that generated the response.

choices
CompletionResponseChoice · object[]
required

List of generated completions.

usage
UsageInfo · object
required
object
string
default:text_completion

Object type. Always text_completion.

Allowed value: "text_completion"
service_tier
enum<string> | null

Service tier reported by the backend, when available. May be null.

Available options:
auto,
default,
flex,
scale,
priority
system_fingerprint
string | null

Identifier for the backend configuration that served the request.

metrics
PerRequestTimingMetrics · object | null

Timing and throughput measurements for this request, when reported by the backend.

Last modified on July 31, 2026