Skip to main content
The PartnerOS AI API exposes the same generation pipelines that power the strategy wizard and partner intelligence features in the web application. You can generate and stream an Ideal Customer Profile (ICP), an Ideal Partner Profile (IPP), partner type recommendations grounded in your knowledge base, and executive summary reports for your entire partner ecosystem. A conversational chat endpoint lets you build assistants that answer questions in the context of your PartnerOS data. Most AI endpoints stream their responses as plain text in the AI SDK streaming protocol. A few endpoints return non-streaming JSON or use Server-Sent Events. Each endpoint is marked clearly below. All endpoints require authentication and are subject to your organization’s AI quota.
AI generation endpoints are quota-gated. If your organization has exhausted its AI quota, requests return 402 Payment Required. Contact PartnerOS support to review your plan.

Generate an ICP (streaming)

Generates an Ideal Customer Profile for a company domain. The response is a streaming plain-text payload. Parse the stream incrementally to display results as they arrive. POST /api/ai/icp

Body parameters

string
required
Company name or domain to generate an ICP for (e.g. "acmecorp.com" or "Acme Corp"). Must be a non-empty string.

Streaming response

The response body is a streamed plain-text payload. Consume it with the @ai-sdk/react useObject hook or by reading the response body as a stream and parsing each line. The fully assembled payload is a JSON object matching the ICPResult schema:
string
Target customer industry vertical.
string[]
Sub-verticals within the industry.
string
Target company size range (e.g. "100-500 employees").
string
Target company revenue range.
string[]
Target geographic markets.
string[]
Business goals of the ideal customer.
string[]
Business implications of not solving the problem.
string[]
Signals that indicate a company is ready to buy.
string[]
Technologies commonly used by the ideal customer.
string[]
Key pain points the ideal customer experiences.
object[]
Array of buying personas within the target company. Each object has a role (job title) and description (goals and concerns).

Example

The ICP generation result is cached by domain for the duration of a session. Repeated calls with the same domain value return a cached stream, avoiding redundant LLM calls.

Generate an IPP (streaming)

Generates an Ideal Partner Profile based on a previously generated ICP. The IPP describes the characteristics of partner organizations best positioned to co-sell, co-market, or deliver services to your ideal customer. The response streams in the AI SDK text stream format. POST /api/ai/ipp

Body parameters

object
required
A complete ICPResult object. Pass the assembled ICP output from POST /api/ai/icp directly.
string
Your company’s domain. When omitted, the server derives the domain from your session email address.

Streaming response

The streamed payload assembles to an IPPResult JSON object:
string[]
Recommended partner type categories (e.g. "System Integrators", "ISVs").
string[]
Customer segments the ideal partner typically serves.
string[]
Industry verticals the ideal partner operates in.
string[]
Geographic markets where the ideal partner has reach.
string[]
Technical skills or platform expertise the partner should have.
string[]
What the ideal partner is trying to achieve through the partnership.

Example


Generate partner type recommendations (streaming)

Generates scored partner type recommendations grounded in your organization’s ICP, IPP, and knowledge base. The ICP and IPP must exist in your organization’s strategy cache (generated during onboarding or regenerated via the strategy section). Returns a text stream that assembles to a PartnerTypeResult JSON object. POST /api/ai/strategy/partner-types

Body parameters

string
default:"production"
Knowledge base namespace to use for retrieval grounding. Use "staging" for non-production testing.

Streaming response

object[]
required
Array of scored partner type recommendations, ordered by score descending.

Example

This endpoint returns 422 Unprocessable Entity if no ICP or IPP is found for your organization. Complete the strategy onboarding in the PartnerOS web app first.

Generate partner suggestions (streaming)

Generates partner company suggestions grounded in your knowledge base, tailored to a specific prospect’s company name, industry, and pain points. Useful for building “recommended partners” features or prospect-facing match tools. POST /api/ai/partner-suggestions

Body parameters

string
Name of the prospect company you are seeking partners for.
string
Industry of the prospect company.
string[]
Array of known pain points the prospect is experiencing.
string
default:"production"
Knowledge base namespace. Use "staging" for non-production environments.

Streaming response

The streamed plain-text payload assembles to a JSON array of partner suggestion objects. Each object describes a recommended partner type and rationale grounded in your knowledge base content.

Example


Generate an executive summary (async)

Enqueues an AI-generated executive summary or review report for your partner ecosystem. The report is generated asynchronously by a background worker. This endpoint returns immediately with a reportId and HTTP 202 so you can begin polling the SSE stream for progress. POST /api/ai/strategy/executive-summary/generate

Body parameters

string
required
Your organization’s display name, used in the generated report.
string
required
Your organization’s domain, used for context grounding.
string
default:"executive-summary"
Type of report to generate. One of "executive-summary", "annual-review", or "quarterly-review".
object
Optional partner filter criteria to scope the report to a subset of your partner ecosystem.
string
Optional fingerprint string identifying the filter combination. Used for deduplication.

Response fields

string
required
UUID of the executive summary report row. Use this with the SSE stream endpoint to monitor progress.
string
Background job ID. May be null if a generation job was already in flight.
string
required
Initial status: "running" when enqueued, or "running" with inFlight: true when an existing job was already active.
boolean
true when an existing in-flight job was returned rather than a new one being enqueued. The reportId in this case is the active job’s report.

Example


Stream executive summary progress (SSE)

Opens a Server-Sent Events stream that pushes real-time progress updates as the executive summary report is generated section by section. Connect to this endpoint immediately after receiving a reportId from the generate endpoint. GET /api/ai/strategy/executive-summary/stream

Query parameters

string
required
UUID of the executive summary report to stream, as returned by the generate endpoint.

SSE events

Example

The stream has a 5-minute hard timeout. If the background worker takes longer than 5 minutes (due to retries or queue delays), the stream emits job.failed with errorMessage: "stream-timeout". The worker may still complete in the background — check the report’s status after a short wait.

Chat with Nelson (streaming)

Sends a multi-turn conversation to Nelson, PartnerOS’s AI assistant, and streams the response in the UI message stream protocol. This format is compatible with the @ai-sdk/react useChat hook for building in-app chat interfaces. POST /api/ai/chat

Body parameters

object[]
required
Array of conversation messages. Must contain at least one message.
string
The user’s current app route (e.g. "/partners"). Nelson uses this to provide context-aware answers when the user refers to “this page” or “where I am”.

Streaming response

The response body uses the UI message stream protocol. Consume it with useChat from @ai-sdk/react, or parse the stream manually using the standard data stream part format.
This endpoint uses the UI message stream protocol, not the plain text stream protocol. Do not attempt to parse it as raw JSON. If you are building a custom client, use the @ai-sdk/react useChat hook or parse each SSE data line according to the data stream part format.

Example