Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
yoanbernabeu avatar

Grepai Embeddings Openai

  • 510 installs
  • 18 repo stars
  • Updated February 1, 2026
  • yoanbernabeu/grepai-skills

grepai-embeddings-openai is a Claude Code skill that configures OpenAI as GrepAI's embedding provider so developers get cloud-quality semantic vectors without running a local embed server.

About

grepai-embeddings-openai is a configuration skill for GrepAI that routes embedding generation through OpenAI's API instead of a self-hosted model. Developers use it when they want state-of-the-art vector quality, fast indexing without local GPU compute, and scalable search across large repositories. The skill documents trade-offs—privacy versus convenience—and when a shared team setup beats local inference. Reach for grepai-embeddings-openai when GrepAI is already in your workflow but local embeddings are too slow, too weak, or too costly to maintain.

  • OpenAI embedder block for .grepai/config.yaml with env-based API key
  • Models such as text-embedding-3-small with optional parallelism for concurrent requests
  • Documents quality, speed, scalability vs privacy, cost, and internet dependency
  • Team-friendly shared infrastructure without local embedding compute
  • Prerequisites: OpenAI API key and billing-enabled account

Grepai Embeddings Openai by the numbers

  • 510 all-time installs (skills.sh)
  • +4 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #1,753 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-embeddings-openai

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs510
repo stars18
Security audit3 / 3 scanners passed
Last updatedFebruary 1, 2026
Repositoryyoanbernabeu/grepai-skills

How do you configure GrepAI with OpenAI embeddings?

Point GrepAI at OpenAI embeddings when you want cloud-quality vectors without running a local embed server.

Who is it for?

Developers running GrepAI semantic search who prefer managed OpenAI embeddings over operating a local embed server.

Skip if: Teams that require fully offline or air-gapped embedding pipelines where API keys and outbound network calls are prohibited.

When should I use this skill?

A developer asks to point GrepAI at OpenAI, switch from local to cloud embeddings, or improve semantic search vector quality.

What you get

GrepAI config pointing at OpenAI embeddings, cloud vector index, and documented quality-versus-privacy trade-offs.

  • GrepAI OpenAI embedding configuration
  • Provider trade-off notes

Files

SKILL.mdMarkdownGitHub ↗

GrepAI Embeddings with OpenAI

This skill covers using OpenAI's embedding API with GrepAI for high-quality, cloud-based embeddings.

When to Use This Skill

  • Need highest quality embeddings
  • Team environment with shared infrastructure
  • Don't want to manage local embedding server
  • Willing to trade privacy for quality/convenience

Considerations

AspectDetails
QualityState-of-the-art embeddings
SpeedFast, no local compute needed
ScalabilityHandles any codebase size
⚠️ PrivacyCode sent to OpenAI servers
⚠️ CostPay per token
⚠️ InternetRequires connection

Prerequisites

1. OpenAI API key 2. Billing enabled on OpenAI account

Get your API key at: https://platform.openai.com/api-keys

Configuration

Basic Configuration

# .grepai/config.yaml
embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: ${OPENAI_API_KEY}

Set the environment variable:

export OPENAI_API_KEY="sk-..."

With Parallel Processing

embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: ${OPENAI_API_KEY}
  parallelism: 8  # Concurrent requests for speed

Direct API Key (Not Recommended)

embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: sk-your-api-key-here  # Avoid committing secrets!

Warning: Never commit API keys to version control.

Available Models

text-embedding-3-small (Recommended)

PropertyValue
Dimensions1536
Price$0.00002 / 1K tokens
QualityVery high
SpeedFast

Best for: Most use cases, good balance of cost/quality.

embedder:
  provider: openai
  model: text-embedding-3-small

text-embedding-3-large

PropertyValue
Dimensions3072
Price$0.00013 / 1K tokens
QualityHighest
SpeedFast

Best for: Maximum accuracy, cost not a concern.

embedder:
  provider: openai
  model: text-embedding-3-large
  dimensions: 3072

Dimension Reduction

You can reduce dimensions to save storage:

embedder:
  provider: openai
  model: text-embedding-3-large
  dimensions: 1024  # Reduced from 3072

Model Comparison

ModelDimensionsCost/1K tokensQuality
text-embedding-3-small1536$0.00002⭐⭐⭐⭐
text-embedding-3-large3072$0.00013⭐⭐⭐⭐⭐

Cost Estimation

Approximate costs per 1000 source files:

Codebase SizeChunksSmall ModelLarge Model
Small (100 files)~500$0.01$0.06
Medium (1000 files)~5,000$0.10$0.65
Large (10000 files)~50,000$1.00$6.50

Note: Costs are one-time for initial indexing. Updates only re-embed changed files.

Optimizing for Speed

Parallel Requests

GrepAI v0.24.0+ supports adaptive rate limiting and parallel requests:

embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: ${OPENAI_API_KEY}
  parallelism: 8  # Adjust based on your rate limit tier

Parallelism recommendations:

  • Tier 1 (Free): 1-2
  • Tier 2: 4-8
  • Tier 3+: 8-16

Batching

GrepAI automatically batches chunks for efficient API usage.

Rate Limits

OpenAI has rate limits based on your account tier:

TierRPMTPM
Free3150,000
Tier 15001,000,000
Tier 25,0005,000,000

GrepAI handles rate limiting automatically with adaptive backoff.

Environment Variables

Setting the API Key

macOS/Linux:

# In ~/.bashrc, ~/.zshrc, or ~/.profile
export OPENAI_API_KEY="sk-..."

Windows (PowerShell):

$env:OPENAI_API_KEY = "sk-..."
# Or permanently
[System.Environment]::SetEnvironmentVariable('OPENAI_API_KEY', 'sk-...', 'User')

Using .env Files

Create .env in your project root:

OPENAI_API_KEY=sk-...

Add to .gitignore:

.env

Azure OpenAI

For Azure-hosted OpenAI:

embedder:
  provider: openai
  model: your-deployment-name
  api_key: ${AZURE_OPENAI_API_KEY}
  endpoint: https://your-resource.openai.azure.com

Security Best Practices

1. Use environment variables: Never hardcode API keys 2. Add to .gitignore: Exclude .env files 3. Rotate keys: Regularly rotate API keys 4. Monitor usage: Check OpenAI dashboard for unexpected usage 5. Review code: Ensure sensitive code isn't being indexed

Common Issues

Problem: 401 UnauthorizedSolution: Check API key is correct and environment variable is set:

echo $OPENAI_API_KEY

Problem: 429 Rate limit exceededSolution: Reduce parallelism or upgrade OpenAI tier:

embedder:
  parallelism: 2  # Lower value

Problem: High costs ✅ Solutions:

  • Use text-embedding-3-small instead of large
  • Reduce dimension size
  • Add more ignore patterns to reduce indexed files

Problem: Slow indexing ✅ Solution: Increase parallelism:

embedder:
  parallelism: 8

Problem: Privacy concerns ✅ Solution: Use Ollama for local embeddings instead

Migrating from Ollama to OpenAI

1. Update configuration:

embedder:
  provider: openai
  model: text-embedding-3-small
  api_key: ${OPENAI_API_KEY}

2. Delete existing index:

rm .grepai/index.gob

3. Re-index:

grepai watch

Important: You cannot mix embeddings from different models/providers.

Output Format

Successful OpenAI configuration:

✅ OpenAI Embedding Provider Configured

   Provider: OpenAI
   Model: text-embedding-3-small
   Dimensions: 1536
   Parallelism: 4
   API Key: sk-...xxxx (from environment)

   Estimated cost for this codebase:
   - Files: 245
   - Chunks: ~1,200
   - Cost: ~$0.02

   Note: Code will be sent to OpenAI servers.

Related skills

How it compares

Choose grepai-embeddings-openai over local GrepAI embed setups when vector quality and zero local ops matter more than keeping all code embeddings on-premises.

FAQ

When should GrepAI use OpenAI embeddings?

grepai-embeddings-openai recommends OpenAI when developers need highest-quality vectors, fast indexing without local compute, and scalable search across large codebases. The skill notes this trades privacy for convenience versus self-hosted embed servers.

Does grepai-embeddings-openai require a local embed server?

grepai-embeddings-openai configures cloud-based OpenAI embeddings so GrepAI does not need a local embedding server. Indexing runs through the OpenAI API, removing local GPU or CPU embed infrastructure.

Is Grepai Embeddings Openai safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingautomationllm

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.