POST
/
v5
/
completions
curl --request POST \
  --url https://api.egp.scale.com/v5/completions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "stream": true,
  "best_of": 123,
  "echo": true,
  "frequency_penalty": 123,
  "logit_bias": {},
  "logprobs": 123,
  "max_tokens": 123,
  "n": 123,
  "presence_penalty": 123,
  "seed": 123,
  "stop": "<string>",
  "stream_options": {},
  "suffix": "<string>",
  "temperature": 123,
  "top_p": 123,
  "user": "<string>",
  "model": "<string>",
  "prompt": "<string>"
}'
{
  "id": "<string>",
  "object": "text_completion",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 123,
      "logprobs": {
        "text_offset": [
          123
        ],
        "token_logprobs": [
          123
        ],
        "tokens": [
          "<string>"
        ],
        "top_logprobs": [
          {}
        ]
      },
      "text": "<string>"
    }
  ],
  "created": 123,
  "model": "<string>",
  "system_fingerprint": "<string>",
  "usage": {
    "completion_tokens": 123,
    "prompt_tokens": 123,
    "total_tokens": 123,
    "completion_tokens_details": {
      "accepted_prediction_tokens": 123,
      "audio_tokens": 123,
      "reasoning_tokens": 123,
      "rejected_prediction_tokens": 123
    },
    "prompt_tokens_details": {
      "audio_tokens": 123,
      "cached_tokens": 123
    }
  }
}

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Body

application/json

Response

200
application/json

Successful Response

The response is of type object.