Quickstart guide

Learn how to use the Featherless API to build with any open model.

Prerequisites

Our API interface is OpenAI compatible, meaning any client program that works with OpenAI as an AI/inference provider can be reconfigured to use featherless with little effort

  1. Sign up for an account at Featherless.

  2. Get your API key from the dashboard.

  3. Make your first API call:

{
  "title": "Open AI SDK",
  "code_snippets": [
    {
      "code": {
        "value": "from openai import OpenAI\n\nclient = OpenAI(\n  base_url=\"https://api.featherless.ai/v1\",\n  api_key=\"FEATHERLESS_API_KEY\",\n)\n\nresponse = client.chat.completions.create(\n  model='Qwen/Qwen2.5-7B-Instruct',\n  messages=[\n    {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n    {\"role\": \"user\", \"content\": \"Hello!\"}\n  ],\n)\nprint(response.choices[0].message.content)",
        "code": "from openai import OpenAI\n\nclient = OpenAI(\n  base_url=\"https://api.featherless.ai/v1\",\n  api_key=\"FEATHERLESS_API_KEY\",\n)\n\nresponse = client.chat.completions.create(\n  model='Qwen/Qwen2.5-7B-Instruct',\n  messages=[\n    {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n    {\"role\": \"user\", \"content\": \"Hello!\"}\n  ],\n)\nprint(response.choices[0].message.content)",
        "mode": "python"
      },
      "id": "midob8sw",
      "type": "code_snippet"
    },
    {
      "code": {
        "value": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  baseURL: 'https://api.featherless.ai/v1',\n  apiKey: 'FEATHERLESS_API_KEY'\n});\n\nconst response = await client.chat.completions.create({\n  model: 'Qwen/Qwen2.5-7B-Instruct',\n  messages: [\n    { role: 'system', content: 'You are a helpful assistant.' },\n    { role: 'user', content: 'Hello!' }\n  ]\n});\n\nconsole.log(response.choices[0].message.content);",
        "code": "import OpenAI from 'openai';\n\nconst client = new OpenAI({\n  baseURL: 'https://api.featherless.ai/v1',\n  apiKey: 'FEATHERLESS_API_KEY'\n});\n\nconst response = await client.chat.completions.create({\n  model: 'Qwen/Qwen2.5-7B-Instruct',\n  messages: [\n    { role: 'system', content: 'You are a helpful assistant.' },\n    { role: 'user', content: 'Hello!' }\n  ]\n});\n\nconsole.log(response.choices[0].message.content);",
        "mode": "javascript"
      },
      "id": "midobgsy",
      "type": "code_snippet"
    },
    {
      "code": {
        "value": "curl -X POST https://api.featherless.ai/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer FEATHERLESS_API_KEY\" \\\n  -d '{\n    \"model\": \"Qwen/Qwen2.5-7B-Instruct\",\n    \"messages\": [\n      {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n      {\"role\": \"user\", \"content\": \"Hello!\"}\n    ]\n  }'",
        "code": "curl -X POST https://api.featherless.ai/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer FEATHERLESS_API_KEY\" \\\n  -d '{\n    \"model\": \"Qwen/Qwen2.5-7B-Instruct\",\n    \"messages\": [\n      {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n      {\"role\": \"user\", \"content\": \"Hello!\"}\n    ]\n  }'",
        "mode": "shell"
      },
      "id": "midobn6q",
      "type": "code_snippet"
    }
  ],
  "id": "midob5va",
  "type": "multi_code_block"
}

You can also make direct requests to our API endpoints (most important of which being /completions and /chat/completions) to integrate Featherless into any software application.

{
  "title": "Featherless API (direct)",
  "code_snippets": [
    {
      "code": {
        "value": "import requests\n\nresponse = requests.post(\n    url=\"https://api.featherless.ai/v1/chat/completions\",\n    headers={\n        \"Content-Type\": \"application/json\",\n        \"Authorization\": \"Bearer FEATHERLESS_API_KEY\"\n    },\n    json={\n        \"model\": \"Qwen/Qwen2.5-7B-Instruct\",\n        \"messages\": [\n            {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n            {\"role\": \"user\", \"content\": \"Hello! How are you?\"}\n        ]\n    }\n)\nprint(response.json()[\"choices\"][0][\"message\"][\"content\"])",
        "code": "import requests\n\nresponse = requests.post(\n    url=\"https://api.featherless.ai/v1/chat/completions\",\n    headers={\n        \"Content-Type\": \"application/json\",\n        \"Authorization\": \"Bearer FEATHERLESS_API_KEY\"\n    },\n    json={\n        \"model\": \"Qwen/Qwen2.5-7B-Instruct\",\n        \"messages\": [\n            {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n            {\"role\": \"user\", \"content\": \"Hello! How are you?\"}\n        ]\n    }\n)\nprint(response.json()[\"choices\"][0][\"message\"][\"content\"])",
        "mode": "python"
      },
      "id": "midocfxe",
      "type": "code_snippet"
    },
    {
      "code": {
        "value": "const response = await fetch('https://api.featherless.ai/v1/chat/completions', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'Authorization': 'Bearer FEATHERLESS_API_KEY'\n  },\n  body: JSON.stringify({\n    model: 'Qwen/Qwen2.5-7B-Instruct',\n    messages: [\n      { role: 'system', content: 'You are a helpful assistant.' },\n      { role: 'user', content: 'Hello! How are you?' }\n    ]\n  })\n});\n\nconst data = await response.json();\nconsole.log(data.choices[0].message.content);",
        "code": "const response = await fetch('https://api.featherless.ai/v1/chat/completions', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application/json',\n    'Authorization': 'Bearer FEATHERLESS_API_KEY'\n  },\n  body: JSON.stringify({\n    model: 'Qwen/Qwen2.5-7B-Instruct',\n    messages: [\n      { role: 'system', content: 'You are a helpful assistant.' },\n      { role: 'user', content: 'Hello! How are you?' }\n    ]\n  })\n});\n\nconst data = await response.json();\nconsole.log(data.choices[0].message.content);",
        "mode": "javascript"
      },
      "id": "midocp63",
      "type": "code_snippet"
    },
    {
      "code": {
        "value": "curl -X POST https://api.featherless.ai/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer FEATHERLESS_API_KEY\" \\\n  -d '{\n    \"model\": \"Qwen/Qwen2.5-7B-Instruct\",\n    \"messages\": [\n      {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n      {\"role\": \"user\", \"content\": \"Hello! How are you?\"}\n    ]\n  }'",
        "code": "curl -X POST https://api.featherless.ai/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer FEATHERLESS_API_KEY\" \\\n  -d '{\n    \"model\": \"Qwen/Qwen2.5-7B-Instruct\",\n    \"messages\": [\n      {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n      {\"role\": \"user\", \"content\": \"Hello! How are you?\"}\n    ]\n  }'",
        "mode": "shell"
      },
      "id": "midoctax",
      "type": "code_snippet"
    }
  ],
  "id": "midocaed",
  "type": "multi_code_block"
}

What’s next?

Now that you’ve made your first Featherless AI API request, have a look at the following:

Last edited: Nov 24, 2025