Yonyon AI Ask API

The Ask API from Yonyon AI, for ask.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

POST /ask Natural-language query (NLWeb) #
GET /ask NLWeb endpoint descriptor #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/yonyon-ai:yonyon-ai-ask-api"
All apis
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.

Get an API 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 Specification

yonyon-ai-ask-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Yonyon Ai Ask API
  version: 1.0.0
  contact:
    name: Yonatan Gross
    email: hi@yonyon.ai
    url: https://yonyon.ai
  description: 'Operations tagged Ask across 2 of this provider''s published API definitions: yonyon-ai-openapi.yml, yonyon-ai.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://yonyon.ai
  description: Production. The public API is read-only and anonymous.
tags:
- name: Ask
paths:
  /ask:
    post:
      operationId: askNlweb
      summary: Natural-language query (NLWeb)
      description: 'Microsoft NLWeb endpoint. Agent-facing single-shot query over the same RAG + model that powers the site chat. No Origin/CSRF requirement. Returns JSON with `_meta` { response_type, version } by default; returns Server-Sent Events (start / result / complete) when the caller sends `Accept: text/event-stream`, `?streaming=true`, or `{ "prefer": { "streaming": true } }`. Rate-limited (10 requests/IP/minute). Accepts an optional `Idempotency-Key` request header, echoed on the response.'
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
      responses:
        '200':
          description: JSON answer (default) or text/event-stream when streaming is requested.
          headers:
            X-API-Version:
              $ref: '#/components/headers/X-API-Version'
            Idempotency-Key:
              $ref: '#/components/headers/Idempotency-Key'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskResponse'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/AskStreamEvent'
              example: 'event: start

                data: {"_meta":{"response_type":"nlws","version":"0.1"},"query":"who is Yonatan?"}


                event: result

                data: {"content":"Yonatan Gross is a senior engineer who ships AI products."}


                event: complete

                data: {"_meta":{"response_type":"nlws","version":"0.1"}}


                '
        '400':
          $ref: '#/components/responses/BadRequest'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          $ref: '#/components/responses/Unavailable'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Ask
    get:
      operationId: askDescriptor
      summary: NLWeb endpoint descriptor
      description: Returns a small JSON descriptor of how to call POST /ask. Fetch this first if you are discovering the endpoint programmatically. Also accepts ?query= for a GET query and ?streaming=true to request SSE.
      parameters:
      - name: query
        in: query
        required: false
        description: Natural-language question. Same as the POST body field `query`.
        schema:
          type: string
          maxLength: 2000
      - name: streaming
        in: query
        required: false
        description: If true, respond with text/event-stream instead of JSON.
        schema:
          type: boolean
      responses:
        '200':
          description: Endpoint descriptor.
          headers:
            X-API-Version:
              $ref: '#/components/headers/X-API-Version'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskDescriptor'
              example:
                '@context': https://schema.org
                _meta:
                  response_type: nlws
                  version: '0.1'
                query: ''
                answer: 'NLWeb natural-language query endpoint for yonyon.ai. POST {"query":"..."} (or GET /ask?query=) to ask about Yonatan Gross''s work, projects, and services. Add Accept: text/event-stream, ?streaming=true, or {"prefer":{"streaming":true}} for SSE (start/result/complete events). Public, no auth, rate-limited (10 req/IP/min).'
                results: []
                method: POST
                url: https://yonyon.ai/ask
                streaming: true
      tags:
      - Ask
    servers:
    - url: https://yonyon.ai
      description: Production. The public API is read-only and anonymous.
    - url: https://yonyon.ai
      description: Sandbox (read-only public API; no production side effects). Same origin; see /sandbox.md.
components:
  responses:
    BadRequest:
      description: Malformed request (invalid JSON, validation failure, or blocked content).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: The assistant is temporarily unavailable (model backend not configured/reachable).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit exceeded (10 requests/IP/minute).
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    Idempotency-Key:
      description: Echo of the client-supplied `Idempotency-Key` request header (present only when the request sent one). Truncated to 128 characters.
      schema:
        type: string
    X-RateLimit-Limit:
      description: Requests allowed per window.
      schema:
        type: integer
    RateLimit-Limit:
      description: RFC draft-ietf-httpapi-ratelimit-headers. Requests allowed per window.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Epoch seconds when the current window resets.
      schema:
        type: integer
    X-API-Version:
      description: Major version of the API serving this response. Currently always "1".
      schema:
        type: string
    RateLimit-Remaining:
      description: RFC draft-ietf-httpapi-ratelimit-headers. Requests remaining in the current window.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests remaining in the current window.
      schema:
        type: integer
    RateLimit-Reset:
      description: RFC draft-ietf-httpapi-ratelimit-headers. Seconds (a delta, not an epoch) until the current window resets.
      schema:
        type: integer
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: Optional client-supplied key (maximum 128 characters) echoed back as an `Idempotency-Key` response header. Every operation on this API is read-only and naturally idempotent; the echo lets a retrying agent correlate responses.
      schema:
        type: string
        maxLength: 128
  schemas:
    AskStreamEvent:
      title: AskStreamEvent
      description: 'The JSON object carried in the `data:` field of one Server-Sent Event. The SSE `event:` field names which variant it is: `start`, `result`, or `complete`.'
      oneOf:
      - $ref: '#/components/schemas/AskStreamStart'
      - $ref: '#/components/schemas/AskStreamResult'
      - $ref: '#/components/schemas/AskStreamComplete'
    Error:
      type: object
      description: Typed error envelope returned for every non-2xx response.
      required:
      - error
      - code
      properties:
        error:
          type: string
          description: Human-readable message.
        code:
          type: string
          description: Stable machine-readable error token.
          enum:
          - invalid_request
          - invalid_limit
          - invalid_cursor
          - invalid_operations
          - too_many_operations
          - unknown_op
          - rate_limited
          - unavailable
          - internal_error
          - method_not_allowed
          - forbidden
          - not_found
        retry_after:
          type: integer
          description: Seconds to wait before retrying (present on rate_limited).
        docs:
          type: string
          format: uri
          description: Link to this OpenAPI document.
    AskDescriptor:
      type: object
      title: AskDescriptor
      description: Self-describing descriptor for the NLWeb query endpoint. Returned by GET /ask so an agent can learn how to call POST /ask without reading prose documentation.
      required:
      - _meta
      - answer
      - method
      - url
      - streaming
      properties:
        '@context':
          type: string
          const: https://schema.org
          description: JSON-LD context.
        _meta:
          type: object
          required:
          - response_type
          - version
          description: NLWeb envelope metadata.
          properties:
            response_type:
              type: string
              const: nlws
              description: Always 'nlws' for this endpoint.
            version:
              type: string
              description: NLWeb protocol version.
              examples:
              - '0.1'
        query:
          type: string
          description: Always empty on the descriptor; present so the descriptor and a real answer share one shape.
          examples:
          - ''
        answer:
          type: string
          description: Human and agent readable instructions for calling this endpoint.
        results:
          type: array
          description: Always empty on the descriptor.
          items:
            type: object
            properties:
              '@type':
                type: string
              text:
                type: string
        method:
          type: string
          enum:
          - POST
          description: HTTP method to use for a real query.
        url:
          type: string
          format: uri
          description: Absolute URL to POST a query to.
          examples:
          - https://yonyon.ai/ask
        streaming:
          type: boolean
          description: Whether the endpoint can stream Server-Sent Events.
    AskStreamStart:
      type: object
      title: AskStreamStart
      description: Payload of the `start` event. Echoes the accepted query.
      required:
      - _meta
      - query
      properties:
        _meta:
          type: object
          required:
          - response_type
          - version
          description: NLWeb envelope metadata.
          properties:
            response_type:
              type: string
              const: nlws
              description: Always 'nlws' for this endpoint.
            version:
              type: string
              description: NLWeb protocol version.
              examples:
              - '0.1'
        query:
          type: string
          description: The query as the server parsed it.
    AskStreamComplete:
      type: object
      title: AskStreamComplete
      description: Payload of the terminal `complete` event. No further events follow.
      required:
      - _meta
      properties:
        _meta:
          type: object
          required:
          - response_type
          - version
          description: NLWeb envelope metadata.
          properties:
            response_type:
              type: string
              const: nlws
              description: Always 'nlws' for this endpoint.
            version:
              type: string
              description: NLWeb protocol version.
              examples:
              - '0.1'
    AskRequest:
      type: object
      required:
      - query
      properties:
        query:
          type: string
          maxLength: 2000
          description: The natural-language question.
        prefer:
          type: object
          properties:
            streaming:
              type: boolean
    AskStreamResult:
      type: object
      title: AskStreamResult
      description: Payload of a `result` event. Emitted repeatedly; concatenate `content` across every result event in order to rebuild the full answer.
      required:
      - content
      properties:
        content:
          type: string
          description: One chunk of the answer text.
    AskResponse:
      type: object
      required:
      - _meta
      - query
      - answer
      - results
      properties:
        '@context':
          type: string
          const: https://schema.org
        _meta:
          type: object
          required:
          - response_type
          - version
          properties:
            response_type:
              type: string
            version:
              type: string
        query:
          type: string
        answer:
          type: string
        results:
          type: array
          items:
            type: object
            properties:
              '@type':
                type: string
              text:
                type: string
x-refined-from:
- yonyon-ai-openapi.yml
- yonyon-ai.json