--- title: SPECTER2 Embedding API emoji: 📚 colorFrom: blue colorTo: purple sdk: docker app_port: 7860 --- # SPECTER2 Embedding API Academic paper embeddings using SPECTER2 with proximity adapter. ## Model Details - **Model**: `allenai/specter2_base` + `allenai/specter2` (proximity adapter) - **Dimensions**: 768 - **Best for**: Similarity search, retrieval, paper recommendation ## API Endpoints ### `GET /` Health check - returns model info ### `POST /embed` Single text embedding ```json {"text": "Your paper title and abstract"} ``` ### `POST /batch_embed` Batch embeddings (max 100) ```json {"texts": ["Paper 1...", "Paper 2..."]} ``` ## Response Format ```json { "embedding": [0.123, -0.456, ...], "dimensions": 768 } ```