POST
https://api.fireworks.ai/inference/v1/
/
completions
curl --request POST \
  --url https://api.fireworks.ai/inference/v1/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "accounts/fireworks/models/llama-v3p1-8b-instruct",
  "prompt": "The sky is",
  "images": [
    "<string>"
  ],
  "max_tokens": 16,
  "logprobs": null,
  "echo": false,
  "temperature": 1,
  "top_p": 1,
  "top_k": 50,
  "frequency_penalty": 0,
  "presence_penalty": 0,
  "repetition_penalty": 1,
  "reasoning_effort": "low",
  "mirostat_lr": 0.1,
  "mirostat_target": 1.5,
  "n": 1,
  "ignore_eos": false,
  "stop": "<string>",
  "response_format": null,
  "stream": false,
  "context_length_exceeded_behavior": "truncate",
  "user": "<string>"
}'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "text": "<string>",
      "index": 123,
      "logprobs": {
        "tokens": [
          "<string>"
        ],
        "token_logprobs": [
          123
        ],
        "top_logprobs": [
          {}
        ],
        "text_offset": [
          123
        ]
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200 - application/json

OK

The response is of type object.