Authentication
string
required
Bearer sk-pro-xxxx (API Key) or Bearer <access_token> (OAuth)string
Required on API-key calls. A stable terminal-user id that isolates sessions, files, and memory. Omitting it returns 400, starting with
Missing required header: X-Profy-End-User-Id. OAuth calls do not send it. Billing still charges the key owner.Request Body
Persona, subagents, and delegation partners default to the Expert configured in Studio.profy-skills is not loaded on its own. This endpoint does not accept instructions.
string | object
required
Expert id. The shortest form is a string. The object form uses
id for the same expert and may include model and tools.
model is the model id only. tools is only this run’s extension set, not the whole toolbox. Omit it and those extensions stay off, while web_search and web_fetch stay on. Pass an array and only the listed types are on; an empty array also turns web_search and web_fetch off. Every entry is {"type": ...}. A bare string is rejected. Allowed type values: imagegen, video, music, audio, generate_3d, postprocess_3d, generate_world, schedule, knowledge, obsidian_knowledge, memory, delegation, distill, evolution, web_search, web_fetch, mcp. mcp requires server_label and transport with type: "http" plus server_url. That entry adds one HTTP server for this run and does not remove MCP already stored on the expert. read, bash, and skill stay either way. Plugins are environment.plugins, not this list.
Top-level expert_identifier is an alias of agent.id and wins when both are set. Top-level model is an alias of agent.model; the value inside agent wins.
When rules is present it replaces this run’s identity, soul, agent, and guard. Omit it to keep the Studio text. An empty array clears those rules for this run. type is one of those four, and each type appears at most once.
When subagents is present it replaces this run’s roster and turns spawning on. Omit it to keep the Expert roster, which still follows the key owner’s multi-task switch. Each agents entry needs name, description, system_prompt, and tools. model is optional.
When expert_partner is present it replaces this run’s delegation roster. Omit it to keep the platform roster built from the whitelist and @-mentions. An empty array means this run delegates to nobody. Each entry requires identifier. Optional: name, brief (or description), needs_sandbox, mentioned. Listing an expert does not grant access; the delegate call still checks that you can use it.object
Optional.
type is profy_hosted (platform sandbox), self_hosted (the caller’s desktop), or none (no shell).
Omitted means profy_hosted. Any other value, including openai_hosted, returns 400.
Each skills entry is {"type":"built_in","name":"docx"} or {"type":"customize","name":"..."}.
profy-skills loads only when this array names it. A built_in entry loads that one skill from the pack. name: "*" loads the whole pack. Omit skills and this run has no product skill pack.
customize reads a same-named skill from the key owner’s or the expert’s library on profy_hosted, and ~/.agents/skills/<name>/SKILL.md on self_hosted.
Without this field, user, expert, and workspace skills still appear in discovery. An expert skill marked builtin pack or auto-evolution includes its full text. Other library skills include full text only when named here as customize, or through skill_names.
Each plugins entry is {"type":"built_in","id":"profy-sites"} and selects an installed plugin.
capability_directories is only for self_hosted. Entries are local directories and must not contain ...string | array
required
What to send the Expert. A string, or an array of
{ role, content } messages. Missing input returns Missing required field: input. message remains an alias.boolean
Must be
true or omitted. false returns 400. This endpoint is SSE only.string
Session ID for multi-turn conversations. Not required for the first call — a new session_id is returned in the
X-Session-Id response header.string[]
File ids to attach, up to 20. Ids come from Upload File.
The platform materializes each file in this session’s directory (
/home/user/workspace/<expert_identifier>/<session_id>/), where the Expert can read / grep it.Ids only, never URLs: the platform will not fetch a link you hand it, so you never have to publish a readable link to a private document.object[]
HITL resume. When non-empty,
input may be omitted. session_id must be the turn that emitted approval.required.
Each entry requires tool_call_id, tool_name, and decision. Put an Ask answer in modified_parameters.result. Optional: result, original_parameters, rejection_reason, is_error. camelCase (toolCallId and the rest) is accepted.Request Examples
Response Format
The response is an SSE (Server-Sent Events) stream with hierarchical dot-notation event names (aligned with the OpenAI Responses API). The response headers includeX-Session-Id for subsequent multi-turn conversations.
SSE Event Types
Everydata payload carries a monotonic event_id and a type that matches the event: line. Text and thinking rename the internal content field to delta. The full vocabulary is on SSE Events. Unmapped internal events keep their original type.
Lifecycle Events
Output Events
Tool Call Events
Usage Events
Streaming Examples
Billing
Billed by token usage (billing unittoken_split). Credits are deducted from the account that owns the API Key, not from the end user named in X-Profy-End-User-Id — that header only scopes sessions and attributes usage; it is not a billing subject.
Formula: ceil(input_tokens × input_rate ÷ 1e6) + ceil(output_tokens × output_rate ÷ 1e6) (input and output are rounded up separately, then summed). Per-model rates are operational data, so read the current values from the model selector or the model list endpoint; the algorithm is fixed and documented in Billing Formulas.
Read actual consumption for a call from the usage.token event — that is the authoritative value. Do not estimate with your own tokenizer and treat the result as a bill.
Error Codes
Next Steps
Upload File
Give the Expert a document to read
Chat Completions
OpenAI-compatible chat completions endpoint
Python SDK
Complete Python SDK guide

