Official Python SDK for the InterpretAI public API.
Project description
interpretai
Official Python SDK for the InterpretAI public API.
This package wraps three feature surfaces — Match Reviewer, Spec Submittal Compliance Review,
Root Cause analysis (RCA), Models behind a resource-oriented client.
submit -> get -> wait shape.
API keys
For an API key please email ilian@interpretai.tech for early access.
Install
pip install interpretai
Quickstart
Hiring
import os
from interpretai import Client
from interpretai.types.public_reviewer import ReviewRequest, Subject
client = Client(api_key=os.environ["INTERPRETAI_API_KEY"])
job = client.public_reviewer.submit(ReviewRequest(
subjects=[
Subject(pdf="path/to/resume.pdf", label="candidate"),
Subject(text=[
"Company A: Working on Agentic AI for job matching",
"Looking for talented engineer with experience in the space",
],
pdf="path/to/relevant/job/description",
label="b"),
],
prompt="Is the candidate a good fit, why or why not?",
model_tier="tlarge",
))
result = client.public_reviewer.wait(job.job_id, timeout_s=1200)
print(result.score, result.reasoning)
Async
import asyncio
from interpretai import AsyncClient
from interpretai.types.public_reviewer import ReviewRequest, Subject
async def main() -> None:
async with AsyncClient() as client:
job = await client.public_reviewer.submit(ReviewRequest(
subjects=[Subject(text="..."), Subject(text="...")],
prompt="...",
model_tier="tlarge",
))
result = await client.public_reviewer.wait(job.job_id)
print(result.score)
asyncio.run(main())
Per-request overrides
fast = client.with_options(timeout=10.0, max_retries=0)
fast.public_reviewer.submit(...)
Configuration
The SDK reads two environment variables when the constructor parameters are not supplied:
INTERPRETAI_API_KEY— your API key (must start withiai_).INTERPRETAI_BASE_URL— base URL (defaults tohttps://stage-app.interpretai.tech).
Resources
| Resource | Methods |
|---|---|
client.auth |
me() |
client.public_reviewer |
submit(), get(job_id), wait(job_id, ...) |
client.ssc |
submit(), get(job_id), wait(job_id, ...) |
client.rca |
submit(), get(job_id), wait(job_id, ...) |
See the top-level SDK README for design notes and roadmap.
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file interpretai-0.1.2.tar.gz.
File metadata
- Download URL: interpretai-0.1.2.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f1b3140ae4bce8dfdaa4556e6f6153945509cf76831137a02a3507746b8f6e2
|
|
| MD5 |
141a88aebf02da4fbd8be541c3dbcc90
|
|
| BLAKE2b-256 |
495b871845853631808bfdb190a6afb4921152b4246feab0c6397ce8c8b29c14
|
File details
Details for the file interpretai-0.1.2-py3-none-any.whl.
File metadata
- Download URL: interpretai-0.1.2-py3-none-any.whl
- Upload date:
- Size: 47.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5dce2f4dd3b754a9091094039ba703062f01badbbd6ffdf15a6d4744399dde6
|
|
| MD5 |
2ae1a1f2362f9a037ce7c657782bc559
|
|
| BLAKE2b-256 |
fa7aafd2b922fab6de579dbaa470152a4fd9b870046c0be14409b4b3235dac72
|