# Gemini Embedding 001 - Core.Today AI API > Google's text embedding model for generating vector representations. Optimized for semantic search, clustering, and similarity tasks. - **Provider**: Google - **Model ID**: gemini-embedding-001 - **Category**: LLM - **Credits**: 0.1 per 1K tokens - **Speed**: Fast - **Quality**: High ## Model Specifications - **Context Window**: 2K tokens - **Max Output**: 0K tokens - **Training Cutoff**: August 2024 - **Supported Formats**: text - **Compatible SDK**: Google AI ### Token Pricing (per 1M tokens) - **Input Tokens**: 300 credits ($0.20) - **Output Tokens**: 0 credits ($0.00) ## Features - High-quality text embeddings - 2,048 token max input per request - Output dimensions: 128–3,072 (default 3,072; recommended 768 / 1,536 / 3,072) - Matryoshka Representation Learning (MRL) for flexible dimensionality - 8 task types: SEMANTIC_SIMILARITY, CLASSIFICATION, CLUSTERING, RETRIEVAL_DOCUMENT, RETRIEVAL_QUERY, CODE_RETRIEVAL_QUERY, QUESTION_ANSWERING, FACT_VERIFICATION - Optimized for semantic search, clustering, classification, and RAG ## Use Cases - Semantic search - Document clustering - Similarity matching - Recommendation systems - RAG (Retrieval-Augmented Generation) ## API Endpoint Base URL: https://api.core.today Endpoint: POST /llm/gemini/v1beta/openai/embeddings ## Authentication Header: Authorization: Bearer YOUR_API_KEY Note: LLM endpoints use OpenAI-compatible format with Authorization Bearer token. ## Input Parameters ### Required - **input**: string | array - Text or array of texts to embed. Max 2,048 input tokens per item. - **model**: string (default: gemini-embedding-001) - Model identifier. ### Optional - **dimensions**: integer (default: 3072) - Output embedding dimensionality. Range: 128–3,072. Recommended: 768, 1,536, 3,072. Manual L2 normalization required for non-3,072 dimensions. - **task_type**: string - Optimize embedding for a downstream task. One of: SEMANTIC_SIMILARITY, CLASSIFICATION, CLUSTERING, RETRIEVAL_DOCUMENT, RETRIEVAL_QUERY, CODE_RETRIEVAL_QUERY, QUESTION_ANSWERING, FACT_VERIFICATION. Options: SEMANTIC_SIMILARITY, CLASSIFICATION, CLUSTERING, RETRIEVAL_DOCUMENT, RETRIEVAL_QUERY, CODE_RETRIEVAL_QUERY, QUESTION_ANSWERING, FACT_VERIFICATION ## Examples ### Text Embedding Generate embeddings for semantic search ```json { "model": "gemini-embedding-001", "input": "What is the meaning of life?" } ``` ## Response Format ```json { "id": "chatcmpl-abc123", "object": "chat.completion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Response text here" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 100, "completion_tokens": 50, "total_tokens": 150 } } ``` ## Tips - Max input: 2,048 tokens per item — split long documents into chunks first - Default output: 3,072 dimensions; use 768 or 1,536 to reduce storage/cost via MRL - Set `task_type` to match your use case (e.g., RETRIEVAL_DOCUMENT for indexing, RETRIEVAL_QUERY for queries) - Manually L2-normalize embeddings if you request a non-3,072 dimensionality - Combine with vector databases for RAG pipelines - Batch multiple texts in a single request for efficiency ## Documentation https://ai.google.dev/gemini-api/docs/embeddings