Skip to content

Commit 5547431

Browse files
authored
Added testnet request and updated to use tabs (#191)
1 parent 10d4bed commit 5547431

File tree

1 file changed

+56
-32
lines changed

1 file changed

+56
-32
lines changed

docs/products/eigenai/howto/use-eigenai.md renamed to docs/products/eigenai/howto/use-eigenai.mdx

Lines changed: 56 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Use EigenAI
33
sidebar_position: 2
44
---
55

6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
8+
69
## Get Started with a Token Grant
710

811
See [Try EigenAI](../try-eigenai.md#get-started-for-free) for information on obtaining a token grant to get started for free.
@@ -11,41 +14,62 @@ We're starting off with supporting the `gpt-oss-120b-f16` and `qwen3-32b-128k-bf
1114

1215
## Chat Completions API
1316

14-
```bash
15-
$ curl -X POST https://eigenai.eigencloud.xyz/v1/chat/completions \
16-
-H "X-API-Key: <api-key>" \
17-
-H "Content-Type: application/json" \
18-
-d '{
19-
"model": "gpt-oss-120b-f16",
20-
"max_tokens": 120,
21-
"seed": 42,
22-
"messages": [{"role": "user", "content": "Write a story about programming"}]
23-
}' | jq
24-
25-
{
26-
"id": "chatcmpl-eigenai-llama-1758835890305965",
27-
"created": 1758835890,
28-
"model": "gpt-oss-120b-f16",
29-
"system_fingerprint": "eigenai-llama@0.1.0+eigenai-llama",
30-
"object": "chat.completion",
31-
"usage": {
32-
"completion_tokens": 120,
33-
"prompt_tokens": 72,
34-
"total_tokens": 192
35-
},
36-
"choices": [
17+
<Tabs>
18+
<TabItem value="testnet" label="Testnet Request">
19+
```bash
20+
$ curl -X POST https://eigenai-sepolia.eigencloud.xyz/v1/chat/completions \
21+
-H "X-API-Key: <api-key>" \
22+
-H "Content-Type: application/json" \
23+
-d '{
24+
"model": "gpt-oss-120b-f16",
25+
"max_tokens": 120,
26+
"seed": 42,
27+
"messages": [{"role": "user", "content": "Write a story about programming"}]
28+
}' | jq
29+
```
30+
</TabItem>
31+
<TabItem value="mainnet" label="Mainnet Request">
32+
```bash
33+
$ curl -X POST https://eigenai.eigencloud.xyz/v1/chat/completions \
34+
-H "X-API-Key: <api-key>" \
35+
-H "Content-Type: application/json" \
36+
-d '{
37+
"model": "gpt-oss-120b-f16",
38+
"max_tokens": 120,
39+
"seed": 42,
40+
"messages": [{"role": "user", "content": "Write a story about programming"}]
41+
}' | jq
42+
```
43+
</TabItem>
44+
45+
<TabItem value="response" label="Response">
46+
```
3747
{
38-
"index": 0,
39-
"message": {
40-
"role": "assistant",
41-
"content": "<|channel|>analysis<|message|>The user asks: \"Write a story about programming\". Need to produce a story. Probably creative, about programming, characters, maybe AI, debugging, etc. Should be engaging. No constraints other than story. I will craft a narrative with a protagonist, their journey, maybe metaphorical. Use vivid language. Provide a story. Ensure it's appropriate. Probably around 800-1200 words? Not too long, but enough. I'll deliver.<|end|><|start|>assistant<|channel|>final<|message|>**The Compiler’s Apprentice**\n\nWhen Maya first walked into the cramped, fluorescent‑lit office of LumenTech"
48+
"id": "chatcmpl-eigenai-llama-1758835890305965",
49+
"created": 1758835890,
50+
"model": "gpt-oss-120b-f16",
51+
"system_fingerprint": "eigenai-llama@0.1.0+eigenai-llama",
52+
"object": "chat.completion",
53+
"usage": {
54+
"completion_tokens": 120,
55+
"prompt_tokens": 72,
56+
"total_tokens": 192
4257
},
43-
"finish_reason": "length"
58+
"choices": [
59+
{
60+
"index": 0,
61+
"message": {
62+
"role": "assistant",
63+
"content": "<|channel|>analysis<|message|>The user asks: \"Write a story about programming\". Need to produce a story. Probably creative, about programming, characters, maybe AI, debugging, etc. Should be engaging. No constraints other than story. I will craft a narrative with a protagonist, their journey, maybe metaphorical. Use vivid language. Provide a story. Ensure it's appropriate. Probably around 800-1200 words? Not too long, but enough. I'll deliver.<|end|><|start|>assistant<|channel|>final<|message|>**The Compiler’s Apprentice**\n\nWhen Maya first walked into the cramped, fluorescent‑lit office of LumenTech"
64+
},
65+
"finish_reason": "length"
66+
}
67+
],
68+
"signature": "2ee2e48ae9f6796c1de67977981d937c886efec3957c9bfc28f7a3f3be8262f04af609f22878b3bc2f0c4858fd04005d76877208881abd473208317df1dcfaf11c"
4469
}
45-
],
46-
"signature": "2ee2e48ae9f6796c1de67977981d937c886efec3957c9bfc28f7a3f3be8262f04af609f22878b3bc2f0c4858fd04005d76877208881abd473208317df1dcfaf11c"
47-
}
48-
```
70+
```
71+
</TabItem>
72+
</Tabs>
4973

5074
### OpenAI Client usage
5175

0 commit comments

Comments
 (0)