Skip to main content
FuseFuse
IntegrationsOpenaiActions

Create OpenAI embeddings

Create float embeddings for a single text input with the OpenAI Embeddings API.

Agent markdown

embeddings.create · OpenAI · v1

Details

Risk
Write
Idempotency
Unsafe
Availability
Default
Exposure
REST, SDK, MCP
MCP hints
readOnly=false, destructive=false, idempotent=false, openWorld=true

Scopes

None

Input

Input schema
NameTypeRequiredConstraints
(root)objectYesadditionalProperties false
inputstringYesminLength 1; maxLength 32768
modelstringYesminLength 1; maxLength 200
dimensionsintegerNominimum 1; maximum 4096

Output

Output schema
NameTypeRequiredConstraints
(root)objectYesadditionalProperties false
modelstringNominLength 1; maxLength 200
dataarray<object>YesmaxItems 16
data[]objectYesadditionalProperties false
data[].indexintegerYes
data[].embeddingarray<number>YesmaxItems 4096
data[].embedding[]numberYes
usageobjectNoadditionalProperties false
usage.input_tokensintegerNo
usage.output_tokensintegerNo
usage.total_tokensintegerNo
usage.prompt_tokensintegerNo

Raw schema

Input
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "input": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32768
    },
    "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "dimensions": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4096
    }
  },
  "required": [
    "input",
    "model"
  ]
}
Output
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "index": {
            "type": "integer"
          },
          "embedding": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "maxItems": 4096
          }
        },
        "required": [
          "index",
          "embedding"
        ]
      },
      "maxItems": 16
    },
    "usage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "input_tokens": {
          "type": "integer"
        },
        "output_tokens": {
          "type": "integer"
        },
        "total_tokens": {
          "type": "integer"
        },
        "prompt_tokens": {
          "type": "integer"
        }
      }
    }
  },
  "required": [
    "data"
  ]
}