Harness 설정
SuperAgent API
conversation을 만들고, SSE stream을 수신하고, follow-up과 conversation metadata 조회를 실행하세요.
/v2/conversations인증
Bearer API key
Content type
application/json and text/event-stream
속도 제한
Connect to stream immediately. Use offset for reconnects.
SuperAgent API 는 실시간 SSE 출력과 LiveDoc 연동을 제공하는 AI 대화 API입니다. 기본 흐름은 대화 생성, stream 수신, 후속 질문, 대화 상세 조회, LiveDoc으로 컨텍스트 리소스 관리입니다.
인증
Authorization: Bearer YOUR_API_KEY1. 대화 생성
POST https://openapi.felo.ai/v2/conversations요청 Body
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
query | string | 예 | 사용자 query, 1~2000자 |
live_doc_short_id | string | 아니요 | 기존 LiveDoc을 재사용합니다. 생략하면 새로 생성합니다 |
selected_resource_ids | array of strings | 아니요 | 컨텍스트에 포함할 resource IDs |
skill_id | string | 아니요 | 이 대화에서 사용할 Skill ID |
accept_language | string | 아니요 | 언어 설정. 예: en |
device_id | string | 아니요 | 장치 식별자 |
extra | object | 아니요 | SuperAgent로 전달할 추가 파라미터 |
ext | object | 아니요 | 확장 파라미터, such as style_id or theme |
curl -X POST 'https://openapi.felo.ai/v2/conversations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"query":"What is the latest news about AI?","accept_language":"en"}'응답 필드
| 필드 | 타입 | 설명 |
|---|---|---|
stream_key | string | Key used to consume the SSE stream |
thread_short_id | string | 대화 ID for follow-up and detail query |
live_doc_short_id | string | 연결된 LiveDoc ID |
2. SSE 스트림 수신
After creating a conversation, connect to the stream endpoint with stream_key 로 stream endpoint에 연결해 실시간 출력을 받습니다.
GET https://openapi.felo.ai/v2/conversations/stream/{stream_key}| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
offset | integer | 아니요 | Resume streaming from this position after disconnect |
curl -N 'https://openapi.felo.ai/v2/conversations/stream/sk_abc123xyz' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Accept: text/event-stream'The response uses standard SSE format with events such as message, done, and error. Connect soon after creating the conversation because stream_key 유효 시간이 제한됩니다.
3. 대화 이어가기
Ask a follow-up question in the same conversation. The endpoint returns a new stream_key for the SSE stream.
POST https://openapi.felo.ai/v2/conversations/{thread_short_id}/follow_up| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
query | string | 예 | 후속 질문, 1~2000자 |
4. 대화 상세 조회
Query conversation metadata, including title, creation time, update time, and associated LiveDoc ID.
GET https://openapi.felo.ai/v2/conversations/{thread_short_id}응답 필드
| 필드 | 타입 | 설명 |
|---|---|---|
thread_short_id | string | 대화 ID |
title | string | 대화 제목 derived from the query |
created_at | string | 생성 timestamp, ISO 8601 |
updated_at | string | 마지막 업데이트 timestamp, ISO 8601 |
live_doc_short_id | string | 연결된 LiveDoc ID |
Typical Integration Flow
1. POST /v2/conversations -> get stream_key + thread_short_id + live_doc_short_id
2. GET /v2/conversations/stream/{stream_key} -> consume SSE until done
3. POST /v2/conversations/{thread_short_id}/follow_up -> ask follow-up, get new stream_key
4. GET /v2/conversations/stream/{new_stream_key} -> consume follow-up SSE until done
5. GET /v2/conversations/{thread_short_id} -> fetch conversation metadataFor LiveDoc CRUD, resource upload, URL import, and retrieval, see the LiveDoc API.
오류 코드
| Code | HTTP Status | 설명 |
|---|---|---|
INVALID_API_KEY | 401 | API Key is invalid or revoked |
SUPER_AGENT_CONVERSATION_CREATE_FAILED | 502 | Failed to create conversation |
SUPER_AGENT_CONVERSATION_FOLLOW_UP_FAILED | 502 | Failed to follow up conversation |
SUPER_AGENT_CONVERSATION_QUERY_FAILED | 502 | Failed to query conversation detail |