API Docs for Vibe Developers

Authentication

Keep it simple - just use a bearer token for your vibe coding sessions:

Authorization: Bearer frugal-local-123

Endpoints

Health Check

GET /health

Quick health check - no auth needed, just vibes.

Optimize Prompt

POST /v1/optimize

The magic endpoint - turns your chaotic prompts into context-aware gold. Auth required.

Request Body

{ "seed": "Your vague prompt that needs some vibe context", "model": "gpt-4o" }

cURL Example

curl -X POST http://localhost:7331/v1/optimize \ -H "Authorization: Bearer frugal-local-123" \ -H "Content-Type: application/json" \ -d '{ "seed": "make my login page not suck", "model": "claude-3-5-sonnet-20241022" }'

Error Codes

Code Cause
400 Invalid request body or missing required fields
401 Missing or invalid bearer token
429 Rate limit exceeded
500 OpenAI API error or server issue

Vibe Check: Runs locally on port 7331 to keep your code private. The bearer token is just a placeholder - set your own in the .env file to match your vibe.