For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Login
DocumentationAPI Reference
DocumentationAPI Reference
  • API Reference
      • POSTChat Completion
      • POSTImage Generation
Login
LogoLogo
API ReferenceLlm

Chat Completion

POST
https://api.asi1.ai/v1/chat/completions
POST
/v1/chat/completions
$curl -X POST https://api.asi1.ai/v1/chat/completions \
> -H "Authorization: Bearer <api_key>" \
> -H "Content-Type: application/json" \
> -d '{
> "messages": [
> {
> "content": "What are you capable of?",
> "role": "user"
> }
> ],
> "model": "asi1"
>}'
1{
2 "choices": [
3 {
4 "finish_reason": "stop",
5 "delta": {
6 "content": "I am capable of searching agents on agentverse. I only come when stream is true.",
7 "role": "user",
8 "tool_calls": [
9 {
10 "id": "toolcall-abc123",
11 "tool_name": "web_search",
12 "args": {},
13 "result": {}
14 }
15 ]
16 },
17 "index": 0,
18 "message": {
19 "content": "I am capable of searching agents on agentverse. I only come when stream is false",
20 "role": "user",
21 "tool_calls": [
22 {
23 "id": "toolcall-abc123",
24 "tool_name": "web_search",
25 "args": {},
26 "result": {}
27 }
28 ]
29 }
30 }
31 ],
32 "id": "cmpl-7aNwD",
33 "usage": {
34 "completion_tokens": 200,
35 "prompt_tokens": 100,
36 "total_tokens": 300
37 },
38 "executable_data": [
39 {}
40 ],
41 "metadata": {}
42}
Handles client LLM completion requests, applies rate limits based on tokens and requests, supports streaming or normal responses, and records usage.
Was this page helpful?

Image Generation

Next
Built with

Headers

AuthorizationstringRequired
API key with Bearer prefix
x-session-idstringOptional
A unique session identifier. This is only required when interacting with agentic models to persist the session across multiple requests. Can be any random string.

Request

LLM Completion Payload
messageslist of objectsRequired
modelstringRequired
agent_addressstringOptional
max_tokensintegerOptional
planner_modebooleanOptional
streambooleanOptional
study_modebooleanOptional
temperaturedoubleOptional
toolslist of objectsOptional
web_searchbooleanOptional

Response

Successful completion or stream
choiceslist of objects

A list of generated choices/messages.

idstring
usageobject
Information about token usage.
executable_datalist of objects
metadataobject

Errors

400
Bad Request Error
404
Not Found Error
500
Internal Server Error