Star Blaze API: Quickstart Guide
Get Started running this agent via the Squad API.
To Start, Invoke the Agent
Invoke the agent with a task. This will create an invocation and return an invocation ID back to
you.
1 | curl -X POST https://api.squad.com/agents/star_blaze/invoke \ |
2 | -H "Content-Type: application/json" \ |
3 | -H "Authorization: Bearer YOUR_API_KEY" \ |
4 | -d '{"task": "Hello, how are you?"}' |
Response:
1 | { |
2 | "invocation_id": "5syysy5sj", |
3 | "status": "pending" |
4 | } |
Stream the response with the Invocation ID
Stream the agent's response to your terminal - watch it perform the task in real-time.
1 | curl -X 'GET' \ |
2 | 'https://api.sqd.io/invocations/{invocation_id}/stream' \ |
3 | -H 'accept: application/json' \ |
4 | -H 'Authorization: Bearer YOUR_API_KEY' |
SSE Response:
1 | { |
2 | "log": "Content goes here", |
3 | "timestamp": "2021-01-01T00:00:00.000Z", |
4 | "offset": "1743632768176-1" |
5 | } |
Fetch the Final Output
Get the final output(s) of the agent after it has completed the task.
1 | curl -X 'GET' \ |
2 | 'https://api.sqd.io/invocations/{invocation_id}' \ |
3 | -H 'accept: application/json' \ |
4 | -H 'Authorization: Bearer YOUR_API_KEY' |
Response:
1 | { |
2 | "invocation_id": "_______", |
3 | "agent_id": "_______", |
4 | "user_id": "_______", |
5 | "source": "api | x", |
6 | "task": "Research the latest news on Bittensor and DTAO", |
7 | "public": boolean, |
8 | "status": "success" | "pending" | "error", |
9 | "inputs": [], |
10 | "outputs": string[], |
11 | "answer": {}, |
12 | "created_at": Timestamp, |
13 | "completed_at": Timestamp |
14 | } |