RedPill
  • INTRODUCTION
    • Introduction
  • GET STARTED
    • How To Use RedPill API
      • Credits
    • RedPill Auto Router
    • Check List Models
    • Supported Models
    • API Reference
      • Create Chat Completion
      • Create Embeddings
    • Links
  • REDPILL ROUTER NETWORK
    • How to Become an API Node
      • FAQs
    • RedPill API Credits Exchange
    • Earn Effortlessly as an API Node
    • Liquid
      • Launching RedPill Liquidity Pool Rewards
        • LP Rewards
        • LP Season1
      • LP FAQs
  • Confidential AI Inference
    • Introduction
    • Get Started
    • Host LLM in TEE
    • Implementation
    • LLM in TEE Benchmark
Powered by GitBook
On this page
  1. GET STARTED
  2. API Reference

Create Embeddings

PreviousCreate Chat CompletionNextLinks

Last updated 11 months ago

Creates an embedding vector representing the input text.

POST https://api.red-pill.ai/v1/embeddings

Request Body

Name
Type
Description

input

string or array

Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for text-embedding-ada-002), cannot be an empty string, and any array must be 2048 dimensions or less. for counting tokens.

model

string

ID of the model to use. You can use the API to see all of your available models, or see our for descriptions of them.

encoding_format

string

The format to return the embeddings in. Can be either float or .

dimensions

integer

The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.

user

string

NOT SUPPORTED

Example Python code
List models
Model overview
base64