Troubleshooting
Common issues and solutions.Repair Failed
Input Not Valid JSON
Symptom:- LLM output is not JSON at all
- Input is completely malformed
- Check LLM prompt includes “output JSON”
- Use JSON mode if available (OpenAI, Anthropic)
- Add example JSON in prompt
Schema Validation Failed
Symptom:- Repaired JSON doesn’t match schema
- Required field missing
- Type coercion failed
- Review
metadata.errorsfor specific field - Check schema matches expected LLM output
- Use lenient mode during development
- Add field to schema or make it optional
Low Confidence
Symptom:- Ambiguous repairs
- Multiple possible fixes
- Risky type coercion
- Review
metadata.repairs_applied - Check
metadata.warnings - Improve LLM prompt for clearer output
- Add schema for type guidance
Rate Limit Exceeded
Symptom:- Upgrade to Pro or Team tier
- Wait until next month (limits reset monthly)
- Cache repaired results to reduce requests
Session Not Found
Symptom:- Session expired (60s TTL)
- Invalid session ID
- Session already finalized
- Create new session with
/v1/repair/stream/start - Reduce time between chunks
- Don’t reuse session IDs
Buffer Size Exceeded
Symptom:- LLM hallucination loop
- Extremely large output
- Attack attempt
- Add
max_tokenslimit to LLM - Monitor LLM output length
- Use batch repair for large outputs
Payload Too Large
Symptom:- Use streaming repair for large outputs
- Split input into smaller chunks
- Reduce LLM
max_tokens
Invalid API Key
Symptom:- Check API key format:
sk_live_xxxxx - Verify key in console
- Generate new key if revoked
- Check
Authorizationheader format:Bearer sk_live_xxxxx
Slow Response Times
Symptom: Requests taking>100ms
Causes:
- Large input size
- Complex schema validation
- Network latency
- Use streaming repair for real-time processing
- Simplify schema (remove unnecessary fields)
- Use CDN or edge deployment
- Check network latency to
api.shim.so
Type Coercion Not Working
Symptom:"30" not coerced to 30
Causes:
- No schema provided
- Field not in schema properties
- Add schema with correct types
- Include field in schema properties
Extra Fields Removed
Symptom: Fields missing from repaired output Causes:- Strict mode enabled (default)
- Field not in schema
- Use lenient mode:
{ mode: 'lenient' } - Add field to schema
- Check
metadata.warningsfor removed fields
Getting Help
Still stuck?- Check error code: See Error Codes
- Review metadata: Look at
repairs_applied,warnings,errors - Test with cURL: Isolate SDK vs API issues
- Contact support: Include
X-Request-IDheader value
Debug Checklist
Next Steps
Error Codes
Complete error reference
Response Object
Understand metadata fields
Schema Validation
Fix validation issues
Contact Support
Get help from the team
