summaryrefslogtreecommitdiffhomepage
path: root/js/openapi.json
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-05-18 22:30:41 -0400
committerDax Raad <[email protected]>2025-05-26 12:40:17 -0400
commit99af6146d5def31c59993636d60eb75a483a283b (patch)
treeeb57ed227c15cf9be54bc9f231c83895d812f881 /js/openapi.json
parent020e0ca039287b73fa33041fbd1bb214e6ccb396 (diff)
downloadopencode-99af6146d5def31c59993636d60eb75a483a283b.tar.gz
opencode-99af6146d5def31c59993636d60eb75a483a283b.zip
openapi
Diffstat (limited to 'js/openapi.json')
-rw-r--r--js/openapi.json90
1 files changed, 90 insertions, 0 deletions
diff --git a/js/openapi.json b/js/openapi.json
new file mode 100644
index 000000000..8dbe78550
--- /dev/null
+++ b/js/openapi.json
@@ -0,0 +1,90 @@
+{
+ "openapi": "3.1.0",
+ "info": {
+ "title": "opencode",
+ "description": "opencode api",
+ "version": "1.0.0"
+ },
+ "paths": {
+ "/session_create": {
+ "post": {
+ "responses": {
+ "200": {
+ "description": "Successfully created session",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "pattern": "^ses"
+ },
+ "title": {
+ "type": "string"
+ },
+ "tokens": {
+ "type": "object",
+ "properties": {
+ "input": {
+ "type": "number"
+ },
+ "output": {
+ "type": "number"
+ },
+ "reasoning": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "input",
+ "output",
+ "reasoning"
+ ]
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "tokens"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "operationId": "postSession_create",
+ "parameters": [],
+ "description": "Create a new session"
+ }
+ },
+ "/session_chat": {
+ "post": {
+ "responses": {},
+ "operationId": "postSession_chat",
+ "parameters": [],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "parts": {}
+ },
+ "required": [
+ "sessionID"
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {}
+ }
+} \ No newline at end of file