{
 "info": {
  "name": "Candor API",
  "description": "Uncensored language models through an OpenAI-compatible API. Set the collection variable CANDOR_API_KEY to a key from https://candorai.dev (Account > API keys). Full reference: https://candorai.dev/docs",
  "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
 },
 "auth": {
  "type": "bearer",
  "bearer": [
   {
    "key": "token",
    "value": "{{CANDOR_API_KEY}}",
    "type": "string"
   }
  ]
 },
 "variable": [
  {
   "key": "base_url",
   "value": "https://candorai.dev/v1"
  },
  {
   "key": "CANDOR_API_KEY",
   "value": ""
  }
 ],
 "item": [
  {
   "name": "Chat",
   "item": [
    {
     "name": "Chat completion",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/chat/completions",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "chat",
        "completions"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"model\": \"candor-classic\",\n  \"max_tokens\": 300,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Hello\"\n    }\n  ]\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": "One answer. Always send max_tokens: it is what the request sets aside for output."
     }
    },
    {
     "name": "Chat completion (stream)",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/chat/completions",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "chat",
        "completions"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"model\": \"candor-fast\",\n  \"max_tokens\": 300,\n  \"stream\": true,\n  \"stream_options\": {\n    \"include_usage\": true\n  },\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Write a limerick about the sea.\"\n    }\n  ]\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": "Server-sent events; the last chunk carries usage and cost_usd."
     }
    },
    {
     "name": "Chat completion (tools)",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/chat/completions",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "chat",
        "completions"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"model\": \"candor-smart\",\n  \"max_tokens\": 300,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What is the weather in Paris?\"\n    }\n  ],\n  \"tools\": [\n    {\n      \"type\": \"function\",\n      \"function\": {\n        \"name\": \"get_weather\",\n        \"description\": \"Current weather for a city\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"city\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"city\"\n          ]\n        }\n      }\n    }\n  ]\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": "OpenAI function calling."
     }
    },
    {
     "name": "Chat completion (web search)",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/chat/completions",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "chat",
        "completions"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"model\": \"candor-smart\",\n  \"max_tokens\": 400,\n  \"web_search\": true,\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"What changed in the latest Python release?\"\n    }\n  ]\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": "Searches the web for the user message first; the sources come back in web_search.results."
     }
    },
    {
     "name": "Chat with a character",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/chat/completions",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "chat",
        "completions"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"model\": \"candor-classic\",\n  \"max_tokens\": 300,\n  \"character\": \"brooke\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"hey, how was your day?\"\n    }\n  ]\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": "The model answers as the character. Ids come from List characters."
     }
    }
   ]
  },
  {
   "name": "Models",
   "item": [
    {
     "name": "List models",
     "request": {
      "method": "GET",
      "header": [],
      "url": {
       "raw": "{{base_url}}/models",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "models"
       ]
      },
      "description": "Models and prices. No key needed.",
      "auth": {
       "type": "noauth"
      }
     }
    },
    {
     "name": "Get a model",
     "request": {
      "method": "GET",
      "header": [],
      "url": {
       "raw": "{{base_url}}/models/candor-fast",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "models",
        "candor-fast"
       ]
      },
      "description": "One model. No key needed.",
      "auth": {
       "type": "noauth"
      }
     }
    }
   ]
  },
  {
   "name": "Characters",
   "item": [
    {
     "name": "List characters",
     "request": {
      "method": "GET",
      "header": [],
      "url": {
       "raw": "{{base_url}}/characters?category=roleplay",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "characters"
       ],
       "query": [
        {
         "key": "category",
         "value": "roleplay"
        }
       ]
      },
      "description": "Filters: category, format, search, owner."
     }
    },
    {
     "name": "Get a character",
     "request": {
      "method": "GET",
      "header": [],
      "url": {
       "raw": "{{base_url}}/characters/brooke",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "characters",
        "brooke"
       ]
      },
      "description": "One character."
     }
    }
   ]
  },
  {
   "name": "Web search",
   "item": [
    {
     "name": "Search the web",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json"
       }
      ],
      "url": {
       "raw": "{{base_url}}/web/search",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "web",
        "search"
       ]
      },
      "body": {
       "mode": "raw",
       "raw": "{\n  \"query\": \"price of a monthly Navigo pass in 2026\"\n}",
       "options": {
        "raw": {
         "language": "json"
        }
       }
      },
      "description": "Up to 6 results with what the search cost."
     }
    }
   ]
  },
  {
   "name": "Account",
   "item": [
    {
     "name": "Balance",
     "request": {
      "method": "GET",
      "header": [],
      "url": {
       "raw": "{{base_url}}/balance",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "balance"
       ]
      },
      "description": "What is left, and the calling key's limit."
     }
    },
    {
     "name": "Usage",
     "request": {
      "method": "GET",
      "header": [],
      "url": {
       "raw": "{{base_url}}/usage?limit=20",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "usage"
       ],
       "query": [
        {
         "key": "limit",
         "value": "20"
        }
       ]
      },
      "description": "The last requests with tokens and cost."
     }
    },
    {
     "name": "Usage summary",
     "request": {
      "method": "GET",
      "header": [],
      "url": {
       "raw": "{{base_url}}/usage/summary?days=30",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "usage",
        "summary"
       ],
       "query": [
        {
         "key": "days",
         "value": "30"
        }
       ]
      },
      "description": "Totals by day, by model and by key."
     }
    }
   ]
  }
 ]
}