{
    "info": {
        "name": "QFOXAI OpenAI-Compatible API",
        "description": "Import this collection, set api_key to your full qf_ secret, and start testing QFOXAI endpoints.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
        {
            "key": "base_url",
            "value": "https://qfoxai.com/v1"
        },
        {
            "key": "api_key",
            "value": "qf_your_key"
        },
        {
            "key": "model",
            "value": "QFOXAI"
        },
        {
            "key": "batch_id",
            "value": "batch_replace_after_create"
        }
    ],
    "item": [
        {
            "name": "List Models",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/models",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "models"
                    ]
                }
            }
        },
        {
            "name": "Key Status",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/key",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "key"
                    ]
                }
            }
        },
        {
            "name": "Health Check",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/health",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "health"
                    ]
                }
            }
        },
        {
            "name": "Chat Completions",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    },
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/chat/completions",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "chat",
                        "completions"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"model\": \"{{model}}\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": \"Write a short welcome email for a SaaS customer.\"\n        }\n    ],\n    \"temperature\": 0.6999999999999999555910790149937383830547332763671875,\n    \"max_tokens\": 300\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Streaming Chat Body",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    },
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/chat/completions",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "chat",
                        "completions"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"model\": \"{{model}}\",\n    \"stream\": true,\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": \"Stream a short answer.\"\n        }\n    ],\n    \"max_tokens\": 240\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Image Generation",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    },
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/images/generations",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "images",
                        "generations"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"model\": \"QFOXAI Image\",\n    \"prompt\": \"A realistic product photo of a modern AI dashboard on a laptop, clean office lighting\",\n    \"size\": \"1024x1024\",\n    \"n\": 1\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Usage Estimate",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    },
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/estimate",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "estimate"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"model\": \"{{model}}\",\n    \"endpoint\": \"chat\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": \"Write a short support reply.\"\n        }\n    ],\n    \"max_tokens\": 300\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Embeddings",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    },
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/embeddings",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "embeddings"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"model\": \"QFOXAI-Embeddings\",\n    \"input\": \"QFOXAI provides AI chat and API access.\",\n    \"dimensions\": 384\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Moderation",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    },
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/moderations",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "moderations"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"model\": \"QFOXAI-Moderation\",\n    \"input\": \"Text to review before publishing.\"\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "Create Batch",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    },
                    {
                        "key": "Content-Type",
                        "value": "application/json"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/batches",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "batches"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"endpoint\": \"/v1/chat/completions\",\n    \"completion_window\": \"24h\",\n    \"metadata\": {\n        \"source\": \"postman\"\n    },\n    \"requests\": [\n        {\n            \"custom_id\": \"job-1\",\n            \"method\": \"POST\",\n            \"url\": \"/v1/chat/completions\",\n            \"body\": {\n                \"model\": \"{{model}}\",\n                \"messages\": [\n                    {\n                        \"role\": \"user\",\n                        \"content\": \"Draft a concise support reply.\"\n                    }\n                ],\n                \"max_tokens\": 300\n            }\n        }\n    ]\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                }
            }
        },
        {
            "name": "List Batches",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/batches",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "batches"
                    ]
                }
            }
        },
        {
            "name": "Retrieve Batch",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/batches/{{batch_id}}",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "batches",
                        "{{batch_id}}"
                    ]
                }
            }
        },
        {
            "name": "Cancel Batch",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "Accept",
                        "value": "application/json"
                    },
                    {
                        "key": "Authorization",
                        "value": "Bearer {{api_key}}"
                    }
                ],
                "url": {
                    "raw": "{{base_url}}/batches/{{batch_id}}/cancel",
                    "host": [
                        "{{base_url}}"
                    ],
                    "path": [
                        "batches",
                        "{{batch_id}}",
                        "cancel"
                    ]
                }
            }
        }
    ]
}