IntegrationsOpenaiActions
Create OpenAI embeddings
Create float embeddings for a single text input with the OpenAI Embeddings API.
embeddings.create · OpenAI · v1
Details
Scopes
None
Input
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
input | string | Yes | minLength 1; maxLength 32768 |
model | string | Yes | minLength 1; maxLength 200 |
dimensions | integer | No | minimum 1; maximum 4096 |
Output
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
model | string | No | minLength 1; maxLength 200 |
data | array<object> | Yes | maxItems 16 |
data[] | object | Yes | additionalProperties false |
data[].index | integer | Yes | — |
data[].embedding | array<number> | Yes | maxItems 4096 |
data[].embedding[] | number | Yes | — |
usage | object | No | additionalProperties false |
usage.input_tokens | integer | No | — |
usage.output_tokens | integer | No | — |
usage.total_tokens | integer | No | — |
usage.prompt_tokens | integer | No | — |
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"
]
}