|
| 1 | +# Seed 1.8 |
| 2 | + |
| 3 | +{% columns %} |
| 4 | +{% column width="66.66666666666666%" %} |
| 5 | +{% hint style="info" %} |
| 6 | +This documentation is valid for the following list of our models: |
| 7 | + |
| 8 | +* `bytedance/seed-1-8` |
| 9 | +{% endhint %} |
| 10 | +{% endcolumn %} |
| 11 | + |
| 12 | +{% column width="33.33333333334%" %} |
| 13 | +<a href="https://aimlapi.com/app/bytedance/seed-1-8" class="button primary">Try in Playground</a> |
| 14 | +{% endcolumn %} |
| 15 | +{% endcolumns %} |
| 16 | + |
| 17 | +## Model Overview |
| 18 | + |
| 19 | +A general-purpose agentic model optimized for efficient and accurate execution of complex tasks in real-world scenarios. |
| 20 | + |
| 21 | +{% hint style="success" %} |
| 22 | +[Create AI/ML API Key](https://aimlapi.com/app/keys) |
| 23 | +{% endhint %} |
| 24 | + |
| 25 | +<details> |
| 26 | + |
| 27 | +<summary>How to make the first API call</summary> |
| 28 | + |
| 29 | +**1️⃣ Required setup (don’t skip this)**\ |
| 30 | +▪ **Create an account:** Sign up on the AI/ML API website (if you don’t have one yet).\ |
| 31 | +▪ **Generate an API key:** In your account dashboard, create an API key and make sure it’s **enabled** in the UI. |
| 32 | + |
| 33 | +**2️ Copy the code example**\ |
| 34 | +At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project. |
| 35 | + |
| 36 | +**3️ Update the snippet for your use case**\ |
| 37 | +▪ **Insert your API key:** replace `<YOUR_AIMLAPI_KEY>` with your real AI/ML API key.\ |
| 38 | +▪ **Select a model:** set the `model` field to the model you want to call.\ |
| 39 | +▪ **Provide input:** fill in the request input field(s) shown in the example (for example, `messages` for chat/LLM models, or other inputs for image/video/audio models). |
| 40 | + |
| 41 | +**4️ (Optional) Tune the request**\ |
| 42 | +Depending on the model type, you can add optional parameters to control the output (e.g., generation settings, quality, length, etc.). See the API schema below for the full list. |
| 43 | + |
| 44 | +**5️ Run your code**\ |
| 45 | +Run the updated code in your development environment. Response time depends on the model and request size, but simple requests typically return quickly. |
| 46 | + |
| 47 | +{% hint style="success" %} |
| 48 | +If you need a more detailed walkthrough for setting up your development environment and making a request step by step — feel free to use our [Quickstart guide](../../../quickstart/setting-up.md). |
| 49 | +{% endhint %} |
| 50 | + |
| 51 | +</details> |
| 52 | + |
| 53 | +## API Schema |
| 54 | + |
| 55 | +{% openapi-operation spec="seed-1-8" path="/v1/chat/completions" method="post" %} |
| 56 | +[OpenAPI seed-1-8](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/ByteDance/seed-1-8.json) |
| 57 | +{% endopenapi-operation %} |
| 58 | + |
| 59 | +## Code Example |
| 60 | + |
| 61 | +{% tabs %} |
| 62 | +{% tab title="Python" %} |
| 63 | +{% code overflow="wrap" %} |
| 64 | +```python |
| 65 | +import requests |
| 66 | +import json # for getting a structured output with indentation |
| 67 | + |
| 68 | +response = requests.post( |
| 69 | + "https://api.aimlapi.com/v1/chat/completions", |
| 70 | + headers={ |
| 71 | + # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>: |
| 72 | + "Authorization":"Bearer <YOUR_AIMLAPI_KEY>", |
| 73 | + "Content-Type":"application/json" |
| 74 | + }, |
| 75 | + json={ |
| 76 | + "model":"bytedance/seed-1-8", |
| 77 | + "messages":[ |
| 78 | + { |
| 79 | + "role":"user", |
| 80 | + "content":"Hi! What do you think about mankind?" # insert your prompt |
| 81 | + } |
| 82 | + ] |
| 83 | + } |
| 84 | +) |
| 85 | + |
| 86 | +data = response.json() |
| 87 | +print(json.dumps(data, indent=2, ensure_ascii=False)) |
| 88 | +``` |
| 89 | +{% endcode %} |
| 90 | +{% endtab %} |
| 91 | + |
| 92 | +{% tab title="JavaScript" %} |
| 93 | +{% code overflow="wrap" %} |
| 94 | +```javascript |
| 95 | +async function main() { |
| 96 | + const response = await fetch('https://api.aimlapi.com/v1/chat/completions', { |
| 97 | + method: 'POST', |
| 98 | + headers: { |
| 99 | + // insert your AIML API Key instead of <YOUR_AIMLAPI_KEY> |
| 100 | + 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>', |
| 101 | + 'Content-Type': 'application/json', |
| 102 | + }, |
| 103 | + body: JSON.stringify({ |
| 104 | + model: 'bytedance/seed-1-8', |
| 105 | + messages:[ |
| 106 | + { |
| 107 | + role:'user', |
| 108 | + content: 'Hi! What do you think about mankind?' // insert your prompt here |
| 109 | + } |
| 110 | + ], |
| 111 | + }), |
| 112 | + }); |
| 113 | + |
| 114 | + const data = await response.json(); |
| 115 | + console.log(JSON.stringify(data, null, 2)); |
| 116 | +} |
| 117 | + |
| 118 | +main(); |
| 119 | +``` |
| 120 | +{% endcode %} |
| 121 | +{% endtab %} |
| 122 | +{% endtabs %} |
| 123 | + |
| 124 | +<details> |
| 125 | + |
| 126 | +<summary>Response</summary> |
| 127 | + |
| 128 | +{% code overflow="wrap" %} |
| 129 | +```json5 |
| 130 | +{ |
| 131 | + "choices": [ |
| 132 | + { |
| 133 | + "finish_reason": "stop", |
| 134 | + "index": 0, |
| 135 | + "logprobs": null, |
| 136 | + "message": { |
| 137 | + "content": "Hi there! That’s such a profound, layered question—mankind is equal parts breathtakingly brilliant and deeply flawed, a species still figuring itself out.\n\nOn one hand, we’re capable of extraordinary goodness and innovation: we’ve cured diseases that once wiped out entire populations, sent probes to the edges of our solar system, created art and music that transcends time and culture, and rallied by the millions to help strangers during disasters (think of the global outpouring after earthquakes or refugee crises). Our capacity for empathy, to care for someone we’ve never met, is one of our most beautiful traits.\n\nOn the other hand, we carry a heavy shadow: we’ve waged devastating wars, exploited each other and the planet for short-term gain, perpetuated systemic inequality, and pushed the natural world to the brink of crisis. These flaws aren’t inherent, but they’re a reminder of how easily we can prioritize self-interest over collective good.\n\nWhat feels most important to me, though, is that we’re a work in progress. We’ve learned from past mistakes—think of the abolition of slavery, the expansion of civil rights, the growing global movement for climate action—and we keep striving to do better. Mankind isn’t just one thing; it’s the teacher staying late to help a student, the scientist working tirelessly on a vaccine, the activist fighting for justice, and also the person making a small, kind choice each day. We have the potential to shape a more compassionate, sustainable future—we just have to keep choosing it, together.", |
| 138 | + "reasoning_content": "Got it, let's tackle this question: \"Hi! What do you think about mankind?\" First, I need to balance the complexity—mankind has both incredible highs and deep lows. Let's start with the positive aspects: creativity, innovation, compassion, resilience. Mention things like scientific breakthroughs (cures for diseases, space exploration), art, music, acts of kindness (helping strangers, disaster relief). Then, the challenging parts: conflict, environmental harm, inequality, cruelty. But important to frame it as a dynamic, evolving species. Maybe end on a note of hope, since we've shown the capacity to learn and improve. Let's make it heartfelt and nuanced, not too one-sided. Let's structure it:\n\n1. Greeting back, acknowledge it's a big question.\n2. The bright side: creativity, empathy, progress—examples like vaccines, renewable energy, community support.\n3. The shadow side: division, exploitation, ecological damage—examples like wars, climate crisis, inequality.\n4. The middle ground: we're a work in progress. Our capacity for growth and redemption is what stands out; we've corrected past wrongs (like civil rights movements) and keep striving for better.\n5. End with a hopeful note, emphasizing that our choices shape who we are, and there's potential for more good.\n\nLet me put that into natural language:\n\nHi there! That’s such a profound, layered question—mankind is equal parts breathtakingly brilliant and deeply flawed, a species still figuring itself out.\n\nOn one hand, we’re capable of extraordinary goodness and innovation: we’ve cured diseases that once wiped out entire populations, sent probes to the edges of our solar system, created art and music that transcends time and culture, and rallied by the millions to help strangers during disasters (think of the global outpouring after earthquakes or refugee crises). Our capacity for empathy, to care for someone we’ve never met, is one of our most beautiful traits.\n\nOn the other hand, we carry a heavy shadow: we’ve waged devastating wars, exploited each other and the planet for short-term gain, perpetuated systemic inequality, and pushed the natural world to the brink of crisis. These flaws aren’t inherent, but they’re a reminder of how easily we can prioritize self-interest over collective good.\n\nWhat feels most important to me, though, is that we’re a work in progress. We’ve learned from past mistakes—think of the abolition of slavery, the expansion of civil rights, the growing global movement for climate action—and we keep striving to do better. Mankind isn’t just one thing; it’s the teacher staying late to help a student, the scientist working tirelessly on a vaccine, the activist fighting for justice, and also the person making a small, kind choice each day. We have the potential to shape a more compassionate, sustainable future—we just have to keep choosing it, together.", |
| 139 | + "role": "assistant" |
| 140 | + } |
| 141 | + } |
| 142 | + ], |
| 143 | + "created": 1769655426, |
| 144 | + "id": "021769655407356f0a583d75381f7c0a662383f3247915e311aa6", |
| 145 | + "model": "seed-1-8-251228", |
| 146 | + "service_tier": "default", |
| 147 | + "object": "chat.completion", |
| 148 | + "usage": { |
| 149 | + "completion_tokens": 922, |
| 150 | + "prompt_tokens": 42, |
| 151 | + "total_tokens": 964, |
| 152 | + "prompt_tokens_details": { |
| 153 | + "cached_tokens": 0 |
| 154 | + }, |
| 155 | + "completion_tokens_details": { |
| 156 | + "reasoning_tokens": 606 |
| 157 | + } |
| 158 | + }, |
| 159 | + "meta": { |
| 160 | + "usage": { |
| 161 | + "credits_used": 3897 |
| 162 | + } |
| 163 | + } |
| 164 | +} |
| 165 | +``` |
| 166 | +{% endcode %} |
| 167 | + |
| 168 | +</details> |
0 commit comments