推理
获取模型就绪代理的代理卡
发现模型就绪 A2A 代理:它的 JSON-RPC 端点、认证方式、推送通知支持,以及唯一的技能“预热微调模型”。
GET
https://api.fastino.ai
/
v1
/
model-readiness
/
agent-card.json
获取模型就绪代理的代理卡
curl --request GET \
--url https://api.fastino.ai/v1/model-readiness/agent-card.json \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fastino.ai/v1/model-readiness/agent-card.json"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.fastino.ai/v1/model-readiness/agent-card.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fastino.ai/v1/model-readiness/agent-card.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fastino.ai/v1/model-readiness/agent-card.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fastino.ai/v1/model-readiness/agent-card.json")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fastino.ai/v1/model-readiness/agent-card.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyGET /v1/model-readiness/agent-card.json
返回模型就绪代理的 A2A 代理卡。A2A 客户端读取它来找到代理的端点
POST /v1/model-readiness/a2a
以及调用方式。代理卡是公开的,无需 API 密钥。
该代理只有一个技能:Warm a fine-tuned model(预热微调模型,model-readiness)。它会预热您的某个微调模型,并在模型就绪时报告,不运行推理。
请求示例
curl https://api.fastino.ai/v1/model-readiness/agent-card.json
响应
| 字段 | 值 |
|---|---|
protocolVersion | 0.3.0,即 A2A 协议版本。 |
url | JSON-RPC 端点 https://api.fastino.ai/v1/model-readiness/a2a。 |
preferredTransport | JSONRPC。 |
capabilities | streaming 为 false,pushNotifications 为 true:可以轮询任务,或在任务结束时接收一次推送通知。 |
defaultInputModes、defaultOutputModes | application/json。 |
securitySchemes、security | 通过 X-API-Key 请求头传递 API 密钥。 |
skills | 一个技能:model-readiness。 |
响应示例
{
"protocolVersion": "0.3.0",
"name": "Fastino model readiness",
"version": "1.0.0",
"description": "Warm an exact fine-tuned model and receive an observed readiness outcome. No inference is submitted. For user-facing coding agents. Send one data part with model_id.",
"url": "https://api.fastino.ai/v1/model-readiness/a2a",
"preferredTransport": "JSONRPC",
"capabilities": {
"streaming": false,
"pushNotifications": true
},
"defaultInputModes": ["application/json"],
"defaultOutputModes": ["application/json"],
"securitySchemes": {
"apiKey": {
"type": "apiKey",
"in": "header",
"name": "X-API-Key"
}
},
"security": [{"apiKey": []}],
"skills": [
{
"id": "model-readiness",
"name": "Warm a fine-tuned model",
"description": "Observe readiness of a model UUID; poll or receive a terminal push notification.",
"tags": ["inference", "readiness"]
}
]
}
此页面对您有帮助吗?
⌘I
获取模型就绪代理的代理卡
curl --request GET \
--url https://api.fastino.ai/v1/model-readiness/agent-card.json \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.fastino.ai/v1/model-readiness/agent-card.json"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.fastino.ai/v1/model-readiness/agent-card.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fastino.ai/v1/model-readiness/agent-card.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fastino.ai/v1/model-readiness/agent-card.json"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fastino.ai/v1/model-readiness/agent-card.json")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fastino.ai/v1/model-readiness/agent-card.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body
