Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Phonic
✓ from phonic import Phonic
✗ import phonic
Direct import of module fails; import class explicitly.
EvaluationLog
✓ from phonic import EvaluationLog
✗ from phonic.evaluations import EvaluationLog
Path changed in recent versions; now top-level.
Initialize client with API key from env var and log an evaluation.
from phonic import Phonic
client = Phonic(api_key=os.environ.get('PHONIC_API_KEY', ''))
# Log an evaluation
client.log_evaluation(
project_name='my-project',
input='What is the capital of France?',
output='Paris',
expected='Paris',
scores={'accuracy': 1.0}
)
phonic --version
Debug
Known issues
breakingThe 'Phonic' class replaced 'Client' in v0.30.0; 'Client' is removed.fixReplace 'from phonic import Client' with 'from phonic import Phonic'.
affects: <0.30.0
deprecatedArgument 'correct' in log_evaluation is deprecated; use 'expected' instead.fixReplace 'correct=...' with 'expected=...'.
affects: >=0.28.0,<0.32.0
gotchaAPI key must be passed as string; environment variable 'PHONIC_API_KEY' is not automatically read by client init. Use os.environ.get() explicitly.fixclient = Phonic(api_key=os.environ.get('PHONIC_API_KEY', '')) affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'Phonic' from 'phonic'
Old installation or wrong import path; class name changed from 'Client' to 'Phonic'.
fixRun 'pip install --upgrade phonic' and use 'from phonic import Phonic'.
AttributeError: module 'phonic' has no attribute 'Client'
Using deprecated class name 'Client' which was removed in v0.30.0.
fixUse 'from phonic import Phonic' and instantiate 'Phonic(api_key=...)'.
TypeError: log_evaluation() got an unexpected keyword argument 'correct'
Parameter 'correct' was renamed to 'expected' in recent versions.
fixReplace keyword argument 'correct' with 'expected'.
Upgrade
Version history
0.31.15latest on PyPI · released Apr 29, 2026
Audit
Dependencies
numpyrequiredCore dependency for data handling; downgrade in v0.31.15 may cause conflicts if newer numpy is required by other packages.