GET
/v1/schemas/nvidia/chat/meta/llama2-70b?kind=output
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace5799483968d8fdc741688208712f652db0001d8cb3ed639a283c6af9cb614fb0{
"fetchedAt": 1791535404,
"extractorVersion": "1",
"verifiedAt": null
} |
Response body
6 properties · 3 required · 3 $defs| property | type | description | constraints |
|---|---|---|---|
| model* | string | ||
| choices* | ChatCompletionResponseChoice[] | The list of completion choices the model generated for the input prompt. | |
| usage* | UsageInfo | Usage statistics for the completion request. | |
| id | string | A unique identifier for the completion. | |
| object | string | default: "chat.completion" | |
| created | integer |
Types
3 $defsChatCompletionResponseChoiceobject
| index* | integer | The index of the choice in the list of choices (always 0). | |
| message* | ChatMessage | A chat completion message generated by the model. | |
| 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. Will be `null` if the model has not finished | stop | length · nullable |
ChatMessageobject
| role* | string | The role of the message author. | |
| content* | string | The contents of the message. |
UsageInfoobject
| prompt_tokens | integer | Number of tokens in the prompt. | default: 0 |
| total_tokens | integer | Total number of tokens used in the request (prompt + completion). | default: 0 |
| completion_tokens | integer | Number of tokens in the generated completion. | nullable |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"nvidia","endpointId":"meta/llama2-70b","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}