Skip to content

Commit c9dddf7

Browse files
committed
add docs for nanogpt api, artificalanalysis api, blacksmth
1 parent 921f681 commit c9dddf7

62 files changed

Lines changed: 17678 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ src/lib/backend/convex/_generated
3636
*.key
3737
Caddyfile
3838
docker-prod.*
39-
nanogpt-docs
4039
opencode.json
4140
follow-up.md
4241

Lines changed: 300 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
Artificial Analysis API Documentation (Free API)
2+
Overview & Access
3+
Artificial Analysis provides a free API to support analysis of AI models and in making informed decisions about which AI models to use.
4+
We offer a free API focused on model benchmarks and a commercial API with more comprehensive data. Commercial API documentation is available to partners separately.
5+
To access our free API, create an account for the Artificial Analysis Insights Platform and generate an API key.
6+
When integrating with our API, we recommend using model and creator IDs as primary identifiers since they remain stable, while slugs and names may change over time.
7+
Attribution & Sharing of Data
8+
Attribution is required for all use of our free API. Please provide attribution to https://artificialanalysis.ai/.
9+
If you wish to include our logo in your materials, you can download our brand kit here: Artificial Analysis Brand Kit.
10+
Methodology
11+
For details on how benchmarks are conducted, see our methodology.
12+
Authentication
13+
Include your API key in the x-api-key header.
14+
To obtain an API key, create an account in the Artificial Analysis Insights Platform and generate an API key.
15+
401 Invalid/missing API key
16+
429 Rate limit exceeded
17+
500 Internal server error
18+
Free Artificial Analysis Data API
19+
Our free API is focused on sharing primary metrics from our independent benchmarks of models. This includes our independent intelligence evaluations, speed benchmarks and pricing.
20+
The API is rate-limited to 1,000 requests per day. To avoid publicly sharing keys and rate limits, please do not include in client side code and cache responses.
21+
LLMs Endpoint
22+
GET/data/llms/models
23+
Response Fields
24+
Field Type Description
25+
id string Unique identifier (stable)
26+
name string Full name (may change)
27+
slug string URL-friendly identifier (infrequently changed)
28+
model_creator object Creator information (id, name, slug)
29+
evaluations object Benchmark scores
30+
pricing object Price per million tokens ($USD)
31+
median_output_tokens_per_second number Output generation speed (tokens per second)
32+
median_time_to_first_token_seconds number Time to first token (seconds)
33+
Example Request
34+
curl -X GET https://artificialanalysis.ai/api/v2/data/llms/models \
35+
-H "x-api-key: your_api_key_here"
36+
Example Response
37+
{
38+
"status": 200,
39+
"prompt_options": {
40+
"parallel_queries": 1,
41+
"prompt_length": "medium"
42+
},
43+
"data": [
44+
{
45+
"id": "2dad8957-4c16-4e74-bf2d-8b21514e0ae9",
46+
"name": "o3-mini",
47+
"slug": "o3-mini",
48+
"model_creator": {
49+
"id": "e67e56e3-15cd-43db-b679-da4660a69f41",
50+
"name": "OpenAI",
51+
"slug": "openai"
52+
},
53+
"evaluations": {
54+
"artificial_analysis_intelligence_index": 62.9,
55+
"artificial_analysis_coding_index": 55.8,
56+
"artificial_analysis_math_index": 87.2,
57+
"mmlu_pro": 0.791,
58+
"gpqa": 0.748,
59+
"hle": 0.087,
60+
"livecodebench": 0.717,
61+
"scicode": 0.399,
62+
"math_500": 0.973,
63+
"aime": 0.77
64+
},
65+
"pricing": {
66+
"price_1m_blended_3_to_1": 1.925,
67+
"price_1m_input_tokens": 1.1,
68+
"price_1m_output_tokens": 4.4
69+
},
70+
"median_output_tokens_per_second": 153.831,
71+
"median_time_to_first_token_seconds": 14.939,
72+
"median_time_to_first_answer_token": 14.939
73+
},
74+
// Other models...
75+
]
76+
}
77+
Text-to-Image Endpoint
78+
GET/data/media/text-to-image
79+
This endpoint returns ELO ratings for text-to-image models.
80+
You can optionally include the include_categories=true parameter to get a breakdown of ELO scores by category.
81+
Example Request
82+
curl -X GET "https://artificialanalysis.ai/api/v2/data/media/text-to-image" \
83+
-H "x-api-key: your_api_key_here"
84+
Example Response
85+
{
86+
"status": 200,
87+
"include_categories": true,
88+
"data": [
89+
{
90+
"id": "dall-e-3",
91+
"name": "DALL·E 3",
92+
"slug": "dall-e-3",
93+
"model_creator": {
94+
"id": "openai",
95+
"name": "OpenAI"
96+
},
97+
"elo": 1250,
98+
"rank": 1,
99+
"ci95": "-5/+5",
100+
"appearances": 5432,
101+
"release_date": "2025-04",
102+
"categories": [
103+
{
104+
"style_category": "General & Photorealistic",
105+
"subject_matter_category": "People: Portraits",
106+
"elo": 1280,
107+
"ci95": "-5/+5",
108+
"appearances": 1234
109+
}
110+
]
111+
}
112+
]
113+
}
114+
Image Editing Endpoint
115+
GET/data/media/image-editing
116+
This endpoint returns ELO ratings for image editing models.
117+
Example Request
118+
curl -X GET "https://artificialanalysis.ai/api/v2/data/media/image-editing" \
119+
-H "x-api-key: your_api_key_here"
120+
Example Response
121+
{
122+
"status": 200,
123+
"data": [
124+
{
125+
"id": "2f5ebb1e-6d5f-48b0-95bf-3b590fd45971",
126+
"name": "GPT Image 1 (high)",
127+
"slug": "openai-gpt_gpt-image-1--high",
128+
"model_creator": {
129+
"id": "e67e56e3-15cd-43db-b679-da4660a69f41",
130+
"name": "OpenAI"
131+
},
132+
"elo": 1128,
133+
"rank": 1,
134+
"ci95": "-10/+9",
135+
"appearances": 13287,
136+
"release_date": "Apr 2025"
137+
}
138+
]
139+
}
140+
Text-to-Speech Endpoint
141+
GET/data/media/text-to-speech
142+
This endpoint returns ELO ratings for text-to-speech models.
143+
Example Request
144+
curl -X GET "https://artificialanalysis.ai/api/v2/data/media/text-to-speech" \
145+
-H "x-api-key: your_api_key_here"
146+
Text-to-Video Endpoint
147+
GET/data/media/text-to-video
148+
This endpoint returns ELO ratings for text-to-video models.
149+
You can optionally include the include_categories=true parameter to get a breakdown of ELO scores by category.
150+
Example Request
151+
curl -X GET "https://artificialanalysis.ai/api/v2/data/media/text-to-video" \
152+
-H "x-api-key: your_api_key_here"
153+
Example Response
154+
{
155+
"status": 200,
156+
"include_categories": true,
157+
"data": [
158+
{
159+
"id": "61270a9b-9d2e-4875-810f-e81508bc5504",
160+
"name": "Kling 2.5 Turbo 1080p",
161+
"slug": "kling-25-turbo-1080p",
162+
"model_creator": {
163+
"id": "62cc833b-f55a-4489-bcae-54806d4b04ff",
164+
"name": "Kuaishou KlingAI"
165+
},
166+
"elo": 1180,
167+
"rank": 1,
168+
"ci95": "-8/+8",
169+
"appearances": 3210,
170+
"release_date": "2025-09",
171+
"categories": [
172+
{
173+
"style_category": "Photorealistic",
174+
"subject_matter_category": "People",
175+
"format_category": "Moving camera",
176+
"elo": 1200,
177+
"ci95": "-12/+12",
178+
"appearances": 890
179+
}
180+
]
181+
}
182+
]
183+
}
184+
Image-to-Video Endpoint
185+
GET/data/media/image-to-video
186+
This endpoint returns ELO ratings for image-to-video models.
187+
You can optionally include the include_categories=true parameter to get a breakdown of ELO scores by category.
188+
Example Request
189+
curl -X GET "https://artificialanalysis.ai/api/v2/data/media/image-to-video" \
190+
-H "x-api-key: your_api_key_here"
191+
Example Response
192+
{
193+
"status": 200,
194+
"include_categories": true,
195+
"data": [
196+
{
197+
"id": "61270a9b-9d2e-4875-810f-e81508bc5504",
198+
"name": "Kling 2.5 Turbo 1080p",
199+
"slug": "kling-25-turbo-1080p",
200+
"model_creator": {
201+
"id": "62cc833b-f55a-4489-bcae-54806d4b04ff",
202+
"name": "Kuaishou KlingAI"
203+
},
204+
"elo": 1120,
205+
"rank": 1,
206+
"ci95": "-10/+10",
207+
"appearances": 1890,
208+
"release_date": "2025-09",
209+
"categories": [
210+
{
211+
"style_category": "Photorealistic",
212+
"subject_matter_category": "Nature",
213+
"format_category": "Moving camera",
214+
"elo": 1140,
215+
"ci95": "-15/+15",
216+
"appearances": 520
217+
}
218+
]
219+
}
220+
]
221+
}
222+
CritPt Benchmark Evaluation API
223+
This API provides the official gateway for evaluating code generation submissions against the CritPt benchmark private evaluation set.
224+
Authentication & Rate Limiting
225+
Authentication: An Artificial Analysis API key is required in the x-api-key header
226+
Rate Limiting: Default limit of 10 requests per 24-hour window (custom limits available upon request)
227+
Rate Limit Headers: Responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers
228+
Attribution
229+
When using this API or the broader CritPt evaluation, please provide appropriate attribution to the CritPt project.
230+
Batch Evaluation Endpoint
231+
POST/api/v2/critpt/evaluate
232+
Submit a batch of code generation submissions for evaluation against CritPt benchmark problems.
233+
Note: Requests may take substantial time to complete as they are processed by the evaluation system.
234+
Request Body
235+
Field Type Required Description
236+
submissions array Yes Array of submission objects (see below) - must include *all* problems in the public set to be processed
237+
batch_metadata object Yes Metadata object for the batch (any additional properties allowed)
238+
Submission Object Fields
239+
Field Type Required Description
240+
problem_id string Yes Unique identifier for the CritPt problem
241+
generated_code string Yes The code generated by the model
242+
model string Yes Name/identifier of the model used
243+
generation_config object Yes Configuration used for code generation (any properties allowed)
244+
messages array No Optional array of message objects
245+
Response Fields (Success)
246+
Field Type Description
247+
accuracy number Average accuracy from 0-1 across submissions
248+
timeout_rate number Share of submission grading processes that timed out in the upstream grading server
249+
server_timeout_count number Number of submission grading processes that timed out in the upstream grading server
250+
judge_error_count number Number of submission grading processes that failed due to a judge error in the grading server; this could be due to model responses or intermittent and may be retried
251+
Rate Limit Headers
252+
All successful responses include the following headers:
253+
X-RateLimit-Limit: Maximum requests allowed in the time window
254+
X-RateLimit-Remaining: Number of requests remaining in current window
255+
X-RateLimit-Reset: Human-readable date string when the rate limit window resets
256+
Error Responses
257+
400 Invalid request body
258+
401 Invalid/missing API key
259+
429 Rate limit exceeded
260+
502 Invalid response from evaluation system
261+
504 Evaluation timeout
262+
429 Rate Limit Exceeded Response
263+
{
264+
"error": "Rate limit exceeded",
265+
"limit": 10,
266+
"remaining": 0,
267+
"reset": "Wed Jan 01 2025 00:00:00 GMT+0000 (Coordinated Universal Time)",
268+
"retryAfter": 3600
269+
}
270+
The response also includes Retry-After header with seconds to wait.
271+
Example Request (truncated)
272+
curl -X POST https://artificialanalysis.ai/api/v2/critpt/evaluate \
273+
-H "Content-Type: application/json" \
274+
-H "x-api-key: your_api_key_here" \
275+
-d '{
276+
"submissions": [
277+
{
278+
"problem_id": "Challenge_1_main",
279+
"generated_code": "```python\ndef solution():\n return 42\n```",
280+
"model": "gpt-5",
281+
"generation_config": {
282+
"use_golden_for_prev_steps": false,
283+
"parsing": false,
284+
"multiturn_with_answer": false,
285+
"use_python": false,
286+
"use_web_search": false
287+
}
288+
},
289+
# Submission for *all* problems in the public set are required in each grading request
290+
...
291+
],
292+
"batch_metadata": {}
293+
}'
294+
Example Response
295+
{
296+
"accuracy": 0.0,
297+
"timeout_rate": 0.0,
298+
"server_timeout_count": 0,
299+
"judge_error_count": 0
300+
}

0 commit comments

Comments
 (0)