Runs
API Reference
最后更新于
最后更新于
GET /threads/{threadId}/runs HTTP/1.1
Host: api.aimlapi.com
Accept: */*
[
{
"id": "text",
"assistant_id": "text",
"cancelled_at": 1,
"completed_at": 1,
"created_at": 1,
"expires_at": 1,
"failed_at": 1,
"incomplete_details": {
"reason": "max_completion_tokens"
},
"instructions": "text",
"last_error": {
"code": "server_error",
"message": "text"
},
"max_completion_tokens": 1,
"max_prompt_tokens": 1,
"metadata": null,
"model": "text",
"object": "thread.run",
"parallel_tool_calls": true,
"required_action": {
"submit_tool_outputs": {
"tool_calls": []
},
"type": "submit_tool_outputs"
},
"response_format": null,
"started_at": 1,
"status": "queued",
"thread_id": "text",
"tool_choice": null,
"tools": [],
"truncation_strategy": {
"type": "auto",
"last_messages": 1
},
"usage": {
"completion_tokens": 1,
"prompt_tokens": 1,
"total_tokens": 1
},
"temperature": 1,
"top_p": 1
}
]POST /threads/{threadId}/runs HTTP/1.1
Host: api.aimlapi.com
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"assistant_id": "text",
"stream": true,
"metadata": {}
}{
"id": "text",
"assistant_id": "text",
"cancelled_at": 1,
"completed_at": 1,
"created_at": 1,
"expires_at": 1,
"failed_at": 1,
"incomplete_details": {
"reason": "max_completion_tokens"
},
"instructions": "text",
"last_error": {
"code": "server_error",
"message": "text"
},
"max_completion_tokens": 1,
"max_prompt_tokens": 1,
"metadata": null,
"model": "text",
"object": "thread.run",
"parallel_tool_calls": true,
"required_action": {
"submit_tool_outputs": {
"tool_calls": []
},
"type": "submit_tool_outputs"
},
"response_format": null,
"started_at": 1,
"status": "queued",
"thread_id": "text",
"tool_choice": null,
"tools": [],
"truncation_strategy": {
"type": "auto",
"last_messages": 1
},
"usage": {
"completion_tokens": 1,
"prompt_tokens": 1,
"total_tokens": 1
},
"temperature": 1,
"top_p": 1
}POST /threads/{threadId}/runs/{runId} HTTP/1.1
Host: api.aimlapi.com
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"metadata": {}
}{
"id": "text",
"assistant_id": "text",
"cancelled_at": 1,
"completed_at": 1,
"created_at": 1,
"expires_at": 1,
"failed_at": 1,
"incomplete_details": {
"reason": "max_completion_tokens"
},
"instructions": "text",
"last_error": {
"code": "server_error",
"message": "text"
},
"max_completion_tokens": 1,
"max_prompt_tokens": 1,
"metadata": null,
"model": "text",
"object": "thread.run",
"parallel_tool_calls": true,
"required_action": {
"submit_tool_outputs": {
"tool_calls": []
},
"type": "submit_tool_outputs"
},
"response_format": null,
"started_at": 1,
"status": "queued",
"thread_id": "text",
"tool_choice": null,
"tools": [],
"truncation_strategy": {
"type": "auto",
"last_messages": 1
},
"usage": {
"completion_tokens": 1,
"prompt_tokens": 1,
"total_tokens": 1
},
"temperature": 1,
"top_p": 1
}GET /threads/{threadId}/runs/{runId} HTTP/1.1
Host: api.aimlapi.com
Accept: */*
{
"id": "text",
"assistant_id": "text",
"cancelled_at": 1,
"completed_at": 1,
"created_at": 1,
"expires_at": 1,
"failed_at": 1,
"incomplete_details": {
"reason": "max_completion_tokens"
},
"instructions": "text",
"last_error": {
"code": "server_error",
"message": "text"
},
"max_completion_tokens": 1,
"max_prompt_tokens": 1,
"metadata": null,
"model": "text",
"object": "thread.run",
"parallel_tool_calls": true,
"required_action": {
"submit_tool_outputs": {
"tool_calls": []
},
"type": "submit_tool_outputs"
},
"response_format": null,
"started_at": 1,
"status": "queued",
"thread_id": "text",
"tool_choice": null,
"tools": [],
"truncation_strategy": {
"type": "auto",
"last_messages": 1
},
"usage": {
"completion_tokens": 1,
"prompt_tokens": 1,
"total_tokens": 1
},
"temperature": 1,
"top_p": 1
}