{
  "openapi": "3.1.0",
  "info": {
    "title": "Kognai paid agent endpoints",
    "version": "1.0.0",
    "description": "Agent work sold per call over x402 (USDC on Base or Solana mainnet, PayAI facilitator). No account and no key: an unpaid call answers 402 with the terms.",
    "x-guidance": "Kreativ: POST /v1/labor/x402/image with {\"prompt\", \"aspect\"} for one reviewed image (0.18 USDC); POST /v1/labor/x402/video, same body, for one 8 second video (0.765 USDC), answered with a status link to poll. Golden Kog: POST /v1/golden-kog/analysis with {\"chain\": \"solana\" or \"base\", \"token\": address} for a token risk report (0.50 USDC); POST /v1/golden-kog/monitor for a 24 hour risk watch with alerts (1.00 USDC); GET /v1/golden-kog/resolve?q=TICKER is free and lists candidate tokens, the caller picks the exact address. Golden Kog gives risk facts, never a trading signal. The same Golden Kog tools are on the MCP server at /v1/golden-kog/mcp. Pay by sending the request once, reading the 402, and repeating it with the signed payment in PAYMENT-SIGNATURE. On Base, Kreativ collects the payment only on delivery.",
    "contact": {
      "name": "Kognai",
      "email": "x@kognai.ai",
      "url": "https://www.kognai.ai"
    }
  },
  "servers": [
    {
      "url": "https://www.kognai.ai"
    }
  ],
  "tags": [
    {
      "name": "Kreativ",
      "description": "Images and short videos from a text prompt, reviewed before delivery."
    },
    {
      "name": "Golden Kog",
      "description": "Token risk and structure facts on Solana and Base, never a trading signal."
    }
  ],
  "paths": {
    "/v1/labor/x402/image": {
      "post": {
        "operationId": "kreativ_image",
        "summary": "Kreativ image: one reviewed image from a prompt",
        "description": "Kognai Kreativ image agent: one original image made from your text prompt (square, portrait or landscape) and checked by a quality reviewer before delivery. Use it when an agent needs an illustration, a product visual or a social post picture. Answers with a result link; on Base the payment is collected only on delivery.",
        "tags": [
          "Kreativ"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.18"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "asset": "USDC",
                "networks": [
                  "base",
                  "solana"
                ],
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 600,
                    "description": "what the image should show"
                  },
                  "aspect": {
                    "type": "string",
                    "enum": [
                      "1:1",
                      "9:16",
                      "16:9"
                    ],
                    "default": "1:1",
                    "description": "the frame: square, portrait or landscape"
                  }
                },
                "required": [
                  "prompt"
                ]
              },
              "example": {
                "prompt": "a lighthouse at dawn over a calm sea, cinematic light",
                "aspect": "1:1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid and answered (the payment receipt is in the PAYMENT-RESPONSE header).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "description": "done when the result is ready"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "status_url": {
                      "type": "string",
                      "description": "poll this while the state is not done"
                    },
                    "result_url": {
                      "type": "string",
                      "description": "the image file, once the state is done"
                    },
                    "review_score": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "the quality reviewer score out of 10"
                    }
                  },
                  "required": [
                    "id",
                    "state"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Paid and accepted: poll status_url until state is done.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "description": "done when the result is ready"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "status_url": {
                      "type": "string",
                      "description": "poll this while the state is not done"
                    },
                    "result_url": {
                      "type": "string",
                      "description": "the image file, once the state is done"
                    },
                    "review_score": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "the quality reviewer score out of 10"
                    }
                  },
                  "required": [
                    "id",
                    "state"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The paid request body is not valid; nothing is charged."
          },
          "402": {
            "description": "Payment required: x402 v2 terms in the body and, base64, in the PAYMENT-REQUIRED header. Pay one of accepts and send the same request again with PAYMENT-SIGNATURE (or X-PAYMENT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/labor/x402/video": {
      "post": {
        "operationId": "kreativ_video",
        "summary": "Kreativ video: one 8 second reviewed video from a prompt",
        "description": "Kognai Kreativ video agent: one 8 second video (2 shots, 480p, no audio) made from your text prompt and checked by a quality reviewer before delivery. Use it when an agent needs a short clip for a social post or a teaser. Rendering takes minutes: the answer is a status link and a result link; on Base the payment is collected only on delivery.",
        "tags": [
          "Kreativ"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.765"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "asset": "USDC",
                "networks": [
                  "base",
                  "solana"
                ],
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 600,
                    "description": "what the video should show"
                  },
                  "aspect": {
                    "type": "string",
                    "enum": [
                      "1:1",
                      "9:16",
                      "16:9"
                    ],
                    "default": "1:1",
                    "description": "the frame: square, portrait or landscape"
                  }
                },
                "required": [
                  "prompt"
                ]
              },
              "example": {
                "prompt": "a lighthouse at dawn over a calm sea, cinematic light",
                "aspect": "1:1"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid and answered (the payment receipt is in the PAYMENT-RESPONSE header).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "description": "done when the result is ready"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "status_url": {
                      "type": "string",
                      "description": "poll this while the state is not done"
                    },
                    "result_url": {
                      "type": "string",
                      "description": "the video file, once the state is done"
                    },
                    "review_score": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "the quality reviewer score out of 10"
                    }
                  },
                  "required": [
                    "id",
                    "state"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Paid and accepted: poll status_url until state is done.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "description": "done when the result is ready"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "status_url": {
                      "type": "string",
                      "description": "poll this while the state is not done"
                    },
                    "result_url": {
                      "type": "string",
                      "description": "the video file, once the state is done"
                    },
                    "review_score": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "the quality reviewer score out of 10"
                    }
                  },
                  "required": [
                    "id",
                    "state"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The paid request body is not valid; nothing is charged."
          },
          "402": {
            "description": "Payment required: x402 v2 terms in the body and, base64, in the PAYMENT-REQUIRED header. Pay one of accepts and send the same request again with PAYMENT-SIGNATURE (or X-PAYMENT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/golden-kog/analysis": {
      "post": {
        "operationId": "golden_kog_analysis",
        "summary": "Golden Kog: risk analysis of one token",
        "description": "Golden Kog token risk analysis by Kognai: one Solana or Base token read on chain for structure and risk (holder concentration, launch bundles and the dev wallet, liquidity, mint and freeze authorities, taxes and honeypot checks on Base, issuer controls, trading momentum), with a risk level, the flags behind it and a short written report. Use it before an agent or a trader touches an unfamiliar token. Risk reading only, never a buy or sell signal.",
        "tags": [
          "Golden Kog"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.50"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "asset": "USDC",
                "networks": [
                  "base",
                  "solana"
                ],
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "chain": {
                    "type": "string",
                    "enum": [
                      "solana",
                      "base"
                    ],
                    "default": "solana",
                    "description": "the chain of the token"
                  },
                  "token": {
                    "type": "string",
                    "description": "the token address: a Solana mint, or a Base contract (0x and 40 hex)"
                  },
                  "client_order": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{22,64}$",
                    "description": "optional: your own order id (128 random bits or more); with it the reply comes as soon as the payment is verified and GET order_url reads the result"
                  },
                  "wait_s": {
                    "type": "number",
                    "minimum": 0,
                    "description": "optional: how long to hold the call open for the result, in seconds"
                  }
                },
                "required": [
                  "chain",
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid and answered (the payment receipt is in the PAYMENT-RESPONSE header).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "description": "done (watching for a watch) when the report is ready; otherwise poll status_url"
                    },
                    "status_url": {
                      "type": "string"
                    },
                    "report": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "level (low, medium, high, severe or issuer), flags, unknown facts and the written text"
                    }
                  },
                  "required": [
                    "id",
                    "state"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Paid and accepted: poll status_url until state is done.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "description": "done (watching for a watch) when the report is ready; otherwise poll status_url"
                    },
                    "status_url": {
                      "type": "string"
                    },
                    "report": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "level (low, medium, high, severe or issuer), flags, unknown facts and the written text"
                    }
                  },
                  "required": [
                    "id",
                    "state"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The paid request body is not valid; nothing is charged."
          },
          "402": {
            "description": "Payment required: x402 v2 terms in the body and, base64, in the PAYMENT-REQUIRED header. Pay one of accepts and send the same request again with PAYMENT-SIGNATURE (or X-PAYMENT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/golden-kog/monitor": {
      "post": {
        "operationId": "golden_kog_monitor",
        "summary": "Golden Kog: 24 hour risk watch of one token",
        "description": "Golden Kog token watch by Kognai: one Solana or Base token watched for 24 hours after a baseline risk analysis, with alerts when its risk picture changes (liquidity pulled, top holders or the dev wallet selling, authorities or taxes changed), by webhook and on the job page. Use it to keep an eye on a token an agent holds or follows. Risk alerts only, never a buy or sell signal.",
        "tags": [
          "Golden Kog"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "1.00"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "asset": "USDC",
                "networks": [
                  "base",
                  "solana"
                ],
                "facilitator": "https://facilitator.payai.network"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "chain": {
                    "type": "string",
                    "enum": [
                      "solana",
                      "base"
                    ],
                    "default": "solana",
                    "description": "the chain of the token"
                  },
                  "token": {
                    "type": "string",
                    "description": "the token address: a Solana mint, or a Base contract (0x and 40 hex)"
                  },
                  "client_order": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{22,64}$",
                    "description": "optional: your own order id (128 random bits or more); with it the reply comes as soon as the payment is verified and GET order_url reads the result"
                  },
                  "wait_s": {
                    "type": "number",
                    "minimum": 0,
                    "description": "optional: how long to hold the call open for the result, in seconds"
                  },
                  "hours": {
                    "type": "integer",
                    "enum": [
                      24
                    ],
                    "description": "the window, 24 hours"
                  },
                  "webhook": {
                    "type": "string",
                    "description": "optional: a public https url that receives the alerts"
                  }
                },
                "required": [
                  "chain",
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paid and answered (the payment receipt is in the PAYMENT-RESPONSE header).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "description": "done (watching for a watch) when the report is ready; otherwise poll status_url"
                    },
                    "status_url": {
                      "type": "string"
                    },
                    "report": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "level (low, medium, high, severe or issuer), flags, unknown facts and the written text"
                    }
                  },
                  "required": [
                    "id",
                    "state"
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Paid and accepted: poll status_url until state is done.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string",
                      "description": "done (watching for a watch) when the report is ready; otherwise poll status_url"
                    },
                    "status_url": {
                      "type": "string"
                    },
                    "report": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "level (low, medium, high, severe or issuer), flags, unknown facts and the written text"
                    }
                  },
                  "required": [
                    "id",
                    "state"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The paid request body is not valid; nothing is charged."
          },
          "402": {
            "description": "Payment required: x402 v2 terms in the body and, base64, in the PAYMENT-REQUIRED header. Pay one of accepts and send the same request again with PAYMENT-SIGNATURE (or X-PAYMENT).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequired"
                }
              }
            }
          }
        }
      }
    },
    "/v1/golden-kog/resolve": {
      "get": {
        "operationId": "golden_kog_resolve",
        "summary": "Golden Kog: the Solana tokens behind a ticker (free)",
        "tags": [
          "Golden Kog"
        ],
        "security": [],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "a ticker such as WIF or $WIF (letters and digits, 1 to 15)",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Candidates side by side; the caller picks one exact address.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "q is not a ticker."
          }
        }
      }
    },
    "/v1/golden-kog/mcp": {
      "post": {
        "operationId": "golden_kog_mcp",
        "summary": "Golden Kog MCP server (streamable HTTP, protocol 2025-06-18)",
        "description": "JSON RPC over HTTP. Free tools: about, resolve_ticker, get_job. Paid tools analyze_token and monitor_token take an x402 payment in params._meta x402/payment.",
        "tags": [
          "Golden Kog"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {},
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON RPC result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/labor/prices": {
      "get": {
        "operationId": "kreativ_prices",
        "summary": "Kreativ live prices (free)",
        "tags": [
          "Kreativ"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Current prices in USD",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PaymentRequired": {
        "type": "object",
        "description": "x402 v2 payment terms.",
        "required": [
          "x402Version",
          "accepts"
        ],
        "properties": {
          "x402Version": {
            "type": "integer",
            "const": 2
          },
          "error": {
            "type": "string"
          },
          "resource": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "description": {
                "type": "string"
              },
              "mimeType": {
                "type": "string"
              },
              "serviceName": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "accepts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "scheme",
                "network",
                "amount",
                "asset",
                "payTo"
              ],
              "properties": {
                "scheme": {
                  "type": "string",
                  "const": "exact"
                },
                "network": {
                  "type": "string",
                  "description": "CAIP 2 network id (Base or Solana mainnet)"
                },
                "amount": {
                  "type": "string",
                  "description": "price in USDC atomic units (6 decimals)"
                },
                "asset": {
                  "type": "string",
                  "description": "the USDC contract or mint on that network"
                },
                "payTo": {
                  "type": "string",
                  "description": "the receiving address of this product"
                },
                "maxTimeoutSeconds": {
                  "type": "integer"
                },
                "extra": {
                  "type": "object"
                }
              }
            }
          },
          "extensions": {
            "type": "object",
            "description": "bazaar discovery metadata (input, output, schema)"
          }
        }
      }
    }
  },
  "x-aiax": {
    "manifest": "https://www.kognai.ai/aiax/manifest.json",
    "spec": "https://github.com/Godman-s/aiax",
    "version": "0.1"
  }
}
