# deepseek-ai/DeepSeek-V4.1-Flash-1017 > OpenAI-compatible language or vision-language model This file is intended for AI coding agents wiring an application to this specific Chutes model. ## Important URLs - Model page: https://chutes.ai/app/chute/chutes-deepseek-ai-deepseek-v4-1-flash-1017 - Model llms.txt: https://chutes.ai/app/chute/chutes-deepseek-ai-deepseek-v4-1-flash-1017/llms.txt - Model OpenAPI 3.1 spec (this chute, callable): https://chutes.ai/app/chute/chutes-deepseek-ai-deepseek-v4-1-flash-1017/openapi.json - Global Chutes llms.txt: https://chutes.ai/llms.txt - Full Chutes docs export: https://chutes.ai/llms-full.txt - Management API OpenAPI (account/billing/keys, NOT this model): https://api.chutes.ai/openapi.json ## Model Identifiers - Name: `deepseek-ai/DeepSeek-V4.1-Flash-1017` - Chute ID: `34c7b79d-854b-5e32-981a-774d322062b0` - Slug: `chutes-deepseek-ai-deepseek-v4-1-flash-1017` - Owner: `chutes` ## Authentication - Use `Authorization: Bearer $CHUTES_API_KEY` for inference calls. - Send JSON request bodies with `Content-Type: application/json` unless the endpoint documentation says otherwise. - The request body is FLAT — send the request fields at the top level (no `input_args`/`args` wrapper). - This model is served on the shared OpenAI-compatible gateway. Set the request `model` field to the exact Name above (`deepseek-ai/DeepSeek-V4.1-Flash-1017`), and use base URL `https://llm.chutes.ai/v1`. - For base64 media fields, send raw base64 strings in API requests. The web playground may use temporary Blob upload references internally for large files before proxying to Chutes. ## Pricing - $0.30 input / $1.20 output per 1M tokens - $0.03 cached input per 1M tokens - Check the model page for current pricing. ## Endpoints ### 1. POST /v1/chat/completions - Base URL: `https://llm.chutes.ai` - Output content type: `application/json` Request fields: - No request schema is published for this endpoint. Example call: cURL: ```bash curl -X POST "https://llm.chutes.ai/v1/chat/completions" \ -H "Authorization: Bearer $CHUTES_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-ai/DeepSeek-V4.1-Flash-1017", "messages": [ { "role": "user", "content": "Hello!" } ], "stream": false, "max_tokens": 1024, "temperature": 0.7 }' ``` Python: ```python import os import requests api_key = os.environ.get("CHUTES_API_KEY") if not api_key: raise ValueError("Missing CHUTES_API_KEY") url = "https://llm.chutes.ai/v1/chat/completions" headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json", } data = { "model": "deepseek-ai/DeepSeek-V4.1-Flash-1017", "messages": [ { "role": "user", "content": "Hello!" } ], "stream": False, "max_tokens": 1024, "temperature": 0.7 } response = requests.request("POST", url, headers=headers, json=data) response.raise_for_status() result = response.json() print(result) ``` ### 2. POST /v1/chat/completions - Base URL: `https://llm.chutes.ai` - Output content type: `application/json` - Streaming: yes Request fields: - No request schema is published for this endpoint. Example call: cURL: ```bash curl -X POST "https://llm.chutes.ai/v1/chat/completions" \ -H "Authorization: Bearer $CHUTES_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-ai/DeepSeek-V4.1-Flash-1017", "messages": [ { "role": "user", "content": "Hello!" } ], "stream": true, "max_tokens": 1024, "temperature": 0.7 }' ``` Python: ```python import os import requests api_key = os.environ.get("CHUTES_API_KEY") if not api_key: raise ValueError("Missing CHUTES_API_KEY") url = "https://llm.chutes.ai/v1/chat/completions" headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json", } data = { "model": "deepseek-ai/DeepSeek-V4.1-Flash-1017", "messages": [ { "role": "user", "content": "Hello!" } ], "stream": True, "max_tokens": 1024, "temperature": 0.7 } import json response = requests.request("POST", url, headers=headers, json=data, stream=True) response.raise_for_status() for line in response.iter_lines(): if not line: continue line = line.decode("utf-8") if not line.startswith("data: "): continue chunk = line[6:] if chunk == "[DONE]": break try: choices = json.loads(chunk).get("choices") or [] except json.JSONDecodeError: continue if not choices: continue content = choices[0].get("delta", {}).get("content") if content: print(content, end="", flush=True) print() ``` ## Agent Integration Checklist - Pick the endpoint path that matches the desired task. - Set `CHUTES_API_KEY` in the server-side environment only. - Validate required fields before sending requests. - For media models, keep file upload, base64 conversion, and output preview/download handling explicit in the app UI.