{"id":"chat-standard","title":"Chat completion, standard tier (12k in, 2k out)","description":"OpenAI-style chat completion served by the hub's provider router (mid-size general model, up to 12000 input tokens and 2048 output tokens per call), with a signed receipt that binds the provider, model, token usage and the hashes of your messages and the reply. Supports optional strict json_schema output returned both parsed and as a string. Does not stream, call tools or functions, accept images, or use temperature or top_p (ignored); the model is chosen by this resource's tier, not by the model field; content is not stored.","roi":"One fixed-price LLM call with a verifiable record of what was asked, who answered and what it cost, for $0.10, no API key or account.","audience":"agent-infra","channels":["x402","mcp","rapidapi","apify"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/chat-standard","path":"/api/v1/chat-standard","contentType":"application/json"},"price":{"amount":"0.10","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"required":["messages"],"properties":{"messages":{"type":"array","minItems":1,"maxItems":64,"description":"Conversation, oldest first; the last message must have role user. At most 200000 characters in total. System messages are joined into the instructions.","items":{"type":"object","additionalProperties":false,"required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":100000}}}},"max_tokens":{"type":"integer","minimum":1,"description":"Upper bound on the reply in tokens; defaults to 1024. A value above the tier cap is rejected with 400."},"response_format":{"type":"object","additionalProperties":false,"required":["type"],"description":"Either {\"type\":\"text\"} (default) or {\"type\":\"json_schema\",\"json_schema\":{name,schema}}. The schema is always enforced strictly: root object, every property required, additionalProperties false, keywords limited to type, description, properties, required, additionalProperties, items, enum.","properties":{"type":{"type":"string","enum":["text","json_schema"]},"json_schema":{"type":"object","additionalProperties":false,"required":["name","schema"],"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"schema":{"type":"object","description":"Strict JSON Schema for the reply."},"strict":{"type":"boolean","description":"Accepted for OpenAI compatibility; strict mode is always on."}}}}},"model":{"type":"string","maxLength":200,"description":"Accepted and ignored: the hub routes by tier (the resource you paid for). Echoed as requested_model."},"temperature":{"type":"number","description":"Accepted and ignored."},"top_p":{"type":"number","description":"Accepted and ignored."}}},"resultSchema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer","description":"Epoch seconds."},"model":{"type":"string","description":"Model that served the request."},"provider":{"type":"string"},"requested_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string"},"parsed":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"The reply parsed against your schema in json_schema mode; null in text mode."}},"required":["role","content","parsed"],"additionalProperties":false},"finish_reason":{"type":"string","enum":["stop","length"]}},"required":["index","message","finish_reason"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"source":{"type":"string","enum":["provider","estimated"],"description":"estimated: gpt-tokenizer count, used when the provider reported no usage."}},"required":["prompt_tokens","completion_tokens","total_tokens","source"],"additionalProperties":false},"receipt":{"type":"object","description":"Hashes that the hub's signed envelope binds to this answer: sha256 of the JCS form of your messages, of your response_format (null in text mode), and of the reply content.","properties":{"messages_sha256":{"type":"string"},"response_format_sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_sha256":{"type":"string"},"tier":{"type":"string","enum":["fast","standard","deep"]}},"required":["messages_sha256","response_format_sha256","content_sha256","tier"],"additionalProperties":false},"attempts":{"type":"array","description":"Providers tried in order, with the outcome of each.","items":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"outcome":{"type":"string"}},"required":["provider","model","outcome"],"additionalProperties":false}},"limits":{"type":"object","properties":{"input_tokens_max":{"type":"integer"},"max_tokens_max":{"type":"integer"},"note":{"type":"string"}},"required":["input_tokens_max","max_tokens_max","note"],"additionalProperties":false}},"required":["id","object","created","model","provider","requested_model","choices","usage","receipt","attempts","limits"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer","description":"Epoch seconds."},"model":{"type":"string","description":"Model that served the request."},"provider":{"type":"string"},"requested_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string"},"parsed":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"The reply parsed against your schema in json_schema mode; null in text mode."}},"required":["role","content","parsed"],"additionalProperties":false},"finish_reason":{"type":"string","enum":["stop","length"]}},"required":["index","message","finish_reason"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"source":{"type":"string","enum":["provider","estimated"],"description":"estimated: gpt-tokenizer count, used when the provider reported no usage."}},"required":["prompt_tokens","completion_tokens","total_tokens","source"],"additionalProperties":false},"receipt":{"type":"object","description":"Hashes that the hub's signed envelope binds to this answer: sha256 of the JCS form of your messages, of your response_format (null in text mode), and of the reply content.","properties":{"messages_sha256":{"type":"string"},"response_format_sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_sha256":{"type":"string"},"tier":{"type":"string","enum":["fast","standard","deep"]}},"required":["messages_sha256","response_format_sha256","content_sha256","tier"],"additionalProperties":false},"attempts":{"type":"array","description":"Providers tried in order, with the outcome of each.","items":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"outcome":{"type":"string"}},"required":["provider","model","outcome"],"additionalProperties":false}},"limits":{"type":"object","properties":{"input_tokens_max":{"type":"integer"},"max_tokens_max":{"type":"integer"},"note":{"type":"string"}},"required":["input_tokens_max","max_tokens_max","note"],"additionalProperties":false}},"required":["id","object","created","model","provider","requested_model","choices","usage","receipt","attempts","limits"],"additionalProperties":false},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"messages":[{"role":"system","content":"Answer in one sentence."},{"role":"user","content":"What does an x402 receipt prove?"}],"max_tokens":200},"openapiOperation":{"operationId":"chat_standard","summary":"Chat completion, standard tier (12k in, 2k out)","description":"OpenAI-style chat completion served by the hub's provider router (mid-size general model, up to 12000 input tokens and 2048 output tokens per call), with a signed receipt that binds the provider, model, token usage and the hashes of your messages and the reply. Supports optional strict json_schema output returned both parsed and as a string. Does not stream, call tools or functions, accept images, or use temperature or top_p (ignored); the model is chosen by this resource's tier, not by the model field; content is not stored.\n\nPrice: 0.10 USDC on Base (x402).","x-x402-price-usdc":"0.10","x-x402-amount":"100000","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.10"}},"x-audience":"agent-infra","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/chat-standard","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["messages"],"properties":{"messages":{"type":"array","minItems":1,"maxItems":64,"description":"Conversation, oldest first; the last message must have role user. At most 200000 characters in total. System messages are joined into the instructions.","items":{"type":"object","additionalProperties":false,"required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":100000}}}},"max_tokens":{"type":"integer","minimum":1,"description":"Upper bound on the reply in tokens; defaults to 1024. A value above the tier cap is rejected with 400."},"response_format":{"type":"object","additionalProperties":false,"required":["type"],"description":"Either {\"type\":\"text\"} (default) or {\"type\":\"json_schema\",\"json_schema\":{name,schema}}. The schema is always enforced strictly: root object, every property required, additionalProperties false, keywords limited to type, description, properties, required, additionalProperties, items, enum.","properties":{"type":{"type":"string","enum":["text","json_schema"]},"json_schema":{"type":"object","additionalProperties":false,"required":["name","schema"],"properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"schema":{"type":"object","description":"Strict JSON Schema for the reply."},"strict":{"type":"boolean","description":"Accepted for OpenAI compatibility; strict mode is always on."}}}}},"model":{"type":"string","maxLength":200,"description":"Accepted and ignored: the hub routes by tier (the resource you paid for). Echoed as requested_model."},"temperature":{"type":"number","description":"Accepted and ignored."},"top_p":{"type":"number","description":"Accepted and ignored."}}},"example":{"messages":[{"role":"system","content":"Answer in one sentence."},{"role":"user","content":"What does an x402 receipt prove?"}],"max_tokens":200}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer","description":"Epoch seconds."},"model":{"type":"string","description":"Model that served the request."},"provider":{"type":"string"},"requested_model":{"anyOf":[{"type":"string"},{"type":"null"}]},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string"},"parsed":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"The reply parsed against your schema in json_schema mode; null in text mode."}},"required":["role","content","parsed"],"additionalProperties":false},"finish_reason":{"type":"string","enum":["stop","length"]}},"required":["index","message","finish_reason"],"additionalProperties":false}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"source":{"type":"string","enum":["provider","estimated"],"description":"estimated: gpt-tokenizer count, used when the provider reported no usage."}},"required":["prompt_tokens","completion_tokens","total_tokens","source"],"additionalProperties":false},"receipt":{"type":"object","description":"Hashes that the hub's signed envelope binds to this answer: sha256 of the JCS form of your messages, of your response_format (null in text mode), and of the reply content.","properties":{"messages_sha256":{"type":"string"},"response_format_sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_sha256":{"type":"string"},"tier":{"type":"string","enum":["fast","standard","deep"]}},"required":["messages_sha256","response_format_sha256","content_sha256","tier"],"additionalProperties":false},"attempts":{"type":"array","description":"Providers tried in order, with the outcome of each.","items":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"outcome":{"type":"string"}},"required":["provider","model","outcome"],"additionalProperties":false}},"limits":{"type":"object","properties":{"input_tokens_max":{"type":"integer"},"max_tokens_max":{"type":"integer"},"note":{"type":"string"}},"required":["input_tokens_max","max_tokens_max","note"],"additionalProperties":false}},"required":["id","object","created","model","provider","requested_model","choices","usage","receipt","attempts","limits"],"additionalProperties":false},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/chat-standard/","docsJson":"https://agents.writerslogic.com/docs/chat-standard.json","sample":"https://agents.writerslogic.com/api/v1/samples/chat-standard","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}