svjack's picture
Initial upload with page-agent integration
ecfad22 verified
import httpx
import json
import asyncio
async def test():
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer sk-rOiDSQkoe2VgPbWJVbWbLXo2PrmEYVAVoFCrcNjGAMgPmnsOxLQ5XBsSHbGhrStv",
}
body = {
"model": "kimi-k2.5",
"temperature": 0.7,
"messages": [
{
"role": "system",
"content": "You are an AI agent designed to operate in an iterative loop to automate browser tasks.",
}
],
}
async with httpx.AsyncClient(timeout=60) as client:
resp = await client.post(
"https://opencode.ai/zen/go/v1/chat/completions", json=body, headers=headers
)
print(f"Status: {resp.status_code}")
print(f"Response: {resp.text[:1000]}")
asyncio.run(test())