GET

/v1/schemas/grok/embeddings/v1%2Fembeddings

kind inputactivity embeddingshash 48e5c052…extracted Jul 6, 2026version currentsource upstream spec ↗

Request body

6 properties · 0 required · 1 $defs
propertytypedescriptionconstraints
dimensionsanyThe number of dimensions the resulting output embeddings should have.format: int32
encoding_formatanyThe format to return the embeddings in. Can be either `float` or `base64`.
inputobject | 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…
modelstringID of the model to use.
previewanyFlag to use the new format of the API.
useranyA unique identifier representing your end-user, which can help xAI to monitor and detect abuse.

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"grok","endpointId":"v1/embeddings","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}