For the complete documentation index, see llms.txt. This page is also available as Markdown.

API 密钥

API Key 方法适用于 专业版合作伙伴版 方案用户。请从你的 Minara 个人资料中生成密钥,并将其包含在 Authorization 请求头中。


要求

Minara Agent API 仅对 Pro 和 Partner 方案订阅者开放。如果你使用的是免费方案,请前往 API 标签页查看升级提示。

如果你降级订阅,所有活跃的 API 密钥会自动暂停,并在你续订后恢复。


创建 API 密钥

  1. 前往你的 账户资料minara.ai.

  2. 选择 API 密钥 左侧菜单中的标签页,然后点击 创建.

API Key tab in Minara account profile showing Create button
  1. 输入名称和描述以标识该密钥的用途。

Create API key dialog with name and description fields
  1. 创建后,你的 API 密钥将显示出来。请复制并安全保存——它不会再次显示。

Newly created API key displayed for copying

管理 API 密钥

操作
详情

查看密钥

密钥列表仅显示最后 4 个字符。点击可显示完整密钥。

密钥上限

每个 Pro/Partner 账户最多可创建 5 个 API 密钥。

删除密钥

需要 2FA 确认。删除后不可恢复。


身份验证

请在每个请求的 Authorization 请求头中包含你的 API 密钥:

示例:


计费

所有 API 调用都会消耗 积分 中的额度。如果积分用完,API 请求将暂停,直到补充为止。


API 参考

基础 URL: https://api.minara.ai

聊天

POST /v1/developer/chat

Developer Chat

post

Developer chat endpoint supporting streaming, non-streaming, and asynchronous (background) response modes, with optional requestId-based idempotency.

授权
Authorizationstring必填

Format: Authorization: Bearer <YOUR_API_KEY>

请求体
modestring · enum必填

Required. Model mode: 'fast' for quick responses, 'expert' for in-depth analysis.

可能的值:
streamboolean可选

Optional. Set to true for streaming (SSE), false (default) for standard JSON response. Cannot be combined with background.

Default: false
backgroundboolean可选

Optional. Set to true to run a non-streaming request asynchronously and poll the result later. Requires stream: false.

Default: false
requestIdstring · 最小值: 1 · 最大值: 128可选

Optional. Client-generated idempotency key, unique within the API key. 1-128 chars matching ^[A-Za-z0-9._:-]+$.

Pattern: ^[A-Za-z0-9._:-]+$
chatIdstring可选

Optional. Existing chat to continue. A new chat is created if omitted.

响应
200

Successful response (stream/background not set, or a completed idempotent replay).

idstring可选

Server-assigned request id. Present when a requestId was supplied.

requestIdstring可选

Your idempotency key, echoed when one was provided.

chatIdstring可选

Unique conversation ID.

messageIdstring可选

Unique message ID for this response.

contentstring可选

The AI-generated response content.

usageobject可选

Usage statistics for the request.

post/v1/developer/chat
参数
类型
必填
描述

mode

字符串

快速 用于快速响应, 专家 用于深入分析

stream

布尔值

true 用于 SSE 流式传输, false 用于标准 JSON

message.role

字符串

必须为 user

message.content

字符串

查询内容

示例:


意图兑换交易

POST /v1/developer/intent-to-swap-tx

Intent to Swap Transaction

post

Convert natural language trading intent into an executable swap transaction payload. Compatible with OKX DEX by default.

授权
Authorizationstring必填

Format: Authorization: Bearer <YOUR_API_KEY>

请求体
intentstring必填

Required. Natural language swap intent (e.g., 'swap 0.1 ETH to USDC').

walletAddressstring必填

Required. User wallet address (0x...).

chainstring可选

Optional. Chain name (e.g., 'base', 'ethereum', 'bsc', 'arbitrum', 'optimism').

响应
200

Swap transaction generated

application/json
post/v1/developer/intent-to-swap-tx

将自然语言交易意图转换为可执行的兑换交易负载,默认兼容 OKX DEX。

参数
类型
必填
描述

intent

字符串

自然语言兑换意图(例如,“将 0.1 ETH 兑换为 USDC”)

walletAddress

字符串

用户钱包地址(0x...)

chain

字符串

链名称(例如,“base”、“ethereum”、“arbitrum”)

示例:


永续交易建议

POST /v1/developer/perp-trading-suggestion

Perpetual Trading Suggestion

post

Get AI-powered perpetual trading suggestions with long/short recommendations, entry price, stop loss, take profit levels, and confidence score based on comprehensive market analysis.

授权
Authorizationstring必填

Format: Authorization: Bearer <YOUR_API_KEY>

请求体
symbolstring必填

Required. Trading symbol (e.g., 'BTC', 'ETH', 'SOL').

stylestring · enum可选

Optional. Trading style: 'scalping', 'day-trading', or 'swing-trading'. Default: 'scalping'.

Default: scalping可能的值:
marginUSDnumber可选

Optional. Margin in USD. Default: 1000.

Default: 1000
leveragenumber · 最小值: 1 · 最大值: 40可选

Optional. Leverage multiplier (max: 40). Default: 10.

Default: 10
strategystring可选

Optional. Strategy type. Default: 'max-profit'. More strategies coming soon.

Default: max-profit
响应
200

Perpetual trading suggestion

application/json
entryPricenumber可选

Recommended entry price.

sidestring · enum可选

Trading side recommendation.

可能的值:
stopLossPricenumber可选

Recommended stop loss price.

takeProfitPricenumber可选

Recommended take profit price.

confidencenumber · 最大值: 100可选

Confidence score (0-100).

reasonsstring[]可选

Analysis reasons based on technical indicators.

risksstring[]可选

Risk factors to consider.

post/v1/developer/perp-trading-suggestion

获取由 AI 驱动的永续交易建议,包含做多/做空建议、入场点、止损、止盈和置信分数。

参数
类型
必填
描述

symbol

字符串

交易标的(例如,“BTC”、“ETH”、“SOL”)

style

字符串

scalping, day-trading,或 swing-trading

marginUSD

数字

美元保证金

leverage

数字

杠杆倍数(最大:40)

strategy

字符串

策略类型

示例:


预测市场分析

POST /v1/developer/prediction-market-ask

Prediction Market Analysis

post

AI-powered prediction market analysis. Analyze prediction market events and get probability estimates for each outcome with detailed reasoning.

授权
Authorizationstring必填

Format: Authorization: Bearer <YOUR_API_KEY>

请求体
linkstring必填

Required. Prediction market page link (e.g., Polymarket event URL).

modestring · enum必填

Required. Chat mode: 'fast' or 'expert'.

可能的值:
only_resultboolean可选

Optional. Only return prediction probabilities without reasoning. Default: false.

Default: false
customPromptstring可选

Optional. Custom instructions to guide the analysis. Use this to specify focus areas, risk preferences, or analysis style.

响应
200

Prediction market analysis

application/json
reasoningstring可选

AI reasoning and analysis (empty if only_result=true).

post/v1/developer/prediction-market-ask

由 AI 驱动的预测市场结果概率估计。

参数
类型
必填
描述

link

字符串

预测市场事件 URL(例如,Polymarket)

mode

字符串

快速专家

only_result

布尔值

仅返回概率,不包含推理

customPrompt

字符串

用于引导分析的自定义说明

示例:

最后更新于

这有帮助吗?