{"openapi":"3.0.3","info":{"title":"Dream public APIs","version":"1.0.0","description":"Search Dream's public website with NLWeb, or connect an OAuth-capable MCP client to Dream Workforce."},"servers":[{"url":"https://usedream.ai"}],"externalDocs":{"url":"https://usedream.ai/docs"},"paths":{"/ask":{"get":{"operationId":"searchDreamWebsite","description":"Search Dream's public website for pages matching a question. No authentication is required.","security":[],"parameters":[{"name":"query","in":"query","required":true,"description":"Question or search terms.","schema":{"type":"string","minLength":1,"maxLength":500},"example":"Where can I find pricing?"},{"name":"streaming","in":"query","description":"Request server-sent events instead of JSON.","schema":{"type":"boolean","default":false}},{"name":"Dream-API-Version","in":"header","description":"API version used by /ask. For an unsupported request version, this is the supported version.","schema":{"type":"string","enum":["2026-12-04"],"default":"2026-12-04"}},{"name":"limit","in":"query","description":"Maximum number of ranked results per page.","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}},{"name":"cursor","in":"query","description":"Opaque next cursor from a prior page. Resend the same question and language.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of ranked results, an NLWeb failure such as NO_RESULTS, or an event stream whose complete event includes the next cursor (or null).","headers":{"Dream-API-Version":{"description":"API version used by /ask. For an unsupported request version, this is the supported version.","schema":{"type":"string","enum":["2026-12-04"],"default":"2026-12-04"}}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SearchAnswer"},{"$ref":"#/components/schemas/SearchFailure"}]}},"text/event-stream":{"schema":{"type":"string"},"example":"event: start\ndata: {\"_meta\":{\"response_type\":\"answer\",\"version\":\"0.55\",\"streaming\":true}}\n\n"}}},"400":{"description":"Invalid question, JSON body, limit or cursor, or unsupported API version.","headers":{"Dream-API-Version":{"description":"API version used by /ask. For an unsupported request version, this is the supported version.","schema":{"type":"string","enum":["2026-12-04"],"default":"2026-12-04"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchFailure"}}}},"500":{"description":"The public page index is temporarily unavailable.","headers":{"Dream-API-Version":{"description":"API version used by /ask. For an unsupported request version, this is the supported version.","schema":{"type":"string","enum":["2026-12-04"],"default":"2026-12-04"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchFailure"}}}}}},"post":{"operationId":"askDreamWebsiteNlweb","description":"Search Dream's public website with NLWeb v0.55. By default the response is JSON; set prefer.streaming or request text/event-stream for SSE. No authentication is required.","security":[],"parameters":[{"name":"streaming","in":"query","description":"Request server-sent events instead of JSON.","schema":{"type":"boolean","default":false}},{"name":"Dream-API-Version","in":"header","description":"API version used by /ask. For an unsupported request version, this is the supported version.","schema":{"type":"string","enum":["2026-12-04"],"default":"2026-12-04"}},{"name":"limit","in":"query","description":"Maximum number of ranked results per page.","schema":{"type":"integer","minimum":1,"maximum":25,"default":10}},{"name":"cursor","in":"query","description":"Opaque next cursor from a prior page. Resend the same question and language.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Optional client key echoed by POST /ask. Search is read-only; keys do not cache or deduplicate responses.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"},"example":{"query":{"text":"Where can I find pricing?"}}}}},"responses":{"200":{"description":"A page of ranked results, an NLWeb failure such as NO_RESULTS, or an event stream whose complete event includes the next cursor (or null).","headers":{"Dream-API-Version":{"description":"API version used by /ask. For an unsupported request version, this is the supported version.","schema":{"type":"string","enum":["2026-12-04"],"default":"2026-12-04"}},"Idempotency-Key":{"description":"Optional client key echoed by POST /ask. Search is read-only; keys do not cache or deduplicate responses.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SearchAnswer"},{"$ref":"#/components/schemas/SearchFailure"}]}},"text/event-stream":{"schema":{"type":"string"},"example":"event: start\ndata: {\"_meta\":{\"response_type\":\"answer\",\"version\":\"0.55\",\"streaming\":true}}\n\n"}}},"400":{"description":"Invalid question, JSON body, limit or cursor, or unsupported API version.","headers":{"Dream-API-Version":{"description":"API version used by /ask. For an unsupported request version, this is the supported version.","schema":{"type":"string","enum":["2026-12-04"],"default":"2026-12-04"}},"Idempotency-Key":{"description":"Optional client key echoed by POST /ask. Search is read-only; keys do not cache or deduplicate responses.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchFailure"}}}},"500":{"description":"The public page index is temporarily unavailable.","headers":{"Dream-API-Version":{"description":"API version used by /ask. For an unsupported request version, this is the supported version.","schema":{"type":"string","enum":["2026-12-04"],"default":"2026-12-04"}},"Idempotency-Key":{"description":"Optional client key echoed by POST /ask. Search is read-only; keys do not cache or deduplicate responses.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchFailure"}}}}}}},"/mcp":{"servers":[{"url":"https://apiv2.usedream.ai"}],"post":{"operationId":"sendDreamWorkforceMcpMessage","description":"Send a JSON-RPC 2.0 message using MCP Streamable HTTP. Use an MCP client to initialize, discover tools and call them. Send Accept: application/json, text/event-stream. The jobs scope is required.","externalDocs":{"url":"https://usedream.ai/auth.md"},"security":[{"dreamWorkforceOAuth":["jobs"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpMessage"}}}},"responses":{"200":{"description":"An MCP JSON-RPC response or an event stream carrying MCP messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpReply"}},"text/event-stream":{"schema":{"type":"string"}}}},"202":{"description":"A notification or response was accepted; no response body."},"400":{"description":"The MCP message is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpReply"}}}},"401":{"description":"Authenticate using the protected-resource metadata advertised in the Bearer challenge.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpAuthFailure"}}}},"403":{"description":"The credential lacks the jobs scope or access is denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpAuthFailure"}}}},"406":{"description":"The client did not accept both application/json and text/event-stream.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpReply"}}}},"500":{"description":"The MCP request failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpReply"}}}}}}}},"components":{"securitySchemes":{"dreamWorkforceOAuth":{"type":"oauth2","description":"OAuth authorization code with PKCE for the Dream Workforce MCP server only.","flows":{"authorizationCode":{"authorizationUrl":"https://apiv2.usedream.ai/authorize","tokenUrl":"https://apiv2.usedream.ai/token","scopes":{"jobs":"Use the Dream Workforce MCP tools to plan, submit and follow up on jobs."}}}}},"schemas":{"SearchRequest":{"type":"object","properties":{"query":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500}},"required":["text"]},"prefer":{"type":"object","properties":{"streaming":{"type":"boolean","default":false},"response_format":{"type":"string","enum":["conversational_search"]},"mode":{"type":"string","enum":["list"]},"accept-language":{"type":"string","example":"en"}}}},"required":["query"]},"SearchAnswer":{"type":"object","properties":{"_meta":{"type":"object","properties":{"response_type":{"type":"string","enum":["answer"]},"version":{"type":"string","enum":["0.55"]},"response_format":{"type":"string","enum":["conversational_search"]}},"required":["response_type","version","response_format"]},"results":{"type":"array","items":{"$ref":"#/components/schemas/WebPage"}},"next":{"type":"string","nullable":true,"description":"Opaque cursor for the next page, or null on the last page."}},"required":["_meta","results","next"]},"SearchFailure":{"type":"object","properties":{"_meta":{"type":"object","properties":{"response_type":{"type":"string","enum":["failure"]},"version":{"type":"string"}},"required":["response_type","version"]},"error":{"$ref":"#/components/schemas/ApiError"}},"required":["_meta","error"]},"ApiError":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message","hint"]},"WebPage":{"type":"object","properties":{"@context":{"type":"string","enum":["https://schema.org"]},"@type":{"type":"string","enum":["WebPage"]},"url":{"type":"string","format":"uri"},"name":{"type":"string"},"description":{"type":"string"},"score":{"type":"number","minimum":0,"maximum":1}},"required":["@context","@type","url","name","description","score"]},"McpMessage":{"anyOf":[{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"method":{"type":"string","example":"tools/list"},"params":{"type":"object","additionalProperties":true}},"required":["jsonrpc","method"]},{"$ref":"#/components/schemas/McpReply"}]},"McpReply":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string","nullable":true},{"type":"integer"}]},"result":{"type":"object","additionalProperties":true},"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}},"required":["code","message"]}},"required":["jsonrpc","id"]},"McpAuthFailure":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error"]}}}}