GET
/v1/schemas/cohere/chat/v1/generate?kind=output
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace2a018e8f34bfd1ee4203c69583349290c7eedc2f0fbfe52bc65b061a70b7dec4{
"fetchedAt": 1793770244,
"extractorVersion": "1",
"verifiedAt": null
} |
Response body
4 properties · 2 required · 2 $defs| property | type | description | constraints |
|---|---|---|---|
| id* | string | ||
| generations* | SingleGeneration[] | List of generated results | |
| prompt | string | Prompt used for generations. | |
| meta | ApiMeta |
Types
2 $defsApiMetaobject
| api_version | object | ||
| billed_units | object | ||
| tokens | object | ||
| cached_tokens | number | The number of prompt tokens that hit the inference cache. | |
| warnings | string[] |
SingleGenerationobject
| id* | string | ||
| text* | string | ||
| index | integer | Refers to the nth generation. Only present when `num_generations` is greater than zero. | |
| likelihood | number | ||
| token_likelihoods | object[] | Only returned if `return_likelihoods` is set to `GENERATION` or `ALL`. The likelihood refers to the average log-likelihood of the entire specified string, which is useful for [evaluating the performance of your model](likelihood-eval), especially if you've cre… |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"cohere","endpointId":"v1/generate","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}