openapi: 3.2.0 info: title: Dedalus Embeddings API description: 'MCP gateway for AI agents. Mix-and-match any model with any tool from our marketplace. ## Authentication Use Bearer token or X-API-Key header authentication: ``` Authorization: Bearer your-api-key-here ``` ``` x-api-key: your-api-key-here ``` ## Available Endpoints - **GET /v1/models**: list available models - **POST /v1/chat/completions**: Chat completions with MCP tools - **GET /health**: Service health check' version: 0.0.1 servers: - url: https://api.dedaluslabs.ai description: Official Dedalus API tags: - name: Embeddings paths: /v1/embeddings: post: tags: - Embeddings summary: Create Embeddings description: Create embeddings using the configured provider. operationId: create_embeddings_v1_embeddings_post requestBody: content: application/json: schema: $ref: '#/components/schemas/EmbeddingRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/EmbeddingResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - Bearer: [] x-codeSamples: - lang: typescript label: Typescript source: 'const client = new Dedalus(); const result = await client.embeddings.create({ ...params });' - lang: python label: Python source: 'client = Dedalus() result = client.embeddings.create(**params)' - lang: go label: Go source: 'client := dedalus.NewClient() result, err := client.Embeddings.New(ctx, body githubcomdedaluslabsdedalussdkgo.EmbeddingNewParams)' components: schemas: EmbeddingResponse: properties: data: items: $ref: '#/components/schemas/Embedding' type: array title: Data description: The list of embeddings generated by the model. x-order: 0 model: type: string title: Model description: The name of the model used to generate the embedding. x-order: 1 object: type: string const: list title: Object description: The object type, which is always "list". x-order: 2 usage: $ref: '#/components/schemas/Usage' description: The usage information for the request. x-order: 3 type: object required: - data - model - object - usage title: EmbeddingResponse description: 'Schema for EmbeddingResponse. Fields: - data (required): list[Embedding] - model (required): str - object (required): Literal["list"] - usage (required): Usage' Embedding: properties: index: type: integer title: Index description: The index of the embedding in the list of embeddings. x-order: 0 embedding: items: type: number type: array title: Embedding description: The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings). x-order: 1 object: type: string const: embedding title: Object description: The object type, which is always "embedding". x-order: 2 type: object required: - index - embedding - object title: Embedding description: 'Represents an embedding vector returned by embedding endpoint. Fields: - index (required): int - embedding (required): list[float] - object (required): Literal["embedding"]' Usage: properties: prompt_tokens: type: integer title: Prompt Tokens description: The number of tokens used by the prompt. x-order: 0 total_tokens: type: integer title: Total Tokens description: The total number of tokens used by the request. x-order: 1 type: object required: - prompt_tokens - total_tokens title: Usage description: 'The usage information for the request. Fields: - prompt_tokens (required): int - total_tokens (required): int' x-ddls-inline: true HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError EmbeddingRequest: properties: input: anyOf: - type: string - items: type: string type: array maxItems: 2048 minItems: 1 title: EmbeddingRequestInputArray - items: type: integer type: array maxItems: 2048 minItems: 1 title: EmbeddingRequestInputArray - items: items: type: integer type: array minItems: 1 title: EmbeddingRequestInputItemArray type: array maxItems: 2048 minItems: 1 title: EmbeddingRequestInputArray title: Input description: 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 all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request. x-order: 0 model: anyOf: - type: string - type: string enum: - text-embedding-ada-002 - text-embedding-3-small - text-embedding-3-large title: Model description: ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models) for descriptions of them. x-order: 1 encoding_format: type: string enum: - float - base64 title: Encoding Format description: The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/). default: float x-order: 2 dimensions: type: integer minimum: 1 title: Dimensions description: The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. x-order: 3 user: type: string title: User description: A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids). x-order: 4 type: object required: - input - model title: EmbeddingRequest description: 'Schema for EmbeddingRequest. Fields: - input (required): str | Annotated[list[str], MinLen(1), MaxLen(2048), ArrayTitle("EmbeddingRequestInputArray")] | Annotated[list[int], MinLen(1), MaxLen(2048), ArrayTitle("EmbeddingRequestInputArray")] | Annotated[list[Annotated[list[int], MinLen(1), ArrayTitle("EmbeddingRequestInputItemArray")]], MinLen(1), MaxLen(2048), ArrayTitle("EmbeddingRequestInputArray")] - model (required): str | Literal["text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large"] - encoding_format (optional): Literal["float", "base64"] - dimensions (optional): int - user (optional): str' ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError securitySchemes: Bearer: type: http scheme: bearer