Discover/Pi API
live

Pi APIpi.ai ↗

Query Pi (by Inflection AI) via a single API endpoint. Get Pi's full text answer, message IDs, and timestamps for any free-text question up to 4000 characters.

Endpoint health
verified 1h ago
ask_question
1/1 passing latest checkself-healing
Endpoints
1
Updated
2h ago

What is the Pi API?

The Pi.ai API exposes 1 endpoint — ask_question — that sends any free-text question to Pi, Inflection's conversational AI, and returns 6 structured fields including Pi's complete answer text, a UTC timestamp, and conversation and message identifiers. Each call opens a fresh anonymous conversation, so there is no session state to manage between requests. Suitable for integrating Pi's conversational responses into pipelines, experiments, or applications.

This call costs2 credits / call— charged only on success
Try it
The question or message to send to Pi. Free text, 1-4000 characters after trimming whitespace.
→ api.parse.bot/scraper/a7c2d333-4228-4f13-a618-3d03bd1e670e/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/a7c2d333-4228-4f13-a618-3d03bd1e670e/ask_question?question=What+is+the+capital+of+France%3F' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace pi-ai-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Pi AI API — ask a question and inspect the typed answer."""
from parse_apis.pi_ai_api import PiAI, InputFormatInvalid

client = PiAI()

# Ask Pi a question and read typed fields from the response.
try:
    answer = client.answers.ask(question="What are three fun facts about octopuses?")
except InputFormatInvalid:
    print("Question was rejected — check that it is 1-4000 non-blank characters.")
else:
    print(answer.question)
    print(answer.answer)
    print("conversation:", answer.conversation_id)
    print("answered at:", answer.answered_at)

print("exercised: answers.ask")
All endpoints · 1 totalmissing one? ·

Sends one question to Pi in a brand-new anonymous conversation and returns Pi's complete answer as plain text once generation finishes. Each call is independent: no context carries over between calls, and the returned conversation_id and message ids are informational identifiers minted by the site for that exchange (they cannot be used to continue the conversation through this API). Two round trips per call; typical latency is a few seconds and grows with answer length. Answers may contain emoji and Markdown line breaks. A blank question is rejected with a 422 input error; questions are capped at 4000 characters.

Input
ParamTypeDescription
questionrequiredstringThe question or message to send to Pi. Free text, 1-4000 characters after trimming whitespace.
Response
{
  "type": "object",
  "fields": {
    "answer": "Pi's complete answer text, assembled from the streamed reply",
    "question": "the trimmed question text that was sent",
    "answered_at": "ISO 8601 UTC timestamp when Pi's reply was created",
    "conversation_id": "site identifier of the anonymous conversation created for this exchange",
    "answer_message_id": "site identifier of Pi's reply message",
    "question_message_id": "site identifier of the user's message"
  },
  "sample": {
    "data": {
      "answer": "The capital of France is Paris. 🇫🇷",
      "question": "What is the capital of France?",
      "answered_at": "2026-09-29T08:27:17.066Z",
      "conversation_id": "s9EpnDp3kmc7H2Mgqkwsq",
      "answer_message_id": "2tAFbcd8TaLLoxoVj11qg",
      "question_message_id": "L9BSc6SiPaZvbQmNx3kHB"
    },
    "status": "success"
  }
}

About the Pi API

What the API Returns

The ask_question endpoint accepts a question string (1–4000 characters after whitespace trimming) and returns Pi's complete reply once generation finishes. The primary payload field is answer, which contains Pi's full response as plain text. Alongside it, the response includes question (the trimmed input that was sent), answered_at (an ISO 8601 UTC timestamp marking when Pi's reply was created), and three identifier fields: conversation_id, answer_message_id, and question_message_id.

Conversation Scope and Statefulness

Every call to ask_question creates a new, independent anonymous conversation on Pi.ai. Context from a previous call does not carry over — there is no thread or session parameter. If your use case requires multi-turn dialogue, you would need to construct a self-contained question that includes any necessary context within the 4000-character limit of the question field.

Identifiers and Timestamps

The conversation_id, answer_message_id, and question_message_id fields are site-level identifiers for the exchange. They are informational: useful for logging, deduplication, or debugging, but they cannot be passed back into a subsequent call to resume the same conversation. The answered_at timestamp reflects when Pi's reply was produced, which can help with latency measurement or response logging.

Reliability & maintenanceVerified

The Pi API is a managed, monitored endpoint for pi.ai — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when pi.ai changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official pi.ai API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
1h ago
Latest check
1/1 endpoint passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Automated Q&A testing: send a fixed set of questions to Pi and log the answer and answered_at fields to track response changes over time.
  • Content drafting assistance: pipe a topic or prompt into question and collect Pi's reply text for editorial review workflows.
  • Chatbot fallback routing: forward unhandled user inputs to Pi via ask_question and surface the returned answer when no internal handler matches.
  • Research logging: capture conversation_id and answer_message_id alongside each query to maintain an auditable record of AI-generated responses.
  • Latency benchmarking: use the answered_at timestamp to measure response generation time across different question lengths and categories.
  • Educational tooling: build a study-aid interface that submits student questions and displays Pi's answer alongside the original question text.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Pi.ai have an official developer API?+
Inflection AI does not publicly document or offer a first-party developer API for Pi.ai as of mid-2025. There is no published REST endpoint, SDK, or API key program listed on pi.ai or inflection.ai.
What exactly does the `ask_question` endpoint return beyond the answer text?+
In addition to the answer field containing Pi's full reply, the endpoint returns the trimmed question string that was sent, an answered_at ISO 8601 UTC timestamp, and three identifiers: conversation_id, answer_message_id, and question_message_id. These identifiers are informational and cannot be used to continue a conversation in a subsequent call.
Can I send follow-up messages to continue a conversation across multiple API calls?+
Not currently. Each call to ask_question starts a fresh anonymous conversation, and no context from prior calls is retained. The API covers single-turn question-and-answer exchanges only. You can fork this API on Parse and revise it to add a multi-turn endpoint that accepts a conversation history or thread parameter.
Is there a limit to how long my question can be?+
The question input accepts free text between 1 and 4000 characters after whitespace trimming. Questions outside this range will be rejected at the API level before a request is made.
Does the API return Pi's response in any format other than plain text, such as markdown or structured JSON fields within the answer?+
The answer field is returned as plain text. Structured sub-fields within the answer body, voice output, or alternative format options are not currently exposed. You can fork this API on Parse and revise it to add post-processing or format-conversion logic to the returned answer text.
Page content last updated . Spec covers 1 endpoint from pi.ai.
Related APIs in OtherSee all →