---
title: "POST /api/v2/embeddings"
method: POST
path: "/api/v2/embeddings"
tags: ["Client API v2"]
---

# POST /api/v2/embeddings

`POST /api/v2/embeddings`

Generate embeddings for one or more input texts.

## Headers

- `Accept` 'application/json', required

## Request body

- Txt2EmbeddingRequestBody
  - `input` union, required — Input text(s) to generate embeddings for. Can be a single string or array of strings (max 2048 items). Each input limited to 8192 tokens, total request limited to 300k tokens.
    - string
    - string[]
  - `model` string, required — The embedding model to use. Available models can be retrieved via the GET /api/v1/client/models endpoint.
  - `return_result_in_response` boolean, nullable — If true, the embedding result will be returned directly in the response instead of only download url. Optional parameter.
  - `webhook_url` string, uri, nullable — Optional HTTPS URL to receive webhook notifications for job status changes (processing, completed, failed). Must be HTTPS. Max 2048 characters. See [Webhook Documentation](/execution-modes-and-integrations/webhooks) for payload structure and authentication details.
  - `webhook_secret` string, nullable — Optional per-request HMAC secret (min. 32 chars) used to sign the webhook callback. When present, overrides the account-default webhook secret. Requires `webhook_url` to also be set.

## Response `200`

ID of the inference request.

- JobRequestResponseResource
  - `data` object — Information from success endpoint
    - `request_id` string — Request Id

## Other responses

- `401` — Unauthorized user.
- `404` — Not found.
- `422` — Validation failed. Common errors include: model does not exist, model does not support the inference type for this endpoint, or invalid request parameters.
- `429` — Rate limit exceeded. Check X-RateLimit-Type header to determine if minute (RPM) or daily (RPD) limit was hit.

---

[API](https://skmtc.net/deapi/apis/deapi-rest-api.md) · [All operations](https://skmtc.net/deapi/apis/deapi-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deapi/deapi-rest-api/versions/c70b8b231ca8/schema)
