API Reference
OpenAPI endpoint documentation with request and response details.
Endpoints
Service health
Response Body
application/json
curl -X GET "https://flux-production-9c9e.up.railway.app/health"{
"status": "ok",
"cohere_ready": true,
"tavily_ready": true
}Search web results
Query Parameters
q*string
Natural language query
Length
length <= 500limit?integer
Default
10Range
1 <= value <= 20topic?string
Value in
"news" | "general"days?integer
Range
1 <= valueResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://flux-production-9c9e.up.railway.app/search?q=string"{
"query": "string",
"results": [
{
"id": "string",
"url": "http://example.com",
"title": "string",
"snippet": "string",
"score": 0,
"rank": 0
}
],
"total": 0,
"reranked": true
}{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}Synthesize an answer
Query Parameters
q*string
Length
length <= 500topic?string
Value in
"news" | "general"days?integer
Range
1 <= valueResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://flux-production-9c9e.up.railway.app/answer?q=string"{
"query": "string",
"answer": "string",
"citations": [
{
"title": "string",
"url": "http://example.com",
"score": 0,
"rank": 0
}
],
"model": "string"
}{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}Extract page contents
Query Parameters
urls*string
Comma-separated URLs (max 10)
Response Body
application/json
application/json
application/json
curl -X GET "https://flux-production-9c9e.up.railway.app/contents?urls=string"[
{
"url": "http://example.com",
"title": "string",
"content": "string",
"word_count": 0,
"success": true
}
]{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}List conversations
Query Parameters
page?integer
Default
1Range
1 <= valuepage_size?integer
Default
20Range
1 <= value <= 100Response Body
application/json
application/json
curl -X GET "https://flux-production-9c9e.up.railway.app/conversations"{
"conversations": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2019-08-24T14:15:22Z",
"message_count": 0
}
],
"total": 0,
"page": 0,
"page_size": 0
}{
"error": "string",
"code": "string"
}Create conversation
Response Body
application/json
curl -X POST "https://flux-production-9c9e.up.railway.app/conversations"{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2019-08-24T14:15:22Z",
"message_count": 0,
"messages": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"query": "string",
"answer": "string",
"citations": [
{
"title": "string",
"url": "http://example.com",
"score": 0,
"rank": 0
}
],
"results": [
{
"id": "string",
"url": "http://example.com",
"title": "string",
"snippet": "string",
"score": 0,
"rank": 0
}
],
"created_at": "2019-08-24T14:15:22Z"
}
]
}Get conversation
curl -X GET "https://flux-production-9c9e.up.railway.app/conversations/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"created_at": "2019-08-24T14:15:22Z",
"message_count": 0,
"messages": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"query": "string",
"answer": "string",
"citations": [
{
"title": "string",
"url": "http://example.com",
"score": 0,
"rank": 0
}
],
"results": [
{
"id": "string",
"url": "http://example.com",
"title": "string",
"snippet": "string",
"score": 0,
"rank": 0
}
],
"created_at": "2019-08-24T14:15:22Z"
}
]
}{
"error": "string",
"code": "string"
}Delete conversation
curl -X DELETE "https://flux-production-9c9e.up.railway.app/conversations/497f6eca-6276-4993-bfeb-53cbbbba6f08"Empty
{
"error": "string",
"code": "string"
}Add conversation message
Path Parameters
conversation_id*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
query*string
Length
length <= 500Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://flux-production-9c9e.up.railway.app/conversations/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages" \ -H "Content-Type: application/json" \ -d '{ "query": "string" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"query": "string",
"answer": "string",
"citations": [
{
"title": "string",
"url": "http://example.com",
"score": 0,
"rank": 0
}
],
"results": [
{
"id": "string",
"url": "http://example.com",
"title": "string",
"snippet": "string",
"score": 0,
"rank": 0
}
],
"created_at": "2019-08-24T14:15:22Z"
}{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}