GET
/v1/schemas/fireworks/chat/v1/completions?kind=output
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace04c9d2874bad4d95506ccffd28ab3bdbf9fee45bfef4e95e60c65f9656c45c20{
"fetchedAt": 1789189866,
"extractorVersion": "1",
"verifiedAt": null
} |
Response body
7 properties · 5 required · 9 $defs| property | type | description | constraints |
|---|---|---|---|
| id* | string | A unique identifier of the response | |
| created* | integer | The Unix time in seconds when the response was generated | |
| model* | string | The model used for the completion | |
| choices* | Choice[] | The list of generated completion choices | |
| usage* | UsageInfo | Usage statistics for the completion | |
| object | string | The object type, which is always "text_completion" | default: "text_completion" |
| perf_metrics | object | See parameter [perf_metrics_in_response](#body-perf-metrics-in-response) | nullable |
Types
9 $defsChoiceobject
A completion choice.
| index* | integer | The index of the completion choice | |
| text* | string | The completion response | |
| logprobs | LogProbs | NewLogProbs | The log probabilities of the most likely tokens | nullable · default: null |
| finish_reason | enum | The reason the model stopped generating tokens. This will be "stop" if the model hit a natural stop point or a provided stop sequence, or "length" if the maximum number of tokens specified in the request was reached | stop | length | error · nullable |
| raw_output | RawOutput | Extension of OpenAI that returns low-level interaction of what the model sees, including the formatted prompt and function calls | nullable |
| prompt_token_ids | integer[] | Token IDs for the prompt (when return_token_ids=true) | nullable |
| token_ids | integer[] | Token IDs for the generated completion (when return_token_ids=true) | nullable |
CompletionTokensDetailsobject
| reasoning_tokens | integer | nullable |
LogProbsobject
Legacy log probabilities format
| tokens | string[] | ||
| token_logprobs | number[] | ||
| top_logprobs | object[] | nullable | |
| text_offset | integer[] | ||
| token_ids | integer[] | nullable |
NewLogProbsobject
OpenAI-compatible log probabilities format
| content | NewLogProbsContent[] |
NewLogProbsContentobject
| token* | string | ||
| logprob* | number | ||
| sampling_logprob* | number | nullable | |
| sampling_mask_count | integer | nullable | |
| sampling_mask | integer[] | string | nullable · default: null | |
| bytes* | integer[] | ||
| top_logprobs | NewLogProbsContentTopLogProbs[] | ||
| token_id* | integer | ||
| text_offset* | integer | ||
| last_activation | string | nullable | |
| routing_matrix | string | nullable |
NewLogProbsContentTopLogProbsobject
| token* | string | ||
| logprob* | number | ||
| token_id* | integer | ||
| bytes | integer[] |
PromptTokensDetailsobject
| cached_tokens | integer | nullable |
RawOutputobject
Extension of OpenAI that returns low-level interaction of what the model sees, including the formatted prompt and function calls
| prompt_fragments* | string | integer[] | Pieces of the prompt (like individual messages) before truncation and concatenation. Depending on prompt_truncate_len some of the messages might be dropped. Contains a mix of strings to be tokenized and individual tokens (if dictated by the conversation templa… | |
| prompt_token_ids* | integer[] | Fully processed prompt as seen by the model | |
| completion* | string | Raw completion produced by the model before any tool calls are parsed | |
| completion_token_ids | integer[] | Token IDs for the raw completion | nullable |
| completion_logprobs | NewLogProbs | OpenAI-compatible log probabilities format | nullable |
| images | string[] | Images in the prompt | nullable |
| videos | string[] | Videos in the prompt | nullable |
| grammar | string | Grammar used for constrained decoding, can be either user provided (directly or JSON schema) or inferred by the chat template | nullable |
UsageInfoobject
Usage statistics.
| prompt_tokens* | integer | The number of tokens in the prompt | |
| total_tokens* | integer | The total number of tokens used in the request (prompt + completion) | |
| completion_tokens | integer | The number of tokens in the generated completion | nullable |
| prompt_tokens_details | PromptTokensDetails | Details about prompt tokens, including cached tokens | nullable |
| completion_tokens_details | CompletionTokensDetails | Details about completion tokens, including reasoning tokens | nullable |
| output_tokens_details | CompletionTokensDetails | Details about output tokens, including reasoning tokens | nullable |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"fireworks","endpointId":"v1/completions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}