Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions api-reference/chat/stream.mdx

This file was deleted.

92 changes: 1 addition & 91 deletions api-reference/openapi/research.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,50 +689,6 @@
}
}
},
"/api/chat": {
"post": {
"description": "Stream AI-powered chat responses using the Recoup chat system. This endpoint mirrors the request payload of the Chat Generate API but returns a streaming response compatible with the Vercel AI SDK `createUIMessageStreamResponse`. The stream emits UI message parts encoded as data chunks that can be parsed with `createUIMessageStreamParser`.",
"security": [
{
"apiKeyAuth": []
}
],
"requestBody": {
"description": "Chat stream request",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatStreamRequest"
}
}
}
},
"responses": {
"200": {
"description": "Streaming response with UI message parts. Events include: message-start (assistant begins message), message-delta (incremental updates), message-end (assistant finishes message), error (stream error), and metadata (usage data).",
"content": {
"text/event-stream": {
"schema": {
"type": "string",
"description": "Server-Sent Events stream containing UI message parts"
}
}
}
},
"400": {
"description": "Bad request - missing required parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatStreamErrorResponse"
}
}
}
}
}
}
},
"/api/chat/{chatId}/stop": {
"post": {
"description": "Stop the response currently being generated for a chat, freeing it to accept a new message. Idempotent — returns `stopped: false` when nothing is in progress. The chat must belong to the authenticated account.",
Expand Down Expand Up @@ -800,7 +756,7 @@
"/api/chat/workflow": {
"post": {
"summary": "Stream sandbox-driven chat (Vercel Workflow)",
"description": "Streams an agent loop running as a durable [Vercel Workflow](https://vercel.com/docs/workflow) against the session's sandbox. The agent uses sandbox-only tools (`bash`, `read`, `write`, `grep`, `glob`, `todo`, `task`, `ask_user_question`, `skill`, `fetch`) — no MCP or Composio. Requires a sandbox provisioned via [POST /api/sandbox](/api-reference/sandbox/create). Parallel to [POST /api/chat](/api-reference/chat/stream) — does not replace it.",
"description": "Streams an agent loop running as a durable [Vercel Workflow](https://vercel.com/docs/workflow) against the session's sandbox. The agent uses sandbox-only tools (`bash`, `read`, `write`, `grep`, `glob`, `todo`, `task`, `ask_user_question`, `skill`, `fetch`) — no MCP or Composio. Requires a sandbox provisioned via [POST /api/sandbox](/api-reference/sandbox/create).",
"security": [
{
"apiKeyAuth": []
Expand Down Expand Up @@ -3296,52 +3252,6 @@
}
}
},
"ChatStreamRequest": {
"type": "object",
"description": "Request body for chat streaming. Exactly one of 'prompt' or 'messages' must be provided.",
"properties": {
"prompt": {
"type": "string",
"description": "Single text prompt for the assistant. Required if 'messages' is not provided."
},
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UIMessage"
},
"description": "Array of UIMessage objects for context. Required if 'prompt' is not provided."
},
"artistId": {
"type": "string",
"format": "uuid",
"description": "The unique identifier of the artist (optional)"
},
"model": {
"type": "string",
"description": "The AI model to use for text generation (optional)",
"example": "openai/gpt-5-mini"
},
"excludeTools": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of tool names to exclude from execution",
"example": [
"create_scheduled_actions"
]
},
"roomId": {
"type": "string",
"format": "uuid",
"description": "UUID of the chat room. If not provided, one will be generated automatically."
},
"topic": {
"type": "string",
"description": "Topic name for the new chat room (e.g., 'Pulse Feb 2'). Only applies when creating a new room - ignored if room already exists. To edit the topic of an existing room, use [PATCH /api/chats](/api-reference/chat/update)."
}
}
},
"ChatWorkflowRequest": {
"type": "object",
"description": "Request body for the sandbox-driven, Workflow-backed chat endpoint. Requires an existing session, chat, and provisioned sandbox. The Bearer key from the `Authorization` header is forwarded into the sandbox for skill-based callbacks to the Recoup API — no separate access-token field needed.",
Expand Down
4 changes: 2 additions & 2 deletions credits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Some Recoup endpoints are billed in **credits** — primarily endpoints that hit
|--------|---------|-------|
| **Research** ([`/api/research/*`](/api-reference/research/search)) | Yes | Each successful call deducts credits. Costs vary by endpoint and parameters (e.g. [`enrich`](/api-reference/research/enrich) charges by processor tier; [`extract`](/api-reference/research/extract) charges by URL count). |
| **Content generation** ([`/api/image/generate`](/api-reference/image/generation)) | Yes | Image generation is priced per call. |
| **AI Chat — streaming** ([`POST /api/chat`](/api-reference/chat/stream)) | Yes | Variable cost based on model token usage, with a per-request minimum. |
| **AI Chat — streaming** ([`POST /api/chat/workflow`](/api-reference/chat/workflow)) | Yes | Variable cost based on model token usage, with a per-request minimum. |
| **Everything else** | Free at the API layer | [Artist CRUD](/api-reference/artists/list), [sandboxes](/api-reference/sandboxes/list), [sessions](/api-reference/sessions/get), [scheduled tasks](/api-reference/tasks/get), [social integrations](/api-reference/social/scrape), [account/org management](/api-reference/accounts/id), [agent signup](/api-reference/agents/signup), [Spotify proxies](/api-reference/spotify/search), etc. Subscription gating may still apply. |

Failed calls (4xx / 5xx) do **not** deduct credits. Deduction happens only after the upstream call succeeds.
Expand Down Expand Up @@ -175,7 +175,7 @@ Current as of this revision of the page. The authoritative source is the per-end

| Endpoint | Cost |
|----------|------|
| [`POST /api/chat`](/api-reference/chat/stream) (streaming) | ≥1 credit per turn — variable based on model token usage |
| [`POST /api/chat/workflow`](/api-reference/chat/workflow) (streaming) | ≥1 credit per turn — variable based on model token usage |
| [`GET /api/research/*`](/api-reference/research/search) (artist & non-artist research) | 5 credits per call |
| [`POST /api/research/people`](/api-reference/research/people) | 5 credits per call |
| [`POST /api/research/web`](/api-reference/research/web) | 5 credits per call |
Expand Down
1 change: 0 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"pages": [
"api-reference/chat/workflow",
"api-reference/chat/stop",
"api-reference/chat/stream",
"api-reference/chat/generate"
]
},
Expand Down