Everstack

Create a response (agentic loop with auto tool calling)

POST/v1/responses
POST/v1/responses

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Request Body

PropertyTypeRequiredDescription
modelstringNo
instructionsstringNo
inputobject[]No
toolsobject[]No
builtinToolsobject[]No
toolChoiceobjectNo
parallelToolCallsbooleanNo
textobjectNo
reasoningobjectNo
maxOutputTokensintegerNo
temperaturenumberNo
topPnumberNo
truncationobjectNo
storebooleanNo
previousResponseIdstringNo
streambooleanNo
metadataobjectNo

Responses

200 Generated response with tool calls

PropertyTypeDescription
resultobject
errorobject

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X POST "http://localhost:8089/openai/v1/responses" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"string","instructions":"string","input":[{"type":"string","role":"ROLE_UNSPECIFIED","content":[],"itemId":"string"}],"tools":[{"type":"string","function":{"name":"string","description":"string"}}],"builtinTools":[{"type":"string","webSearch":{"maxResults":0,"searchContextSize":"string"},"fileSearch":{"vectorStoreIds":[],"maxNumResults":0},"computerUse":{"environment":"string","displayWidth":0,"displayHeight":0},"mcp":{"url":"string","name":"string","requireApproval":true,"allowedTools":[]}}],"toolChoice":{"mode":"string","specificTool":{"type":"string","function":{"name":"string","description":"string"}}},"parallelToolCalls":true,"text":{"format":{"type":"string"}},"reasoning":{"effort":"string","generateSummary":"string"},"maxOutputTokens":0,"temperature":0,"topP":0,"truncation":{"type":"string","lastMessages":0},"store":true,"previousResponseId":"string","stream":true}'
const response = await fetch("http://localhost:8089/openai/v1/responses", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "model": "string",
  "instructions": "string",
  "input": [
    {
      "type": "string",
      "role": "ROLE_UNSPECIFIED",
      "content": [],
      "itemId": "string"
    }
  ],
  "tools": [
    {
      "type": "string",
      "function": {
        "name": "string",
        "description": "string"
      }
    }
  ],
  "builtinTools": [
    {
      "type": "string",
      "webSearch": {
        "maxResults": 0,
        "searchContextSize": "string"
      },
      "fileSearch": {
        "vectorStoreIds": [],
        "maxNumResults": 0
      },
      "computerUse": {
        "environment": "string",
        "displayWidth": 0,
        "displayHeight": 0
      },
      "mcp": {
        "url": "string",
        "name": "string",
        "requireApproval": true,
        "allowedTools": []
      }
    }
  ],
  "toolChoice": {
    "mode": "string",
    "specificTool": {
      "type": "string",
      "function": {
        "name": "string",
        "description": "string"
      }
    }
  },
  "parallelToolCalls": true,
  "text": {
    "format": {
      "type": "string"
    }
  },
  "reasoning": {
    "effort": "string",
    "generateSummary": "string"
  },
  "maxOutputTokens": 0,
  "temperature": 0,
  "topP": 0,
  "truncation": {
    "type": "string",
    "lastMessages": 0
  },
  "store": true,
  "previousResponseId": "string",
  "stream": true
}),
});
const data = await response.json();
import requests

response = requests.post(
    "http://localhost:8089/openai/v1/responses",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
  "model": "string",
  "instructions": "string",
  "input": [
    {
      "type": "string",
      "role": "ROLE_UNSPECIFIED",
      "content": [],
      "itemId": "string"
    }
  ],
  "tools": [
    {
      "type": "string",
      "function": {
        "name": "string",
        "description": "string"
      }
    }
  ],
  "builtinTools": [
    {
      "type": "string",
      "webSearch": {
        "maxResults": 0,
        "searchContextSize": "string"
      },
      "fileSearch": {
        "vectorStoreIds": [],
        "maxNumResults": 0
      },
      "computerUse": {
        "environment": "string",
        "displayWidth": 0,
        "displayHeight": 0
      },
      "mcp": {
        "url": "string",
        "name": "string",
        "requireApproval": true,
        "allowedTools": []
      }
    }
  ],
  "toolChoice": {
    "mode": "string",
    "specificTool": {
      "type": "string",
      "function": {
        "name": "string",
        "description": "string"
      }
    }
  },
  "parallelToolCalls": true,
  "text": {
    "format": {
      "type": "string"
    }
  },
  "reasoning": {
    "effort": "string",
    "generateSummary": "string"
  },
  "maxOutputTokens": 0,
  "temperature": 0,
  "topP": 0,
  "truncation": {
    "type": "string",
    "lastMessages": 0
  },
  "store": true,
  "previousResponseId": "string",
  "stream": true
},
)
data = response.json()

Response

{
  "result": {
    "id": "string",
    "object": "string",
    "createdAt": "string",
    "status": "string",
    "error": {
      "code": "string",
      "message": "string"
    },
    "incompleteDetails": {
      "reason": "string"
    },
    "model": "string",
    "output": [
      {
        "id": "string",
        "type": "string",
        "status": "string",
        "role": "ROLE_UNSPECIFIED",
        "content": [],
        "callId": "string",
        "name": "string",
        "arguments": "string",
        "output": "string"
      }
    ],
    "usage": {
      "inputTokens": 0,
      "outputTokens": 0,
      "totalTokens": 0,
      "inputTokensDetails": {
        "cachedTokens": 0,
        "textTokens": 0,
        "audioTokens": 0,
        "imageTokens": 0,
        "reasoningTokens": 0,
        "cacheWriteTokens": 0
      },
      "outputTokensDetails": {
        "cachedTokens": 0,
        "textTokens": 0,
        "audioTokens": 0,
        "imageTokens": 0,
        "reasoningTokens": 0,
        "cacheWriteTokens": 0
      }
    },
    "temperature": 0,
    "topP": 0,
    "maxOutputTokens": 0,
    "previousResponseId": "string",
    "reasoning": {
      "effort": "string",
      "generateSummary": "string"
    },
    "truncation": {
      "type": "string",
      "lastMessages": 0
    }
  },
  "error": {
    "code": 0,
    "message": "string",
    "details": [
      {
        "@type": "string"
      }
    ]
  }
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}