Home / Servers / OpenAI API / create_embedding

Create embeddings

An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.

Create embeddings Creates an embedding vector representing the input text. [POST /embeddings]

Name on the gateway: openai_api__create_embedding · may change things.

Parameters

NameTypeDescription
input requiredstringInput text to embed, encoded as a string or array of tokens. To embed multiple…
model requiredstringID of the model to use. You can use the List models API to see all of your…
encoding_formatfloat | base64The format to return the embeddings in. Can be either float or base64.
dimensionsintegerThe number of dimensions the resulting output embeddings should have. Only…
userstringA unique identifier representing your end-user, which can help OpenAI to…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "openai_api__create_embedding",
  "arguments": {
    "input": "…",
    "model": "…"
  }
}

Or connect the OpenAI API server directly, which lists 371 tools including this one:

Run in your terminal
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create embeddings tool with input set to ….

More from OpenAI API