docs
docs copied to clipboard
AV Hosting API: Add example for uploading multiple code files via the code upload endpoint
The code can be uploaded as a single string (like the current example) or a JSON string with multiple file objects as follows:
import requests
data = {
"code": '{[{"id": 0, "language": "python", "name": "agent.py", "value": <contents>}, {"id": 1, "language", "plaintext", "name": ".env", "value": <contents>},...]}'
}
pathParameters = {
"agentAddress": "agent1q2dfhywtt8xazrdyzgap6gzdd7uhk4e0wmc3gjqt42esauaegcm8cuvclpj"
}
requests.put("https://agentverse.ai/v1/hosting/agents/{pathParameters.agentAddress}/code", json=data, headers={
"Authorization": "bearer <your token here>"
}