GET
/v1/schemas/grok/embeddings/v1%2Fembeddings
Accept:
kind inputactivity embeddingshash 48e5c052…extracted Jul 6, 2026version currentsource upstream spec ↗
Request body
6 properties · 0 required · 1 $defs| property | type | description | constraints |
|---|---|---|---|
| dimensions | any | The number of dimensions the resulting output embeddings should have. | format: int32 |
| encoding_format | any | The format to return the embeddings in. Can be either `float` or `base64`. | |
| input | object | object | object | … | Input text to embed, encoded as a string or list of tokens. To embed multiple inputs in a single request, pass a list of strings or list of token lists. The total tokens in the input must not exceed the context window for the model and cannot be an empty strin… | |
| model | string | ID of the model to use. | |
| preview | any | Flag to use the new format of the API. | |
| user | any | A unique identifier representing your end-user, which can help xAI to monitor and detect abuse. |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"grok","endpointId":"v1/embeddings","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}