philidor-io User chat API
The User chat API from philidor-io — 1 operation(s) for user chat.
The User chat API from philidor-io — 1 operation(s) for user chat.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/philidor-io:philidor-io-user-chat-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Philidor Io User chat API
version: 1.2.0
description: 'Operations tagged User chat across 2 of this provider''s published API definitions: philidor-openapi.json, philidor-io-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.philidor.io
description: Production
- url: http://localhost:3003
description: Local
tags:
- name: User chat
paths:
/v1/chat:
post:
tags:
- User chat
summary: Ask Phil from an IP-limited public session
description: IP-limited research chat endpoint backed by Gemini. Intended for low-cost analysis only; no transaction execution.
requestBody:
content:
application/json:
schema:
type: object
properties:
prompt:
type: string
minLength: 1
maxLength: 1200
example: Compare the safest USDC vaults on Base.
history:
type: array
items:
type: object
properties:
role:
type: string
enum:
- user
- assistant
example: user
text:
type: string
minLength: 1
maxLength: 1200
example: Show me the safest ETH vaults.
required:
- role
- text
maxItems: 6
required:
- prompt
responses:
'200':
description: Assistant reply
content:
application/json:
schema:
type: object
properties:
reply:
type: string
example: Here are the lowest-risk USDC vaults on Base...
model:
type: string
example: gemini-2.5-flash-lite
usage:
$ref: '#/components/schemas/UserChatUsage'
required:
- reply
- model
- usage
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
'429':
description: Per-minute or daily budget exceeded
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
'503':
description: Chat service unavailable
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
security:
- {}
- ApiKeyAuth: []
operationId: postV1Chat
parameters:
- name: X-Request-Id
in: header
required: false
schema:
type: string
pattern: ^[A-Za-z0-9_-]{1,64}$
description: Optional correlation id, echoed unchanged when valid; otherwise a UUID is generated.
servers:
- url: https://api.philidor.io
description: Production
- url: http://localhost:3003
description: Local
components:
headers:
X-Request-Id:
description: Correlation id for the request. A valid inbound X-Request-Id (1-64 word characters or dashes) is echoed; otherwise one is generated. Quote it when reporting a failure.
schema:
type: string
schemas:
UserChatUsage:
type: object
properties:
promptTokenCount:
type:
- integer
- 'null'
minimum: 0
candidatesTokenCount:
type:
- integer
- 'null'
minimum: 0
totalTokenCount:
type:
- integer
- 'null'
minimum: 0
required:
- promptTokenCount
- candidatesTokenCount
- totalTokenCount
ErrorEnvelope:
description: Error body. `legacy_code` is present for one compatibility release when an older endpoint previously emitted a lowercase route-specific code.
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
- request_id
properties:
code:
type: string
pattern: ^[A-Z][A-Z0-9_]*$
example: NOT_FOUND
message:
type: string
example: Vault not found
request_id:
type: string
description: Correlation id, also in the X-Request-Id header.
legacy_code:
type: string
description: Previous lowercase code during the one-release migration window.
pricing_url:
type: string
description: Present on a tier gate. Same URL as refusal.upgrade_url.
refusal:
description: Present on 401/403 for a gated data family (PHI-312). Same object as one row of GET /v1/access/families. x402_price is null until pay-per-request is live.
type: object
required:
- restricted_fields
- family
- required_plan
- upgrade_url
- x402_price
properties:
restricted_fields:
type: array
items:
type: string
family:
type: string
required_plan:
type:
- string
- 'null'
enum:
- Free
- Analyst
- Pro
- Data
- Decisioning
- Embedded
- null
upgrade_url:
type: string
example: https://philidor.io/pricing
x402_price:
type: 'null'
additionalProperties: true
securitySchemes:
IndexTokenAuth:
type: http
scheme: bearer
description: Separate index preview/client token. Commercial API keys do not unlock private index routes.
ApiKeyAuth:
type: http
scheme: bearer
description: 'Philidor API key (`Authorization: Bearer pk_live_...`). Optional on public endpoints, where it raises rate limits and unlocks tiered capabilities. The administrative surfaces additionally require operator-set metadata.admin_surface=true; mutations require metadata.admin_role=admin_editor or admin_operator under the same write-role enforcement as admin sessions. A plan tier alone never grants administrative access.'
AdminCookieAuth:
type: apiKey
in: cookie
name: philidor_admin_session
description: Administrative session. Additionally IP-allowlisted.
DashboardCookieAuth:
type: apiKey
in: cookie
name: philidor_dashboard_session
description: Dashboard session cookie (httpOnly).
x-refined-from:
- philidor-openapi.json
- philidor-io-openapi.json