From 5d5c2bfa927d0f14191b7019fc3a2f5ac0d4ded9 Mon Sep 17 00:00:00 2001 From: kriptoburak Date: Thu, 18 Jun 2026 21:44:53 +0300 Subject: [PATCH 1/3] Add Xquik OpenAPI ingestion example --- docs/openapi-ingestion.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/openapi-ingestion.md b/docs/openapi-ingestion.md index 779fc12..60c41ff 100644 --- a/docs/openapi-ingestion.md +++ b/docs/openapi-ingestion.md @@ -53,6 +53,40 @@ async def load_remote_spec(url): manual = await load_remote_spec("https://api.example.com/openapi.json") ``` +### Xquik API Example + +Xquik publishes an OpenAPI 3.1 specification for its X data API at +`https://xquik.com/openapi.json`. It can be loaded the same way as any other +remote OpenAPI document: + +```python +manual = await load_remote_spec("https://xquik.com/openapi.json") + +print(f"Generated {len(manual.tools)} Xquik tools") +``` + +When calling authenticated endpoints, provide the API key through the +`x-api-key` header and keep the value in an injected variable: + +```python +config = { + "manual_call_templates": [ + { + "name": "xquik", + "call_template_type": "http", + "url": "https://xquik.com/openapi.json", + "http_method": "GET", + "auth": { + "auth_type": "api_key", + "api_key": "${XQUIK_API_KEY}", + "var_name": "x-api-key", + "location": "header" + } + } + ] +} +``` + ## Method 3: UTCP Client Configuration Include OpenAPI specs directly in your UTCP client configuration. From 456ad7e39de427e02e50de982020c67fc5466a31 Mon Sep 17 00:00:00 2001 From: kriptoburak Date: Fri, 19 Jun 2026 12:49:17 +0300 Subject: [PATCH 2/3] Clarify OpenAPI 3.1 support --- docs/openapi-ingestion.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/openapi-ingestion.md b/docs/openapi-ingestion.md index 60c41ff..8d32075 100644 --- a/docs/openapi-ingestion.md +++ b/docs/openapi-ingestion.md @@ -1,6 +1,6 @@ # OpenAPI Ingestion Methods in python-utcp -UTCP automatically converts OpenAPI 2.0/3.0 specifications into UTCP tools, enabling AI agents to interact with REST APIs without requiring server modifications or additional infrastructure. +UTCP automatically converts OpenAPI 2.0/3.0/3.1 specifications into UTCP tools, enabling AI agents to interact with REST APIs without requiring server modifications or additional infrastructure. ## Method 1: Direct OpenAPI Converter @@ -170,7 +170,7 @@ OpenAPI security schemes automatically convert to UTCP auth objects: - `oauth2` → `OAuth2Auth` ### Multi-format Support -- **OpenAPI 2.0 & 3.0**: Full compatibility +- **OpenAPI 2.0, 3.0 & 3.1**: Full compatibility - **JSON & YAML**: Automatic format detection - **Local & Remote**: Files or URLs From c01cf6522fbfd38f1031b247c4f70b8e4ca92e81 Mon Sep 17 00:00:00 2001 From: kriptoburak Date: Fri, 19 Jun 2026 12:53:30 +0300 Subject: [PATCH 3/3] Refine OpenAPI 3.1 wording --- docs/openapi-ingestion.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/openapi-ingestion.md b/docs/openapi-ingestion.md index 8d32075..81adcd7 100644 --- a/docs/openapi-ingestion.md +++ b/docs/openapi-ingestion.md @@ -1,6 +1,6 @@ # OpenAPI Ingestion Methods in python-utcp -UTCP automatically converts OpenAPI 2.0/3.0/3.1 specifications into UTCP tools, enabling AI agents to interact with REST APIs without requiring server modifications or additional infrastructure. +UTCP automatically converts OpenAPI 2.0/3.0 specifications, plus compatible OpenAPI 3.1 specifications, into UTCP tools, enabling AI agents to interact with REST APIs without requiring server modifications or additional infrastructure. ## Method 1: Direct OpenAPI Converter @@ -170,7 +170,8 @@ OpenAPI security schemes automatically convert to UTCP auth objects: - `oauth2` → `OAuth2Auth` ### Multi-format Support -- **OpenAPI 2.0, 3.0 & 3.1**: Full compatibility +- **OpenAPI 2.0 & 3.0**: Full compatibility +- **OpenAPI 3.1**: Compatible specifications can be loaded, but verify 3.1-specific schema features against the converter - **JSON & YAML**: Automatic format detection - **Local & Remote**: Files or URLs