Sign in

Create completion

documented

Generate a standard text completion for a given prompt.

POST /v1/completionsCompletionsno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://api.cerebras.ai/v1/completions" \
  -X POST \
  -H "Authorization: Bearer {{CEREBRAS_API_KEY}}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "model": "{{$model}}", 
    "prompt": "{{$prompt}}", 
    "max_tokens": {{$max_tokens}}, 
    "temperature": {{$temperature}}, 
    "top_p": {{$top_p}}, 
    "n": {{$n}}, 
    "stream": {{$stream}}, 
    "stop": {{$stop}}, 
    "presence_penalty": {{$presence_penalty}}, 
    "frequency_penalty": {{$frequency_penalty}}, 
    "logprobs": {{$logprobs}}, 
    "logit_bias": {{$logit_bias}}, 
    "user": "{{$user}}", 
    "echo": {{$echo}}, 
    "suffix": "{{$suffix}}" 
  }'