분석·검색

하는 일엔드포인트응답
이미지 설명·질문에 답하기POST /v1/image-analyses바로
문서 요약, 마크다운으로 바꾸기POST /v1/document-analyses바로
웹 검색 결과 목록 (Brave, Perplexity)POST /v1/search바로
웹을 찾아 출처와 함께 답 쓰기 (Perplexity Sonar)POST /v1/research바로

이미지 분석

POST /v1/image-analyses

이미지를 설명하거나, 이미지에 대한 질문에 답해요. 여러 장을 주면 한꺼번에 보고 답 하나를 써요.

필드형식기본값설명
image_urls링크 배열(1~10개)필수이미지의 https 링크
prompt문자열이미지 설명질문이나 지시. 예: "표의 숫자를 읽어 줘"
max_tokens1 이상의 정수모델 기본값답의 최대 길이(토큰)
curl https://api.devdive.ai/v1/image-analyses \
  -H "Authorization: Bearer $DEVDIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_urls": ["https://example.com/receipt.jpg"],
    "prompt": "영수증의 가게 이름, 날짜, 합계 금액을 JSON으로 정리해 줘"
  }'
{
  "id": "3c2b1a09-8f7e-4d6c-b5a4-938271605f4e",
  "object": "image_analysis",
  "model": "devdive-image-analyze",
  "text": "{\"store\": \"…\", \"date\": \"2026-11-03\", \"total\": 12800}",
  "credits_used": 0.4
}

문서 분석

POST /v1/document-analyses

문서를 요약하거나, 문서 전체를 마크다운 글로 바꿔요.

필드형식기본값설명
file_url링크필수문서의 https 링크
operation문자열summarysummary(요약) 또는 convert_markdown(문서 전체를 마크다운으로)
  • 읽을 수 있는 문서: PDF, Word(docx), 한글(hwp, hwpx), PowerPoint(ppt, pptx), txt, md, json
  • convert_markdown은 AI가 요약하지 않고 문서의 글을 그대로 옮겨요. 내 프로그램에서 직접 다루거나 글 모델에 넘길 때 좋아요.
  • 파일에 올릴 수 있는 문서는 PDF뿐이에요. 다른 형식은 공개 https 링크로 넘기세요.
curl https://api.devdive.ai/v1/document-analyses \
  -H "Authorization: Bearer $DEVDIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_url": "https://example.com/report.pdf", "operation": "summary"}'
{
  "id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d",
  "object": "document_analysis",
  "model": "devdive-docs-analyze",
  "text": "## 요약\n- 3분기 매출은 전 분기보다 12% 늘었어요. …",
  "credits_used": 0.9
}

웹 검색

POST /v1/search

검색 결과 목록(제목, 링크, 요약)을 받아요. 답을 써 주지는 않아요. 답이 필요하면 리서치를 쓰세요.

필드형식기본값설명
query문자열필수검색어
engine문자열bravebrave 또는 perplexity
max_results1~20엔진 기본값받을 결과 수
recency문자열없음기간. hour, day, week, month, year. perplexity만
domains문자열 배열없음이 사이트들에서만 찾기. 예: ["github.com"]. perplexity만

brave에 recency나 domains를 보내면 422가 와요.

curl https://api.devdive.ai/v1/search \
  -H "Authorization: Bearer $DEVDIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "MCP Apps 지원 클라이언트", "engine": "perplexity", "recency": "month", "max_results": 5}'
{
  "id": "2e00eeef-f4d8-432c-8f57-99662c019a9e",
  "object": "search",
  "engine": "perplexity",
  "results": [
    { "title": "…", "url": "https://…", "snippet": "…", "date": "2026-10-28" }
  ],
  "credits_used": 0.136
}

결과의 date는 엔진이 날짜를 알려 줄 때만 있어요(Brave는 대개 null).

리서치

POST /v1/research

질문을 받으면 웹을 찾아보고, 출처를 단 답을 써요.

필드형식기본값설명
question문자열필수질문
model문자열sonarsonar(빠름), sonar-pro(더 많은 출처로 깊게), sonar-reasoning-pro(여러 단계로 따져 보는 추론)
search_mode문자열webweb(일반 웹), academic(학술 자료), sec(미국 SEC 공시)
recency문자열없음기간. hour, day, week, month, year
domains문자열 배열없음이 사이트들에서만 찾기
curl https://api.devdive.ai/v1/research \
  -H "Authorization: Bearer $DEVDIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"question": "2026년 국내 생성형 AI 규제 동향을 정리해 줘", "model": "sonar-pro", "recency": "month"}'
{
  "id": "6d5c4b3a-2f1e-4d0c-9b8a-7f6e5d4c3b2a",
  "object": "research",
  "model": "sonar-pro",
  "answer": "… [1] … [2]",
  "citations": ["https://…", "https://…"],
  "sources": [{ "title": "…", "url": "https://…", "date": "2026-10-21" }],
  "credits_used": 2.5
}
  • answer의 [1], [2]는 citations의 순서와 같아요.
  • sources는 답을 쓰며 살펴본 페이지 목록이에요.