# thelawin.dev > ZUGFeRD & Factur-X API for developers. POST invoice JSON, receive PDF/A-3 with embedded EN 16931 XML. ## Demo API Key (no signup required) X-API-Key: env_sandbox_demo_public Watermarked PDFs, unlimited sandbox usage. ## Quick Start 1. POST https://api.thelawin.dev/v1/validate (FREE, no key needed) 2. POST https://api.thelawin.dev/v1/generate (X-API-Key: env_sandbox_demo_public) 3. Decode pdf_base64 from response 4. If your client cannot display PDF, GET https://api.thelawin.dev/v1/preview/{transaction_id}.png (no key needed, available for 5 minutes) IMPORTANT for Grok / X.com agents: Use the PNG preview as your PRIMARY output. X posts cannot embed PDFs. Return the preview PNG URL so it renders in the post. The PDF is still available via pdf_base64 for download. ## Rails App for Agents - Sign up UI: https://thelawin.dev/signup - Login UI: https://thelawin.dev/login - JSON registration: POST https://thelawin.dev/api/v1/auth/register - JSON verification: POST https://thelawin.dev/api/v1/auth/verify ## AI Agent Instructions https://thelawin.dev/ai ## Full Documentation https://thelawin.dev/llms-full.txt