Create Embeddings

POST /v1/embeddings

Generate embeddings for the given input text.

application/json

Body Required

Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • object string Required

      The object type, which is always 'list'.

      Value is list.

    • data array[object] Required

      An array of embedding objects.

      Hide data attributes Show data attributes object
      • object string Required

        The object type, which is always 'embedding'.

        Value is embedding.

      • embedding array[number] Required

        The embedding vector.

      • index integer Required

        The index of the embedding in the list.

    • model string Required

      The ID of the model used to generate the embeddings.

    • usage object Required

      Usage statistics for the embedding request.

      Hide usage attributes Show usage attributes object
      • prompt_tokens integer Required

        The number of tokens in the prompt.

      • total_tokens integer Required

        The total number of tokens used in the request.

  • 400 application/json

    Bad Request

    Hide response attribute Show response attribute object
    • error object Required
      Hide error attributes Show error attributes object
      • message string Required

        A human-readable error message.

      • type string Required

        The type of error that occurred.

      • param string | null Required

        The parameter that caused the error, if applicable.

      • code string Required

        A machine-readable error code.

  • 401 application/json

    Unauthorized

    Hide response attribute Show response attribute object
    • error object Required
      Hide error attributes Show error attributes object
      • message string Required

        A human-readable error message.

      • type string Required

        The type of error that occurred.

      • param string | null Required

        The parameter that caused the error, if applicable.

      • code string Required

        A machine-readable error code.

  • 429 application/json

    Too Many Requests

    Hide response attribute Show response attribute object
    • error object Required
      Hide error attributes Show error attributes object
      • message string Required

        A human-readable error message.

      • type string Required

        The type of error that occurred.

      • param string | null Required

        The parameter that caused the error, if applicable.

      • code string Required

        A machine-readable error code.

POST /v1/embeddings
curl \
 -X POST https://api.rimunace.xyz/v1/embeddings \
 -H "Authorization: $API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"model":"string","input":"string","user":"string"}'
Request examples
{
  "model": "string",
  "input": "string",
  "user": "string"
}
Response examples (200)
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [
        42.0
      ],
      "index": 42
    }
  ],
  "model": "string",
  "usage": {
    "prompt_tokens": 42,
    "total_tokens": 42
  }
}
Response examples (400)
{
  "error": {
    "message": "string",
    "type": "string",
    "param": "string",
    "code": "string"
  }
}
Response examples (401)
{
  "error": {
    "message": "string",
    "type": "string",
    "param": "string",
    "code": "string"
  }
}
Response examples (429)
{
  "error": {
    "message": "string",
    "type": "string",
    "param": "string",
    "code": "string"
  }
}