POST
/
v1
/
completions
Completions (Legacy)
curl --request POST \
  --url https://api.redpill.ai/v1/completions \
  --header 'Authorization: Bearer <token>'
This endpoint is legacy. Use Chat Completions instead for better results.

Create Completion

POST https://api.redpill.ai/v1/completions

Request

{
  "model": "gpt-3.5-turbo-instruct",
  "prompt": "Say this is a test",
  "max_tokens": 7,
  "temperature": 0
}

Response

{
  "id": "cmpl-123",
  "object": "text_completion",
  "created": 1677652288,
  "model": "gpt-3.5-turbo-instruct",
  "choices": [{
    "text": "\n\nThis is a test.",
    "index": 0,
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 5,
    "completion_tokens": 7,
    "total_tokens": 12
  }
}
Use Chat Completions API for modern applications.