Developers / Tools

Preview an OpenAPI import

POST https://api.echonova.ai/v1/tools/openapi/preview

Reads an OpenAPI document, inline or from a public url, and lists the operations a tool would import. Nothing is saved. At most 5 calls a minute per key. Free. Needs the tools:write scope on the key.

Headers

Authorization string Required

Bearer, a space, then your API key, which starts with ek_. Create keys in the portal under Developers, API Keys.

Request body

application/json

spec object Optional

The OpenAPI document as JSON, up to 5 MB. Send exactly one of spec or url.

url string Optional

Public https URL of the OpenAPI document. Send exactly one of spec or url.

Up to 2000 characters
baseUrlOverride string Optional

The server the tool calls, replacing the document servers. Required on create.

Up to 2000 characters

Response

200 application/json Every response uses this envelope.

data object

The result.

success boolean

true for a successful call.

statusCode integer

Repeats the HTTP status.

errorMessage string or null

null on success.

Errors

Same envelope, with success false and data null. All errors

POST /v1/tools/openapi/preview

curl -X POST "https://api.echonova.ai/v1/tools/openapi/preview" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

{
  "data": {
    "apiTitle": "Orders API",
    "operationCount": 12,
    "warnings": [
      "Skipped 2 operations without an operationId"
    ],
    "baseUrl": "https://api.example.com",
    "operations": [
      {
        "name": "getOrder",
        "method": "GET",
        "path": "/orders/{orderId}",
        "description": "Find an order.",
        "mutating": false,
        "parameters": [
          {
            "name": "orderId",
            "location": "path",
            "required": true,
            "type": "string"
          }
        ],
        "bodyFields": [
          {
            "name": "quantity",
            "type": "integer",
            "required": false
          }
        ]
      }
    ]
  },
  "success": true,
  "statusCode": 200,
  "errorMessage": null
}